org.biojava.bio.structure.io.mmcif
public class DownloadChemCompProvider extends java.lang.Object implements ChemCompProvider
AllChemCompProvider
. Another provider, that
does not require any network access, but only can support a limited set of chemical component definitions, is the ReducedChemCompProvider
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CHEM_COMP_CACHE_DIRECTORY |
Constructor and Description |
---|
DownloadChemCompProvider() |
Modifier and Type | Method and Description |
---|---|
void |
checkDoFirstInstall()
checks if the chemical components already have been installed into the PDB directory.
|
ChemComp |
getChemComp(java.lang.String recordName)
Loads the definitions for this
ChemComp from a local file and instantiates a new object. |
static java.lang.String |
getLocalFileName(java.lang.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(java.lang.String p)
making sure we use the same path for the PDB installation as is used by the PdbFileReader
|
public void checkDoFirstInstall()
public ChemComp getChemComp(java.lang.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 java.lang.String getLocalFileName(java.lang.String recordName)
ChemComp
recordName
- the ID of the ChemComp
public static void setPath(java.lang.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)