org.optimizationservices.oscommon.representationparser
Class OSeLWriter

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

public class OSeLWriter
extends OSgLWriter

The OSeLWriter class is used to construct an instance that follows the OSeL 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
OSeLWriter()
          constructor.
 
Method Summary
 boolean addOtherEntityInfo(java.lang.String name, java.lang.String value, java.lang.String description)
          Add an other entity info element.
static void main(java.lang.String[] argv)
          main for test purposes.
 boolean setAccessLimits(AccessLimits accessLimits)
          Set the access limit information of the service entity.
 boolean setDefaultOptionNamesAndValues(OSOption osOption)
          Set the default option names and values in the standard OSOption structure which is specified by the OSoL schema.
 boolean setKeyWords(java.lang.String[] keyWords)
          Set the key words of the service.
 boolean setLicenseRequired(boolean licenseRequired)
          Set whether the license is reqired of the service or not.
 boolean setLinks(Link[] links)
          Set the links of the service.
 boolean setMessage(java.lang.String message)
          Set the message.
 boolean setOptimizationConstraintDifferentiability(java.lang.String constraintDifferentiability)
          Set the optimization constraint differentiability.
 boolean setOptimizationConstraintLinearity(java.lang.String constraintLinearity)
          Set the optimization constraint linearity.
 boolean setOptimizationConstraintType(java.lang.String constraintType)
          Set the optimization constraint type.
 boolean setOptimizationDescription(java.lang.String description)
          Set the optimization description.
 boolean setOptimizationFunctionType(FunctionType functionType)
          Set the function types that the service supports.
 boolean setOptimizationObjectiveDifferentiability(java.lang.String objectiveDifferentiability)
          Set the optimization objective differentiability.
 boolean setOptimizationObjectiveLinearity(java.lang.String objectiveLinearity)
          Set the optimization objective linearity.
 boolean setOptimizationObjectiveType(java.lang.String objectiveType)
          Set the optimization objective type.
 boolean setOptimizationParameterType(java.lang.String parameterType)
          Set the optimization parameter type.
 boolean setOptimizationRealTime(boolean realTime)
          Set whether the service supports real time optimization or not.
 boolean setOptimizationSpecialAlgorithm(SpecialAlgorithm specialAlgorithm)
          Set the special algorithms that the service supports.
 boolean setOptimizationSpecialStructure(SpecialStructure specialStructure)
          Set the special structures that the service supports.
 boolean setOptimizationStochasticity(java.lang.String stochasticity)
          Set the optimization stochasticity.
 boolean setOptimizationVariableType(java.lang.String variableType)
          Set the optimization variable type.
 boolean setOSEntity(OSEntity osEntity)
          set the OSEntity, a standard os entity interface.
 boolean setOtherEntityInfo(java.lang.String[] names, java.lang.String[] values, java.lang.String[] descriptions)
          Set the other entity info related elements.
 boolean setOwner(Owner owner)
          Set the owner information of the service entity.
 boolean setPasswordRequired(boolean passwordRequired)
          Set whether the password is reqired of the service or not.
 boolean setRegistrationDate(java.util.GregorianCalendar date)
          Set time of the registration date.
 boolean setServiceAlgorithmDescription(java.lang.String algorithmDescription)
          Set the algorithm description.
 boolean setServiceCategory(java.lang.String category)
          Set the service category.
 boolean setServiceDescription(java.lang.String description)
          Set the service description.
 boolean setServiceLogoImageLink(java.lang.String logoImageLink)
          Set the service logo image link.
 boolean setServiceName(java.lang.String serviceName)
          Set service name.
 boolean setServiceSoftwareDescription(java.lang.String softwareDescription)
          Set the service software description.
 boolean setServiceType(java.lang.String type)
          Set the service type.
 boolean setServiceURI(java.lang.String serviceURI)
          Set service uri.
 boolean setServiceWebPage(java.lang.String webPage)
          Set the service web page.
 boolean setServiceWSDLLocation(java.lang.String wsdlLocation)
          Set the service wsdl location.
 boolean setSystemDedication(double dedication)
          Set the system dedication.
 boolean setSystemDescription(java.lang.String description)
          Set the system description.
 boolean setSystemHardwareInfo(HardwareInfo hardwareInfo)
          Set the system hardware information.
 boolean setUserNameRequired(boolean userNameRequired)
          Set whether the user name is reqired of the service or not.
 
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

OSeLWriter

public OSeLWriter()
constructor.

Method Detail

setOSEntity

public boolean setOSEntity(OSEntity osEntity)
                    throws java.lang.Exception
set the OSEntity, a standard os entity interface.

Parameters:
osEntity - holds the standard os entity interface.
Returns:
whether the OSEntity is set successfully
Throws:
java.lang.Exception - if there are errors setting the OSEntity.

setServiceURI

public boolean setServiceURI(java.lang.String serviceURI)
Set service uri.

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

setServiceName

