Class UserConfiguration


  • public class UserConfiguration
    extends java.lang.Object
    A container to persist config to the file system
    Author:
    Andreas Prlic
    • Constructor Detail

      • UserConfiguration

        public UserConfiguration()
        Default UserConfiguration:
        • split directory
        • autofetch files
        • default download location. This is the first specified of:
          1. "PDB_DIR" system property (for instance, -D"PDB_DIR"=/tmp)
          2. "PDB_DIR" environment variable
          3. System temp directory (java.io.tmpdir property)
          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:
          1. "PDB_CACHE_DIR" system property (for instance, -D"PDB_CACHE_DIR"=/tmp)
          2. "PDB_CACHE_DIR" environment variable
          3. the value set for "PDB_DIR"
          if the provided path is not a directory or is not writable then the system's temp directory is used.
    • Method Detail

      • getPdbFilePath

        public java.lang.String getPdbFilePath()
      • setPdbFilePath

        public void setPdbFilePath​(java.lang.String pdbFilePath)
      • getCacheFilePath

        public java.lang.String getCacheFilePath()
      • setCacheFilePath

        public void setCacheFilePath​(java.lang.String cacheFilePath)
      • getAutoFetch

        @Deprecated
        public boolean getAutoFetch()
        Deprecated.
      • setAutoFetch

        @Deprecated
        public void setAutoFetch​(boolean autoFetch)
        Deprecated.
      • toXML

        public XMLWriter toXML​(java.io.PrintWriter pw)
                        throws java.io.IOException
        convert Configuration to an XML file so it can be serialized
        Parameters:
        pw -
        Returns:
        XMLWriter
        Throws:
        java.io.IOException
      • toXML

        public XMLWriter toXML​(XMLWriter xw)
                        throws java.io.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:
        java.io.IOException
        See Also:
        ConfigXMLHandler
      • setFileFormat

        public void setFileFormat​(java.lang.String fileFormat)
      • getFileFormat

        public java.lang.String getFileFormat()