Package org.biojava.nbio.structure.io
Interface StructureIOFile
-
- All Superinterfaces:
StructureProvider
- All Known Implementing Classes:
LocalPDBDirectory
,MMCIFFileReader
,MMTFFileReader
,PDBFileReader
public interface StructureIOFile extends StructureProvider
StructureIOFile extends StructureProvider with methods specific to parsing files from the filesystem.- Author:
- Andreas Prlic
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addExtension(String ext)
Associates a file extension with this particular StructureIOFile, indicating that files of that type can be parsed.List<String>
getExtensions()
Returns a list of extensions supported by this classStructure
getStructure(File file)
Read file from File and returns a Structure object.Structure
getStructure(String filename)
Open filename and return a Structure object.-
Methods inherited from interface org.biojava.nbio.structure.io.StructureProvider
getFileParsingParameters, getStructureById, setFileParsingParameters
-
-
-
-
Method Detail
-
addExtension
void addExtension(String ext)
Associates a file extension with this particular StructureIOFile, indicating that files of that type can be parsed. This is generally called only in the constructor of the implementing class.- Parameters:
ext
- a String ...
-
getExtensions
List<String> getExtensions()
Returns a list of extensions supported by this class- Returns:
- a (potentially empty) list of strings
-
getStructure
Structure getStructure(String filename) throws IOException
Open filename and return a Structure object. Not to be confused withStructureProvider.getStructureById(String)
- Parameters:
filename
- The path to the file. Must be the correct format for the implementing class.- 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 the structure. Must be the correct format for the implementing class- Returns:
- a Structure object
- Throws:
IOException
- ...
-
-