Package 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addExtension(java.lang.String ext)
add a known File extension.void
clearExtensions()
clear all file extensionsjava.lang.String
getPath()
get the directory path to the filesStructure
getStructure(java.io.File file)
read file from File and returns a Structure object.Structure
getStructure(java.lang.String filename)
open filename and returns a Structure object.boolean
isAutoFetch()
Fetch files automatically from FTP server.void
setAutoFetch(boolean autoFetch)
Tell the parser to fetch missing PDB files from the FTP server automatically.void
setPath(java.lang.String path)
Set path to file / connection string to db.-
Methods inherited from interface org.biojava.bio.structure.io.StructureIO
getStructureById
-
-
-
-
Method Detail
-
setPath
void setPath(java.lang.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
java.lang.String getPath()
get the directory path to the files- Returns:
- path
-
addExtension
void addExtension(java.lang.String ext)
add a known File extension.- Parameters:
ext
- a String ...
-
clearExtensions
void clearExtensions()
clear all file extensions
-
getStructure
Structure getStructure(java.lang.String filename) throws java.io.IOException
open filename and returns a Structure object.- Parameters:
filename
- a String- Returns:
- a Structure object
- Throws:
java.io.IOException
- ...
-
getStructure
Structure getStructure(java.io.File file) throws java.io.IOException
read file from File and returns a Structure object.- Parameters:
file
- file containing a PDB or mmcif file- Returns:
- a Structure object
- Throws:
java.io.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.
-
-