|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.bio.structure.io.mmcif.DownloadChemCompProvider
public class DownloadChemCompProvider
This provider of chemical components can download and cache chemical component definition files from the RCSB PDB web site.
It is the default way to access these definitions.
If this provider is called he first time, it will download and install all chemical
component definitions in a local directory.
Once the definition files have been installed, it has quick startup time and low memory requirements.
An alternative provider, that keeps all definitions in memory is the AllChemCompProvider
. Another provider, that
does not require any network access, but only can support a limited set of chemical component definitions, is the ReducedChemCompProvider
.
Field Summary | |
---|---|
static String |
CHEM_COMP_CACHE_DIRECTORY
|
Constructor Summary | |
---|---|
DownloadChemCompProvider()
|
Method Summary | |
---|---|
void |
checkDoFirstInstall()
checks if the chemical components already have been installed into the PDB directory. |
ChemComp |
getChemComp(String recordName)
Loads the definitions for this ChemComp from a local file and instantiates a new object. |
static String |
getLocalFileName(String recordName)
Returns the file name that contains the definition for this ChemComp |
boolean |
isDownloadAll()
By default this provider will download only some of the ChemComp files. |
void |
setDownloadAll(boolean downloadAll)
By default this provider will download only some of the ChemComp files. |
static void |
setPath(String p)
making sure we use the same path for the PDB installation as is used by the PdbFileReader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String CHEM_COMP_CACHE_DIRECTORY
Constructor Detail |
---|
public DownloadChemCompProvider()
Method Detail |
---|
public void checkDoFirstInstall()
public ChemComp getChemComp(String recordName)
ChemComp
from a local file and instantiates a new object.
getChemComp
in interface ChemCompProvider
recordName
- the ID of the ChemComp
ChemComp
definition.public static String getLocalFileName(String recordName)
ChemComp
recordName
- the ID of the ChemComp
public static void setPath(String p)
p
- path to PDB files.public boolean isDownloadAll()
ChemComp
files.
The user has to request that all files should be downloaded by setting this parameter to true.
public void setDownloadAll(boolean downloadAll)
ChemComp
files.
The user has to request that all files should be downloaded by setting this parameter to true.
flag
- if the all components should be downloaded and installed at startup. (default: false)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |