org.proteinshader.structure.io
Interface StructureReader

All Known Implementing Classes:
PDBStructureReader

public interface StructureReader

StructureReader provides an interface for reading a protein structure from a file.

In this first version of the program, the StructureReader interface has only one concrete implementation, PDBStructureReader, which expects a PDB formatted text file. Future versions of the program will likely also have an XMLStructureReader and an MMCIFStructureReader for reading PDBML/XML and mmCIF formats, respectively.


Method Summary
 List<String> getBadLines()
          Returns a list with any bad lines that were found the last time readStructure() was called.
 Structure readStructure(File file)
          Reads a protein structure from a file and returns a Structure object.
 Structure readStructure(String filename)
          Reads a protein structure from a file and returns a Structure object.
 

Method Detail

readStructure

Structure readStructure(String filename)
                        throws StructureReaderException
Reads a protein structure from a file and returns a Structure object. A StructureReaderException will be thrown if a problem occurs.

Parameters:
filename - the full name of the file to read.
Returns:
The newly created Structure.
Throws:
StructureReaderException - if an IO error occurs.

readStructure

Structure readStructure(File file)
                        throws StructureReaderException
Reads a protein structure from a file and returns a Structure object. A StructureReaderException will be thrown if a problem occurs.

Parameters:
file - the file to read.
Returns:
The newly created Structure.
Throws:
StructureReaderException - if an IO error occurs.

getBadLines

List<String> getBadLines()
Returns a list with any bad lines that were found the last time readStructure() was called.

Returns:
A list of invalid lines from a PDB formatted file.


Copyright © 2007-2008