org.optimizationservices.oscommon.representationparser
Class OSsLWriter

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

public class OSsLWriter
extends OSgLWriter

The OSsLWriter class is used to construct an instance that follows the OSsL 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
OSsLWriter()
          constructor
 
Method Summary
static void main(java.lang.String[] argv)
          main for test purposes.
 boolean setInput(java.lang.String[] names, java.lang.String[] types, java.lang.String[] values)
          Set the input related elements.
 boolean setInputElement(java.lang.String name, java.lang.String type, java.lang.String value)
          Set an input el element.
 boolean setOSSimulation(OSSimulation osSimulation)
          set the OSSimulation, a standard os simulation interface.
 boolean setOutput(java.lang.String[] names, java.lang.String[] types, java.lang.String[] values)
          Set the output related elements.
 boolean setOutputElement(java.lang.String name, java.lang.String type, java.lang.String value)
          Set an output el element.
 boolean setSimulationInputElements(SimulationElement[] simulationInputElements)
          set simulation input elements.
 boolean setSimulationOutputElements(SimulationElement[] simulationOutputElements)
          set simulation output 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

OSsLWriter

public OSsLWriter()
constructor

Method Detail

setOSSimulation

public boolean setOSSimulation(OSSimulation osSimulation)
                        throws java.lang.Exception
set the OSSimulation, a standard os simulation interface.

Parameters:
osSimulation - holds the standard os simulation interface.
Returns:
whether the OSSimulation is set successfully.
Throws:
java.lang.Exception

setSimulationInputElements

public boolean setSimulationInputElements(SimulationElement[] simulationInputElements)
set simulation input elements.

Parameters:
simulationInputElements - holds an array of simulation input elements. Each member of array is a simulation element.
Returns:
whether the simulation input elements are set successfully or not.
See Also:
SimulationElement

setSimulationOutputElements

public boolean setSimulationOutputElements(SimulationElement[] simulationOutputElements)
set simulation output elements.

Parameters:
simulationOutputElements - holds an array of simulation output elements. Each member of array is a simulation element.
Returns:
whether the simulation output elements are set successfully or not.
See Also:
SimulationElement

setInput

public boolean setInput(java.lang.String[] names,
                        java.lang.String[] types,
                        java.lang.String[] values)
Set the input related elements. If the elements (e.g. the required elements) are already there, it will reset the them. If the elements are not there (e.g. the optional elements), it will add them.

Parameters:
names - holds the names of the inputs. It is required.
types - holds the types of the inputs, either string (default) or link.
values - holds the values of inputs. It is required.
Returns:
whether the input element construction is successful.

setInputElement

public boolean setInputElement(java.lang.String name,
                               java.lang.String type,
                               java.lang.String value)
Set an input el element. If the el element is already there, it will reset the element. If the elements is not there, it will add the element.

Parameters:
name - holds the name of the input el element. It is required.
type - holds the type of the input el element, either string (default) or link.
value - holds the value of the input el element. It is required.
Returns:
whether the input el element is set successfully.

setOutput

public boolean setOutput(java.lang.String[] names,
                         java.lang.String[] types,
                         java.lang.String[] values)
Set the output related elements. If the elements (e.g. the required elements) are already there, it will reset the them. If the elements are not there (e.g. the optional elements), it will add them.

Parameters:
names - holds the names of the outputs. It is required.
types - holds the types of the outputs, either string (default) or link.
values - holds the values of outputs. It is required.
Returns:
whether the output element construction is successful.

setOutputElement

public boolean setOutputElement(java.lang.String name,
                                java.lang.String type,
                                java.lang.String value)
Set an output el element. If the el element is already there, it will reset the element. If the elements is not there, it will add the element.

Parameters:
name - holds the name of the output el element. It is required.
type - holds the type of the output el element, either string (default) or link.
value - holds the value of the output el element. It is required.
Returns:
whether the output el element is successfully.

main

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

Parameters:
argv - command line arguments.