org.biojava.bio.structure.io
Class LocalCacheStructureProvider

java.lang.Object
  extended by org.biojava.bio.structure.io.LocalCacheStructureProvider
All Implemented Interfaces:
StructureProvider

public class LocalCacheStructureProvider
extends Object
implements StructureProvider

Provides structures based on locally cached PDB files. The path where to cache this can be configured in FileParsingParameters

Author:
Andreas Prlic

Field Summary
static String lineSplit
           
 
Constructor Summary
LocalCacheStructureProvider()
           
 
Method Summary
 Structure getBiologicalUnit(String pdbId)
          Returns the first available biological unit for the PDB ID.
 FileParsingParameters getFileParsingParameters()
          Get the parameters that should be used for file parsing
 String getPath()
          Returns the path value.
 Structure getStructureById(String pdbId)
          get the structure for a PDB ID
 void setFileParsingParameters(FileParsingParameters params)
          Set the parameters that should be used for file parsing
 void setPath(String p)
          directory where to find PDB files
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lineSplit

public static final String lineSplit
Constructor Detail

LocalCacheStructureProvider

public LocalCacheStructureProvider()
Method Detail

setPath

public void setPath(String p)
directory where to find PDB files


getPath

public String getPath()
Returns the path value.

Returns:
a String representing the path value
See Also:
setPath(java.lang.String)

getStructureById

public Structure getStructureById(String pdbId)
                           throws IOException
Description copied from interface: StructureProvider
get the structure for a PDB ID

Specified by:
getStructureById in interface StructureProvider
Returns:
Throws:
IOException

getBiologicalUnit

public Structure getBiologicalUnit(String pdbId)
                            throws StructureException,
                                   IOException
Returns the first available biological unit for the PDB ID. Note: the biological units are represented using multiple models. You need to work with all models to get the full set of atoms.

Specified by:
getBiologicalUnit in interface StructureProvider
Returns:
Throws:
IOException
StructureException

setFileParsingParameters

public void setFileParsingParameters(FileParsingParameters params)
Description copied from interface: StructureProvider
Set the parameters that should be used for file parsing

Specified by:
setFileParsingParameters in interface StructureProvider
Parameters:
params - FileParsingParameters

getFileParsingParameters

public FileParsingParameters getFileParsingParameters()
Description copied from interface: StructureProvider
Get the parameters that should be used for file parsing

Specified by:
getFileParsingParameters in interface StructureProvider
Returns:
the FileParsingParameters that are configuring the behavior of the parser