Class UserConfiguration
- java.lang.Object
-
- org.biojava.nbio.structure.align.util.UserConfiguration
-
public class UserConfiguration extends Object
A container to persist config to the file system- Author:
- Andreas Prlic
-
-
Field Summary
Fields Modifier and Type Field Description static StringBCIF_FORMATstatic StringlineSplitstatic StringMMCIF_FORMATstatic StringMMTF_FORMATstatic StringPDB_CACHE_DIRstatic StringPDB_DIRstatic StringPDB_FORMATstatic StringTMP_DIR
-
Constructor Summary
Constructors Constructor Description UserConfiguration()Default UserConfiguration: split directory autofetch files default download location.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UserConfigurationfromStartupParams(StartupParameters params)StringgetCacheFilePath()LocalPDBDirectory.FetchBehaviorgetFetchBehavior()StringgetFileFormat()LocalPDBDirectory.ObsoleteBehaviorgetObsoleteBehavior()StringgetPdbFilePath()StructureFiletypegetStructureFiletype()voidsetCacheFilePath(String cacheFilePath)voidsetFetchBehavior(LocalPDBDirectory.FetchBehavior fetchBehavior)voidsetFileFormat(String fileFormat)voidsetObsoleteBehavior(LocalPDBDirectory.ObsoleteBehavior obsoleteBehavior)voidsetPdbFilePath(String pdbFilePath)XMLWritertoXML(PrintWriter pw)convert Configuration to an XML file so it can be serializedXMLWritertoXML(XMLWriter xw)convert Configuration to an XML file so it can be serialized add to an already existing xml file.
-
-
-
Field Detail
-
PDB_FORMAT
public static final String PDB_FORMAT
- See Also:
- Constant Field Values
-
MMCIF_FORMAT
public static final String MMCIF_FORMAT
- See Also:
- Constant Field Values
-
MMTF_FORMAT
public static final String MMTF_FORMAT
- See Also:
- Constant Field Values
-
BCIF_FORMAT
public static final String BCIF_FORMAT
- See Also:
- Constant Field Values
-
TMP_DIR
public static final String TMP_DIR
- See Also:
- Constant Field Values
-
PDB_DIR
public static final String PDB_DIR
- See Also:
- Constant Field Values
-
PDB_CACHE_DIR
public static final String PDB_CACHE_DIR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UserConfiguration
public UserConfiguration()
Default UserConfiguration:- split directory
- autofetch files
- default download location. This is the first specified of: if the provided path is not a directory then the system's temp directory is used. A non-writable path is allowed, only a warning will be logged.
- default cache location. This is the first specified of:
- "PDB_CACHE_DIR" system property (for instance, -D"PDB_CACHE_DIR"=/tmp)
- "PDB_CACHE_DIR" environment variable
- the value set for "PDB_DIR"
-
-
Method Detail
-
getPdbFilePath
public String getPdbFilePath()
-
setPdbFilePath
public void setPdbFilePath(String pdbFilePath)
-
getCacheFilePath
public String getCacheFilePath()
-
setCacheFilePath
public void setCacheFilePath(String cacheFilePath)
-
getFetchBehavior
public LocalPDBDirectory.FetchBehavior getFetchBehavior()
-
setFetchBehavior
public void setFetchBehavior(LocalPDBDirectory.FetchBehavior fetchBehavior)
-
getObsoleteBehavior
public LocalPDBDirectory.ObsoleteBehavior getObsoleteBehavior()
-
setObsoleteBehavior
public void setObsoleteBehavior(LocalPDBDirectory.ObsoleteBehavior obsoleteBehavior)
-
toXML
public XMLWriter toXML(PrintWriter pw) throws IOException
convert Configuration to an XML file so it can be serialized- Parameters:
pw-- Returns:
- XMLWriter
- Throws:
IOException
-
toXML
public XMLWriter toXML(XMLWriter xw) throws IOException
convert Configuration to an XML file so it can be serialized add to an already existing xml file.- Parameters:
xw- the XML writer to use- Returns:
- the writer again
- Throws:
IOException- See Also:
ConfigXMLHandler
-
fromStartupParams
public static UserConfiguration fromStartupParams(StartupParameters params)
-
setFileFormat
public void setFileFormat(String fileFormat)
-
getFileFormat
public String getFileFormat()
-
getStructureFiletype
public StructureFiletype getStructureFiletype()
-
-