public boolean setServiceName(java.lang.String serviceName)
Set service name.

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

setRegistrationDate

public boolean setRegistrationDate(java.util.GregorianCalendar date)
Set time of the registration date.

Parameters:
date - holds the registration date.
Returns:
whether registration date is set successfully.

setMessage

public boolean setMessage(java.lang.String message)
Set the message.

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

setLicenseRequired

public boolean setLicenseRequired(boolean licenseRequired)
Set whether the license is reqired of the service or not.

Parameters:
licenseRequired - holds whether the license is reqired of the service or not.
Returns:
whether the licenseRequired is set successfully or not.

setUserNameRequired

public boolean setUserNameRequired(boolean userNameRequired)
Set whether the user name is reqired of the service or not.

Parameters:
userNameRequired - holds whether the user name is reqired of the service or not.
Returns:
whether the userNameRequired is set successfully or not.

setPasswordRequired

public boolean setPasswordRequired(boolean passwordRequired)
Set whether the password is reqired of the service or not.

Parameters:
passwordRequired - holds whether the password is reqired of the service or not.
Returns:
whether the passwordRequired is set successfully or not.

setAccessLimits

public boolean setAccessLimits(AccessLimits accessLimits)
Set the access limit information of the service entity.

Parameters:
accessLimits - holds the access limit information.
Returns:
whether the access limit information is set successfully or not.

setOwner

public boolean setOwner(Owner owner)
Set the owner information of the service entity.

Parameters:
owner - holds the service owner.
Returns:
whether the owner information is set successfully or not.

setKeyWords

public boolean setKeyWords(java.lang.String[] keyWords)
Set the key words of the service.

Parameters:
keyWords - holds the service key words.
Returns:
whether the key words of the service are set successfully or not.

setLinks

public boolean setLinks(Link[] links)
Set the links of the service.

Parameters:
links - holds a Link array of the service links.
Returns:
whether the links of the service are set successfully.

setSystemDescription

public boolean setSystemDescription(java.lang.String description)
Set the system description.

Parameters:
description - holds the system description.
Returns:
whether the system description is set successfully or not.

setSystemDedication

public boolean setSystemDedication(double dedication)
Set the system dedication.

Parameters:
dedication - holds the system dedication, a double between 0 and 1 with 1 being fully dedicated.
Returns:
whether the system dedication. is set successfully or not.

setSystemHardwareInfo

public boolean setSystemHardwareInfo(HardwareInfo hardwareInfo)
Set the system hardware information.

Parameters:
hardwareInfo - holds the system hardware information.
Returns:
whether the system hardware information is set successfully or not.

setServiceDescription

public boolean setServiceDescription(java.lang.String description)
Set the service description.

Parameters:
description - holds the service description.
Returns:
whether the service description is set successfully or not.

setServiceType

public boolean setServiceType(java.lang.String type)
Set the service type.

Parameters:
type - holds the service type, which can be: solver, analyzer, scheduler, simulation, registry, modeler, agent
Returns:
whether the service type is set successfully or not.

setServiceCategory

public boolean setServiceCategory(java.lang.String category)
Set the service category.

Parameters:
category - holds the service category, which can be: education, government, organization, company, military, personal, other
Returns:
whether the service category is set successfully or not.

setServiceSoftwareDescription

public boolean setServiceSoftwareDescription(java.lang.String softwareDescription)
Set the service software description.

Parameters:
softwareDescription - holds the software description.
Returns:
whether the software description is set successfully or not.

setServiceAlgorithmDescription

public boolean setServiceAlgorithmDescription(java.lang.String algorithmDescription)
Set the algorithm description.

Parameters:
algorithmDescription - holds the algorithm description.
Returns:
whether the algorithm description is set successfully or not.

setServiceWebPage

public boolean setServiceWebPage(java.lang.String webPage)
Set the service web page.

Parameters:
webPage - holds the service web page.
Returns:
whether the service web page is set successfully or not.

setServiceWSDLLocation

public boolean setServiceWSDLLocation(java.lang.String wsdlLocation)
Set the service wsdl location.

Parameters:
wsdlLocation - holds the service wsdl location.
Returns:
whether the service wsdlLocation is set successfully or not.

setServiceLogoImageLink

public boolean setServiceLogoImageLink(java.lang.String logoImageLink)
Set the service logo image link.

Parameters:
logoImageLink - holds the service logo image link.
Returns:
whether the service logoImageLink is set successfully or not.

setDefaultOptionNamesAndValues

public boolean setDefaultOptionNamesAndValues(OSOption osOption)
Set the default option names and values in the standard OSOption structure which is specified by the OSoL schema.

Parameters:
osOption - holds the default option names and values in the standard OSOption structure.
Returns:
wehter the the default option names and values are set successfully or not.

setOptimizationDescription

public boolean setOptimizationDescription(java.lang.String description)
Set the optimization description.

Parameters:
description - holds the optimization description.
Returns:
whether the optimization description is set successfully or not.

