org.optimizationservices.oscommon.representationparser
Class OSParameterReader

java.lang.Object
  extended by org.optimizationservices.oscommon.representationparser.OSgLReader
      extended by org.optimizationservices.oscommon.representationparser.OSParameterReader

public class OSParameterReader
extends OSgLReader

The OSParameterReader class parses an osParameter instance into a DOM tree and provides a set of "get" methods that can be used to retrieve different pieces of information of the instance.

Since:
OS 1.0
Version:
1.0, 03/14/2004
Author:
Robert Fourer, Jun Ma, Kipp Martin

Field Summary
 
Fields inherited from class org.optimizationservices.oscommon.representationparser.OSgLReader
m_document
 
Constructor Summary
OSParameterReader()
          Constructor.
OSParameterReader(boolean validate)
          constructor
 
Method Summary
 java.lang.String getOSParameterDescriptionByName(java.lang.String name)
          Get the string value from the os parameter hash map.
 java.lang.String[] getOSParameterDescriptions()
          Get the descriptions of all os parameters.
 java.lang.String[] getOSParameterNames()
          Get the names of all os parameters.
 int getOSParameterNumber()
          Get the number of os parameters.
 java.util.HashMap getOSParameters()
          Get the hash map of os parameters.
 java.lang.String getOSParameterValueByName(java.lang.String name)
          Get the string value from the os parameter hash map.
 java.lang.String[] getOSParameterValues()
          Get the values of all os parameters.
static void main(java.lang.String[] argv)
          main for test purposes.
 
Methods inherited from class org.optimizationservices.oscommon.representationparser.OSgLReader
getDocument, getRootElement, isValidate, readFile, readString, setDocument, setRootElement, setValidate, writeToFile, writeToSring, writeToStandardOutput
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OSParameterReader

public OSParameterReader(boolean validate)
constructor

Parameters:
validate - holds whether the reader should be validating against the schema or not.

OSParameterReader

public OSParameterReader()
Constructor.

Method Detail

getOSParameters

public java.util.HashMap getOSParameters()
Get the hash map of os parameters.

Returns:
the hash map of os parameters.

getOSParameterNumber

public int getOSParameterNumber()
Get the number of os parameters.

Returns:
the number of os parameters.

getOSParameterValueByName

public java.lang.String getOSParameterValueByName(java.lang.String name)
Get the string value from the os parameter hash map.

Parameters:
name - holds the name of option to get.
Returns:
string value from the os parameter hash map, null if none.

getOSParameterDescriptionByName

public java.lang.String getOSParameterDescriptionByName(java.lang.String name)
Get the string value from the os parameter hash map.

Parameters:
name - holds the name of option to get.
Returns:
string value from the os parameter hash map, null if none.

getOSParameterNames

public java.lang.String[] getOSParameterNames()
Get the names of all os parameters.

Returns:
the names of all os parameters.

getOSParameterValues

public java.lang.String[] getOSParameterValues()
Get the values of all os parameters.

Returns:
the values of all os parameters.

getOSParameterDescriptions

public java.lang.String[] getOSParameterDescriptions()
Get the descriptions of all os parameters.

Returns:
the descriptions of all os parameters.

main

public static void main(java.lang.String[] argv)
main for test purposes.

Parameters:
argv - command line arguments.