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 String
BCIF_FORMAT
static String
lineSplit
static String
MMCIF_FORMAT
static String
MMTF_FORMAT
static String
PDB_CACHE_DIR
static String
PDB_DIR
static String
PDB_FORMAT
static String
TMP_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 UserConfiguration
fromStartupParams(StartupParameters params)
String
getCacheFilePath()
LocalPDBDirectory.FetchBehavior
getFetchBehavior()
String
getFileFormat()
LocalPDBDirectory.ObsoleteBehavior
getObsoleteBehavior()
String
getPdbFilePath()
StructureFiletype
getStructureFiletype()
void
setCacheFilePath(String cacheFilePath)
void
setFetchBehavior(LocalPDBDirectory.FetchBehavior fetchBehavior)
void
setFileFormat(String fileFormat)
void
setObsoleteBehavior(LocalPDBDirectory.ObsoleteBehavior obsoleteBehavior)
void
setPdbFilePath(String pdbFilePath)
XMLWriter
toXML(PrintWriter pw)
convert Configuration to an XML file so it can be serializedXMLWriter
toXML(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()
-
-