setOptimizationVariableType

public boolean setOptimizationVariableType(java.lang.String variableType)
Set the optimization variable type.

Parameters:
variableType - holds the optimization variable type, which can be: continuous, pureBinary, mixedBinary, pureInteger, mixedInteger, discrete
Returns:
whether the optimization variable type is set successfully or not.

setOptimizationObjectiveType

public boolean setOptimizationObjectiveType(java.lang.String objectiveType)
Set the optimization objective type.

Parameters:
objectiveType - holds the optimization objective type, which can be: none, singleObjective, multiObjectives
Returns:
whether the optimization objective type is set successfully or not.

setOptimizationConstraintType

public boolean setOptimizationConstraintType(java.lang.String constraintType)
Set the optimization constraint type.

Parameters:
constraintType - holds the optimization constraint type, which can be: generalRange, pureEquality, pureBound, pureLinearComplementarity, pureNonlinearComplementarity, linearMixedComplementarity, nonlinearMixedComplementarity, generalMixedComplementarity, pureCone, mixedCone.
Returns:
whether the optimization constraint type is set successfully or not.

setOptimizationObjectiveLinearity

public boolean setOptimizationObjectiveLinearity(java.lang.String objectiveLinearity)
Set the optimization objective linearity.

Parameters:
objectiveLinearity - holds the optimization objective linearity, which can be: none, linearNetwork, linear sumOfSquares, convexQuadratic, convexNonlinear, generalQuadratic, generalNonlinear
Returns:
whether the optimization objective linearity is set successfully or not.

setOptimizationConstraintLinearity

public boolean setOptimizationConstraintLinearity(java.lang.String constraintLinearity)
Set the optimization constraint linearity.

Parameters:
constraintLinearity - holds the optimization constraint linearity, which can be: none, bound, linearNetwork, linear, convexQuadratic, convexNonlinear, generalQuadratic, generalNonlinear
Returns:
whether the optimization constraint linearity is set successfully or not.

setOptimizationObjectiveDifferentiability

public boolean setOptimizationObjectiveDifferentiability(java.lang.String objectiveDifferentiability)
Set the optimization objective differentiability.

Parameters:
objectiveDifferentiability - holds the optimization objective differentiability, which can be: generallyDifferentiable, twiceDifferentiable, firstDifferentiable, nonDifferentiableContinous, nonContinuous, simulation.
Returns:
whether the optimization objective differentiability is set successfully or not.

setOptimizationConstraintDifferentiability

public boolean setOptimizationConstraintDifferentiability(java.lang.String constraintDifferentiability)
Set the optimization constraint differentiability.

Parameters:
constraintDifferentiability - holds the optimization constraint differentiability, which can be: generallyDifferentiable, twiceDifferentiable, firstDifferentiable, nonDifferentiableContinous, nonContinuous, simulation.
Returns:
whether the optimization constraint differentiability is set successfully or not.

setOptimizationParameterType

public boolean setOptimizationParameterType(java.lang.String parameterType)
Set the optimization parameter type.

Parameters:
parameterType - holds the optimization parameter type, which can be: number, string, both
Returns:
whether the optimization parameter type is set successfully or not.

setOptimizationStochasticity

public boolean setOptimizationStochasticity(java.lang.String stochasticity)
Set the optimization stochasticity.

Parameters:
tochasticity - holds the optimization stochasticity, which can be: deterministic, stochastic, both
Returns:
whether the optimization stochasticity is set successfully or not.

setOptimizationRealTime

public boolean setOptimizationRealTime(boolean realTime)
Set whether the service supports real time optimization or not.

Parameters:
realTime - holds whether the service supports real time optimization or not.
Returns:
whether the service supports real time optimization or not.

setOptimizationFunctionType

public boolean setOptimizationFunctionType(FunctionType functionType)
Set the function types that the service supports.

Parameters:
functionType - holds the function types that the service supports.
Returns:
the function types that the service supports.

setOptimizationSpecialStructure

public boolean setOptimizationSpecialStructure(SpecialStructure specialStructure)
Set the special structures that the service supports.

Parameters:
specialStructure - holds the special structures that the service supports.
Returns:
the special structures that the service supports.

setOptimizationSpecialAlgorithm

public boolean setOptimizationSpecialAlgorithm(SpecialAlgorithm specialAlgorithm)
Set the special algorithms that the service supports.

Parameters:
specialAlgorithm - holds the special algorithms that the service supports.
Returns:
the special algorithms that the service supports.

setOtherEntityInfo

public boolean setOtherEntityInfo(java.lang.String[] names,
                                  java.lang.String[] values,
                                  java.lang.String[] descriptions)
Set the other entity info related elements.

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

addOtherEntityInfo

public boolean addOtherEntityInfo(java.lang.String name,
                                  java.lang.String value,
                                  java.lang.String description)
Add an other entity info element.

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

main

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

Parameters:
argv - command line arguments.