edu.iris.dmc.pdcc.util
Class PdccConfigUtil

java.lang.Object
  extended byedu.iris.dmc.pdcc.util.PdccConfigUtil

public class PdccConfigUtil
extends java.lang.Object

Utility class for reading and querying PDCC configuration settings

Version:
1/8/2004
Author:
Robert Casey, IRIS DMC

Constructor Summary
PdccConfigUtil(java.lang.String configFile)
          Instantiate Config util by reading indicated filename.
 
Method Summary
 java.util.Vector getCategories(java.lang.String name)
          Get a list of configuration categories associated with a particular unique name.
 java.util.Vector getKeywords(java.lang.String category, java.lang.String name)
          Get a list of parameter keywords associated with a configuration category and unique name.
 java.util.Vector getNames()
          Get a list of unique names in the configuration file.
 java.lang.String getStartName()
          return the unique name associated with the initial application mode to run.
 java.lang.String getValue(java.lang.String category, java.lang.String name, java.lang.String keyword)
          Get parameter value that results from the mapping of category, unique name, and keyword.
static void main(java.lang.String[] args)
          Command line test.
 void readConfigs(java.lang.String configFile)
          Populate this Util object with a mapping of configuration settings as presented in configFile.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdccConfigUtil

public PdccConfigUtil(java.lang.String configFile)
               throws java.lang.Exception
Instantiate Config util by reading indicated filename.

Method Detail

readConfigs

public void readConfigs(java.lang.String configFile)
                 throws java.lang.Exception
Populate this Util object with a mapping of configuration settings as presented in configFile. Mappings are as follows: configCategoryMap: uniqueName --> category vector configKeyMap: uniqueName:category --> paramKey vector configValueMap: uniqueName:category:paramKey --> paramValue

Throws:
java.lang.Exception

getValue

public java.lang.String getValue(java.lang.String category,
                                 java.lang.String name,
                                 java.lang.String keyword)
Get parameter value that results from the mapping of category, unique name, and keyword.


getKeywords

public java.util.Vector getKeywords(java.lang.String category,
                                    java.lang.String name)
Get a list of parameter keywords associated with a configuration category and unique name.


getCategories

public java.util.Vector getCategories(java.lang.String name)
Get a list of configuration categories associated with a particular unique name.


getNames

public java.util.Vector getNames()
Get a list of unique names in the configuration file.


getStartName

public java.lang.String getStartName()
return the unique name associated with the initial application mode to run.


main

public static void main(java.lang.String[] args)
Command line test.



brought to you by Incorporated Research Institutions for Seismology
June 29 2006