org.biojava.bio.structure.server
public class FlatFileInstallation extends Object implements PDBInstallation
PrepareIndexFile
Modifier and Type | Field and Description |
---|---|
static SimpleDateFormat |
dateFormat |
static String |
DEFAUL_CHAIN_FILE |
static String |
DEFAULT_INDEX_FILE |
static Logger |
logger |
Constructor and Description |
---|
FlatFileInstallation(File filePath)
create a new FlatFile Installation and point it to the directory that contains all PDB files
|
Modifier and Type | Method and Description |
---|---|
void |
addPDBFilter(PDBFilter filter)
add a filter for PDB files.
|
void |
applyFilters() |
void |
clearFilters()
remove all filters, next time getAll is called, it will return all available PDBs
|
List<PDBHeader> |
getAll()
get all PDBHeaders that pass the added Filters, if no filters have been added returns all available PDBs
|
File |
getChainInfoFile() |
File |
getFilePath() |
PDBHeader |
getPDBHeader(String pdbId)
get the PDB header for a single protein structure
|
File |
getPDBInfoFile() |
Structure |
getStructure(String pdbId)
request a structure by its PDB identifier
|
boolean |
hasNext()
return if the iteration over all structures will return another structure
|
Structure |
next()
iterate over all structures in this Installation that pass the provided filters and
return the next one in the list.
|
void |
setChainInfoFile(File chainInfoFile) |
void |
setFilePath(File filePath) |
void |
setPDBInfoFile(File indexFile) |
public static final Logger logger
public static final String DEFAULT_INDEX_FILE
public static final String DEFAUL_CHAIN_FILE
public static SimpleDateFormat dateFormat
public FlatFileInstallation(File filePath)
filePath
- public File getPDBInfoFile()
public void setPDBInfoFile(File indexFile)
public File getChainInfoFile()
public void setChainInfoFile(File chainInfoFile)
public File getFilePath()
public void setFilePath(File filePath)
public void addPDBFilter(PDBFilter filter)
PDBInstallation
addPDBFilter
in interface PDBInstallation
filter
- the filter to apply when getAll is being called.PDBInstallation.getAll()
public void clearFilters()
PDBInstallation
clearFilters
in interface PDBInstallation
public void applyFilters()
public List<PDBHeader> getAll()
PDBInstallation
getAll
in interface PDBInstallation
public PDBHeader getPDBHeader(String pdbId)
PDBInstallation
getPDBHeader
in interface PDBInstallation
public Structure getStructure(String pdbId)
PDBInstallation
getStructure
in interface PDBInstallation
public boolean hasNext()
PDBInstallation
hasNext
in interface PDBInstallation
public Structure next()
PDBInstallation
next
in interface PDBInstallation