org.optimizationservices.oscommon.representationparser
Class OSbLWriter

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

public class OSbLWriter
extends OSgLWriter

The OSbLWriter class is used to construct an instance that follows the OSbL 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
OSbLWriter()
          constructor.
 
Method Summary
 boolean addOtherBenchmark(java.lang.String name, java.lang.String value, java.lang.String description)
          Add an other benchmark element.
static void main(java.lang.String[] argv)
          main for test purposes.
 boolean setBenchmarkMessage(java.lang.String message)
          Set the benchmark message.
 boolean setBenchmarkScores(BenchmarkScores scores)
          Set the benchmark scores.
 boolean setBenchmarkStatistics(BenchmarkStatistics benchmarkStatistics)
          Set the benchmark statistics.
 boolean setBenchmarkTime(java.util.GregorianCalendar time)
          Set time of the last benchmark.
 boolean setOptimizationBenchmark(OptimizationBenchmark optimizationBenchmark)
          Set the optimization benchmark information.
 boolean setOSBenchmark(OSBenchmark osBenchmark)
          set the OSBenchmark, a standard os benchmark interface.
 boolean setOtherBenchmarks(java.lang.String[] names, java.lang.String[] values, java.lang.String[] descriptions)
          Set the other benchmark related elements.
 boolean setServiceName(java.lang.String serviceName)
          Set the service name.
 boolean setServiceURI(java.lang.String serviceURI)
          Set the service uri.
 
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

OSbLWriter

public OSbLWriter()
constructor.

Method Detail

setOSBenchmark

public boolean setOSBenchmark(OSBenchmark osBenchmark)
                       throws java.lang.Exception
set the OSBenchmark, a standard os benchmark interface.

Parameters:
osBenchmark - holds the standard os benchmark interface.
Returns:
whether the OSBenchmark is set successfully.
Throws:
java.lang.Exception

setServiceURI

public boolean setServiceURI(java.lang.String serviceURI)
Set the service uri. If the element is already there, it will reset it. If the element is not there (e.g. optional element), it will add it.

Parameters:
serviceURI - holds the service URI.
Returns:
whether the service uri is set successfully.

setServiceName

public boolean setServiceName(java.lang.String serviceName)
Set the service name. If the element is already there, it will reset it. If the element is not there (e.g. optional element), it will add it.

Parameters:
serviceName - holds the service name.
Returns:
whether the service name is set successfully.

setBenchmarkTime

public boolean setBenchmarkTime(java.util.GregorianCalendar time)
Set time of the last benchmark.

Parameters:
time - holds the time of the last benchmark.
Returns:
whether benchmark time is set successfully.

setBenchmarkMessage

public boolean setBenchmarkMessage(java.lang.String message)
Set the benchmark message.

Parameters:
message - holds the benchmark message.
Returns:
whether benchmark message is set successfully.

setBenchmarkScores

public boolean setBenchmarkScores(BenchmarkScores scores)
Set the benchmark scores.

Parameters:
scores - holds the benchmark scores.
Returns:
whether the benchmark scores is set successfully.

setBenchmarkStatistics

public boolean setBenchmarkStatistics(BenchmarkStatistics benchmarkStatistics)
Set the benchmark statistics.

Parameters:
benchmarkStatistics - holds the benchmark statistics.
Returns:
whether the benchmark statistics is set successfully.

setOptimizationBenchmark

public boolean setOptimizationBenchmark(OptimizationBenchmark optimizationBenchmark)
Set the optimization benchmark information.

Parameters:
optimizationBenchmark - holds the optimization benchmark information.
Returns:
whether optimization benchmark information is set successfully.

setOtherBenchmarks

public boolean setOtherBenchmarks(java.lang.String[] names,
                                  java.lang.String[] values,
                                  java.lang.String[] descriptions)
Set the other benchmark related elements.

Parameters:
names - holds the names of the other benchmarks. It is required.
values - holds the values of the other benchmarks, empty String "" if no value for an benchmark.
descriptions - holds the descriptions of the other benchmarks, empty String "" if no value for an benchmark, null for the entire array if none of the benchmarks have descriptions.
Returns:
whether the other benchmarks element construction is successful.

addOtherBenchmark

public boolean addOtherBenchmark(java.lang.String name,
                                 java.lang.String value,
                                 java.lang.String description)
Add an other benchmark element.

Parameters:
name - holds the name of the other benchmark element. It is required.
value - holds the value of the other benchmark element, empty String "" if none.
description - holds the description of the other benchmark element, empty String "" if none.
Returns:
whether the other benchmark element is added successfully.

main

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

Parameters:
argv - command line arguments.