org.biojava.bio.structure.io
Interface StructureIOFile

All Superinterfaces:
StructureIO
All Known Implementing Classes:
MMCIFFileReader, PDBFileReader

public interface StructureIOFile
extends StructureIO

interface StructureIOFile extends the StructureIO interface and adds a few File specific methods.

Author:
Andreas Prlic

Method Summary
 void addExtension(String ext)
          add a known File extension.
 void clearExtensions()
          clear all file extensions
 FileParsingParameters getFileParsingParameters()
          Get the parameters that should be used for file parsing
 String getPath()
          get the directory path to the files
 Structure getStructure(File file)
          read file from File and returns a Structure object.
 Structure getStructure(String filename)
          open filename and returns a Structure object.
 Structure getStructureById(String pdbId)
          Get a Structure based on its PDB id.
 boolean isAutoFetch()
          Fetch files automatically from FTP server.
 boolean isPdbDirectorySplit()
          The PDB files are organized hierarchically (as on the PDB - FTP server.
 void setAutoFetch(boolean autoFetch)
          Tell the parser to fetch missing PDB files from the FTP server automatically.
 void setFileParsingParameters(FileParsingParameters params)
          Set the parameters that should be used for file parsing
 void setPath(String path)
          Set path to file / connection string to db.
 void setPdbDirectorySplit(boolean isSplit)
          The PDB files are organized hierarchically (as on the PDB - FTP server.
 

Method Detail

setPath

void setPath(String path)
Set path to file / connection string to db. This is for installations of PDB/mmCif where all files are located in one directory.

Parameters:
path - a String specifying the path value

getPath

String getPath()
get the directory path to the files

Returns:
path

addExtension

void addExtension(String ext)
add a known File extension.

Parameters:
ext - a String ...

clearExtensions

void clearExtensions()
clear all file extensions


getStructure

Structure getStructure(String filename)
                       throws IOException
open filename and returns a Structure object.

Parameters:
filename - a String
Returns:
a Structure object
Throws:
IOException - ...

getStructure

Structure getStructure(File file)
                       throws IOException
read file from File and returns a Structure object.

Parameters:
file - file containing a PDB or mmcif file
Returns:
a Structure object
Throws:
IOException - ...

isAutoFetch

boolean isAutoFetch()
Fetch files automatically from FTP server. Default: false

Returns:
flag is true or false.

setAutoFetch

void setAutoFetch(boolean autoFetch)
Tell the parser to fetch missing PDB files from the FTP server automatically. default is false. If true, new PDB files will be automatically stored in the Path and gzip compressed.

Parameters:
autoFetch - flag.

setPdbDirectorySplit

void setPdbDirectorySplit(boolean isSplit)
The PDB files are organized hierarchically (as on the PDB - FTP server. Directories are split based on the two middle characters of the files).

Parameters:
isSplit -

isPdbDirectorySplit

boolean isPdbDirectorySplit()
The PDB files are organized hierarchically (as on the PDB - FTP server. Directories are split based on the two middle characters of the files).

Returns:
flag

getStructureById

Structure getStructureById(String pdbId)
                           throws IOException
Get a Structure based on its PDB id. The reader takes care of finding the correct file in the PATH configured in get/setPath.

Specified by:
getStructureById in interface StructureIO
Parameters:
pdbId - a String specifying the id value (PDB code)
Returns:
a Structure object
Throws:
IOException - ...

setFileParsingParameters

void setFileParsingParameters(FileParsingParameters params)
Set the parameters that should be used for file parsing

Parameters:
params - FileParsingParameters

getFileParsingParameters

FileParsingParameters getFileParsingParameters()
Get the parameters that should be used for file parsing

Returns:
the FileParsingParameters that are configuring the behavior of the parser