org.biojava.bio.structure.io
Class SandboxStyleStructureProvider

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

public class SandboxStyleStructureProvider
extends Object
implements StructureProvider

The "Sandbox" style of organizing files is to have a directory structure like below, i.e. the files are organized into

a1/2a1v/2a1v.cif.gz
a1/2a1v/2a1v.dssp.gz
a1/2a1v/2a1v.pdb-250.jpg.gz
a1/2a1v/2a1v.pdb-500.jpg.gz
a1/2a1v/2a1v.pdb-65.jpg.gz
a1/2a1v/2a1v.pdb-80.jpg.gz
a1/2a1v/2a1v.pdb1-250.jpg.gz
a1/2a1v/2a1v.pdb1-500.jpg.gz
a1/2a1v/2a1v.pdb1-65.jpg.gz
a1/2a1v/2a1v.pdb1-80.jpg.gz
a1/2a1v/2a1v.pdb1.gz
a1/2a1v/2a1v.stride.gz
a1/2a1v/2a1v.xml.gz
a1/2a1v/pdb2a1v.ent.gz
a1/2a1v/r2a1vsf.ent.gz
a1/2a1w/2a1w-deriv.cif.gz
a1/2a1w/2a1w-extatom.xml.gz
a1/2a1w/2a1w-noatom.xml.gz
a1/2a1w/2a1w.cif.gz
a1/2a1w/2a1w.dssp.gz
a1/2a1w/2a1w.pdb-250.jpg.gz
a1/2a1w/2a1w.pdb-500.jpg.gz
a1/2a1w/2a1w.pdb-65.jpg.gz
a1/2a1w/2a1w.pdb-80.jpg.gz
a1/2a1w/2a1w.pdb1-250.jpg.gz
a1/2a1w/2a1w.pdb1-500.jpg.gz
a1/2a1w/2a1w.pdb1-65.jpg.gz
a1/2a1w/2a1w.pdb1-80.jpg.gz
a1/2a1w/2a1w.pdb1.gz
a1/2a1w/2a1w.pdb2-250.jpg.gz
a1/2a1w/2a1w.pdb2-500.jpg.gz
a1/2a1w/2a1w.pdb2-65.jpg.gz
a1/2a1w/2a1w.pdb2-80.jpg.gz
a1/2a1w/2a1w.pdb2.gz
a1/2a1w/2a1w.pdb3-250.jpg.gz
a1/2a1w/2a1w.pdb3-500.jpg.gz
a1/2a1w/2a1w.pdb3-65.jpg.gz
a1/2a1w/2a1w.pdb3-80.jpg.gz
a1/2a1w/2a1w.pdb3.gz
a1/2a1w/2a1w.pdb4-250.jpg.gz
a1/2a1w/2a1w.pdb4-500.jpg.gz
a1/2a1w/2a1w.pdb4-65.jpg.gz
a1/2a1w/2a1w.pdb4-80.jpg.gz
a1/2a1w/2a1w.pdb4.gz
a1/2a1w/2a1w.pdb5-250.jpg.gz
a1/2a1w/2a1w.pdb5-500.jpg.gz
a1/2a1w/2a1w.pdb5-65.jpg.gz
a1/2a1w/2a1w.pdb5-80.jpg.gz
a1/2a1w/2a1w.pdb5.gz
a1/2a1w/2a1w.pdb6-250.jpg.gz
a1/2a1w/2a1w.pdb6-500.jpg.gz
a1/2a1w/2a1w.pdb6-65.jpg.gz
a1/2a1w/2a1w.pdb6-80.jpg.gz
a1/2a1w/2a1w.pdb6.gz
a1/2a1w/2a1w.stride.gz
a1/2a1w/2a1w.xml.gz
a1/2a1w/pdb2a1w.ent.gz
a1/2a1w/r2a1wsf.ent.gz
a1/2a1x/2a1x-deriv.cif.gz
a1/2a1x/2a1x-extatom.xml.gz
a1/2a1x/2a1x-noatom.xml.gz

Author:
Andreas Prlic

Field Summary
static String fileSeparator
           
 
Constructor Summary
SandboxStyleStructureProvider()
           
 
Method Summary
 List<String> getAllPDBIDs()
          Returns a list of all PDB IDs that are available in this installation
 Structure getBiologicalUnit(String pdbId)
          get the biological unit for a file
 FileParsingParameters getFileParsingParameters()
          Get the parameters that should be used for file parsing
 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

fileSeparator

public static final String fileSeparator
Constructor Detail

SandboxStyleStructureProvider

public SandboxStyleStructureProvider()
Method Detail

setPath

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


getStructureById

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

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

getBiologicalUnit

public Structure getBiologicalUnit(String pdbId)
                            throws StructureException,
                                   IOException
Description copied from interface: StructureProvider
get the biological unit for a file

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

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

getAllPDBIDs

public List<String> getAllPDBIDs()
                          throws IOException
Returns a list of all PDB IDs that are available in this installation

Returns:
a list of PDB IDs
Throws:
IOException