Documentation of 'org.jgap.data.config.ConfigFileReader' Java class
ConfigFileReader
org.jgap.data.config

Class ConfigFileReader



  • public class ConfigFileReader
    extends java.lang.Object
    This is a Singleton Helper class to read a JGAP config file and provide a simple interface to the config properties.
    Since:
    2.3
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getValue(java.lang.String a_name)
      Retrieve the value for the property with the name as in param name.
      java.util.List getValues(java.lang.String a_name)
      Retrieve the values for the property with the name as in param name.
      static ConfigFileReader instance()
      Method to create and access the Singleton ConfigFileReader instance.
      void setFileName(java.lang.String a_fileName)
      Set the config file to load from.
      void setNS(java.lang.String a_ns)
      Set the namespace for the properties that are being read from the config file at this point.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • instance

        public static ConfigFileReader instance()
        Method to create and access the Singleton ConfigFileReader instance.
        Returns:
        instance of the ConfigFileReader
        Since:
        2.3
      • getValue

        public java.lang.String getValue(java.lang.String a_name)
        Retrieve the value for the property with the name as in param name.
        Parameters:
        a_name - name of the property of which the value is required
        Returns:
        value for the property with the name as in param name, null if property not found
        Since:
        2.3
      • getValues

        public java.util.List getValues(java.lang.String a_name)
        Retrieve the values for the property with the name as in param name.
        Parameters:
        a_name - the name of the property of which the value is required
        Returns:
        ArrayList of Strings with values for the property with the name as in param name, null if property not found
      • setNS

        public void setNS(java.lang.String a_ns)
        Set the namespace for the properties that are being read from the config file at this point.
        Parameters:
        a_ns - namespace for the properties being read
      • setFileName

        public void setFileName(java.lang.String a_fileName)
                         throws ConfigException
        Set the config file to load from. Everytime this method is called, properties are reloaded from the config file.
        Parameters:
        a_fileName - Name of the config file.
        Throws:
        ConfigException
        Since:
        2.3

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.