org.optimizationservices.oscommon.representationparser
Class OSParameterWriter

java.lang.Object
  extended by org.optimizationservices.oscommon.representationparser.OSgLWriter
      extended by org.optimizationservices.oscommon.representationparser.OSParameterWriter

public class OSParameterWriter
extends OSgLWriter

The OSParameterWriter class is used to construct an instance that follows the OSParameter format.

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.OSgLWriter
m_document
 
Constructor Summary
OSParameterWriter()
          Constructor.
 
Method Summary
 boolean addOSParameter(java.lang.String name, java.lang.String value, java.lang.String description)
          Add an os parameter element.
static void main(java.lang.String[] argv)
          main for test purposes.
 boolean setOSParameters(java.lang.String[] names, java.lang.String[] values, java.lang.String[] descriptions)
          Set the os parameter related elements.
 
Methods inherited from class org.optimizationservices.oscommon.representationparser.OSgLWriter
getDocument, setDocument, writeToFile, writeToSring, writeToStandardOutput
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OSParameterWriter

public OSParameterWriter()
Constructor.

Method Detail

setOSParameters

public boolean setOSParameters(java.lang.String[] names,
                               java.lang.String[] values,
                               java.lang.String[] descriptions)
Set the os parameter related elements.

Parameters:
names - holds the names of the os parameter. It is required.
values - holds the values of the os parameter, empty string "" if no value for an option.
descriptions - holds the descriptions of the os parameter, empty string "" if no value for an option, null for the entire array if none of the options have descriptions.
Returns:
whether the os parameter element construction is successful.

addOSParameter

public boolean addOSParameter(java.lang.String name,
                              java.lang.String value,
                              java.lang.String description)
Add an os parameter element.

Parameters:
name - holds the name of the os parameter element. It is required.
value - holds the value of the os parameter element, empty string "" if none.
description - holds the description of the os parameter element, empty string "" if none.
Returns:
whether the os parameter element is added successfully.

main

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

Parameters:
argv - command line arguments.