org.optimizationservices.oscommon.representationparser
Class OSeLReader

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

public class OSeLReader
extends OSgLReader

The OSeLReader class parses an OSeL 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
OSeLReader()
          Default constructor.
OSeLReader(boolean validate)
          constructor.
 
Method Summary
 AccessLimits getAccessLimits()
          Get the access limits of the service.
 OSOption getDefaultOptionNamesAndValues()
          Get the default option names and values in the standard OSOption structure which is specified by the OSoL schema.
 java.lang.String[] getKeyWords()
          Get the key words of the service.
 boolean getLicenseRequired()
          Get whether the license is reqired of the service or not.
 Link[] getLinks()
          Get the links of the service.
 java.lang.String getMessage()
          Get the message.
 java.lang.String getOptimizationConstraintDifferentiability()
          Get the optimization constraint differentiability, which can be: generallyDifferentiable, twiceDifferentiable, firstDifferentiable, nonDifferentiableContinous, nonContinuous, simulation.
 java.lang.String getOptimizationConstraintLinearity()
          Get the constraint objective linearity, which can be: none, bound, linearNetwork, linear, convexQuadratic, convexNonlinear, generalQuadratic, generalNonlinear
 java.lang.String getOptimizationConstraintType()
          Get the optimization constraint type, which can be: generalRange, pureEquality, pureBound, pureLinearComplementarity, pureNonlinearComplementarity, linearMixedComplementarity, nonlinearMixedComplementarity, generalMixedComplementarity, pureCone, mixedCone.
 java.lang.String getOptimizationDescription()
          Get the optimization description.
 FunctionType getOptimizationFunctionType()
          Get the function types that the service supports.
 java.lang.String getOptimizationObjectiveDifferentiability()
          Get the optimization objective differentiability, which can be: generallyDifferentiable, twiceDifferentiable, firstDifferentiable, nonDifferentiableContinous, nonContinuous, simulation.
 java.lang.String getOptimizationObjectiveLinearity()
          Get the optimization objective linearity, which can be: none, linearNetwork, linear, sumOfSquares, convexQuadratic, convexNonlinear, generalQuadratic, generalNonlinear
 java.lang.String getOptimizationObjectiveType()
          Get the optimization objective type, which can be: none, singleObjective, multiObjectives
 java.lang.String getOptimizationParameterType()
          Get the optimization parameter type, which can be: number, string, both
 boolean getOptimizationRealTime()
          Get whether the service supports real time optimization or not.
 SpecialAlgorithm getOptimizationSpecialAlgorithm()
          Get the special algorithms that the service supports.
 SpecialStructure getOptimizationSpecialStructure()
          Get the special structures that the service supports.
 java.lang.String getOptimizationStochasticity()
          Get the optimization stochasticity, which can be: deterministic, stochastic, both
 java.lang.String getOptimizationVariableType()
          Get the optimization variable type, which can be: continuous, pureBinary, mixedBinary, pureInteger, mixedInteger, discrete.
 OSEntity getOSEntity()
          get the standard OSEntity, a local interface for storing Optimization Services entity.
 java.lang.String getOtherEntityDescriptionByName(java.lang.String name)
          Get the String value from the other entity info hash map.
 java.lang.String[] getOtherEntityDescriptions()
          Get the descriptions of all other entity info.
 java.util.HashMap<java.lang.String,java.lang.String> getOtherEntityInfo()
          Get the hash map of other entity information.
 java.lang.String[] getOtherEntityInfoNames()
          Get the names of all other entity info.
 int getOtherEntityInfoNumber()
          Get the number of other entity info.
 java.lang.String getOtherEntityInfoValueByName(java.lang.String name)
          Get the String value from the other entity info hash map.
 java.lang.String[] getOtherEntityInfoValues()
          Get the values of all other entity info.
 Owner getOwner()
          Get the owner information of the service entity.
 boolean getPasswordRequired()
          Get whether the password is reqired of the service or not.
 java.util.GregorianCalendar getRegistrationDate()
          Get time of the registration date.
 java.lang.String getServiceAlgorithmDescription()
          Get the service algorithm description.
 java.lang.String getServiceCategory()
          Get the service category, which can be: education, government, organization, company, military, personal, other
 java.lang.String getServiceDescription()
          Get the service description.
 java.lang.String getServiceLogoImageLink()
          Get the service logo image link.
 java.lang.String getServiceName()
          Get the service name.
 java.lang.String getServiceSoftwareDescription()
          Get the service software description.
 java.lang.String getServiceType()
          Get the service type, which can be: solver, analyzer, scheduler, simulation, registry, modeler, agent
 java.lang.String getServiceURI()
          Get the service uri.
 java.lang.String getServiceWebPage()
          Get the service web page.
 java.lang.String getServiceWSDLLocation()
          Get the service wsdl location.
 double getSystemDedication()
          Get the system dedication, a double between 0 and 1 with 1 being fully dedicated.
 java.lang.String getSystemDescription()
          Get the system description.
 HardwareInfo getSystemHardwareInfo()
          Get the system hardware information.
 boolean getUserNameRequired()
          Get whether the user name is reqired of the service or not.
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

OSeLReader

public OSeLReader(boolean validate)
constructor.

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

OSeLReader

public OSeLReader()
Default constructor.

Method Detail

getOSEntity

public OSEntity getOSEntity()
                     throws java.lang.Exception
get the standard OSEntity, a local interface for storing Optimization Services entity.

Returns:
the OSEntity.
Throws:
java.lang.Exception - if there are errors getting the OSEntity.

getServiceURI

public java.lang.String getServiceURI()
Get the service uri.

Returns:
the service uri

getServiceName

public java.lang.String getServiceName()
Get the service name.

Returns:
the service name

getRegistrationDate

public java.util.GregorianCalendar getRegistrationDate()
Get time of the registration date.

Returns:
the time of the registration date.

getMessage

public java.lang.String getMessage()
Get the message.

Returns:
the message.

getLicenseRequired

public boolean getLicenseRequired()
Get whether the license is reqired of the service or not.

Returns:
whether the license is reqired of the service or not.

getUserNameRequired

public boolean getUserNameRequired()
Get whether the user name is reqired of the service or not.

Returns:
whether the user name is reqired of the service or not.

getPasswordRequired

public boolean getPasswordRequired()
Get whether the password is reqired of the service or not.

Returns:
whether the password is reqired of the service or not.

getAccessLimits

public AccessLimits getAccessLimits()
Get the access limits of the service.

Returns:
the access limits information of the service entity; null if none.

getOwner

public Owner getOwner()
Get the owner information of the service entity.

Returns:
the owner information of the service entity; null if none.

getKeyWords

public java.lang.String[] getKeyWords()
Get the key words of the service.

Returns:
the key words in a string array; null if none.

getLinks

public Link[] getLinks()
Get the links of the service.

Returns:
the links of the service; null if none.

getSystemDescription

public java.lang.String getSystemDescription()
Get the system description.

Returns:
the system description; null or empty string if none.

getSystemDedication

public double getSystemDedication()
Get the system dedication, a double between 0 and 1 with 1 being fully dedicated.

Returns:
the system dedication; Double.NaN if none.

getSystemHardwareInfo

public HardwareInfo getSystemHardwareInfo()
Get the system hardware information.

Returns:
the system hardware information; null if none.

getServiceDescription

public java.lang.String getServiceDescription()
Get the service description.

Returns:
the service description; null or empty string if none.

getServiceType

public java.lang.String getServiceType()
Get the service type, which can be: solver, analyzer, scheduler, simulation, registry, modeler, agent

Returns:
the service type; null or empty string if none.

getServiceCategory

public java.lang.String getServiceCategory()
Get the service category, which can be: education, government, organization, company, military, personal, other

Returns:
the service category; null or empty string if none.

getServiceSoftwareDescription

public java.lang.String getServiceSoftwareDescription()
Get the service software description.

Returns:
the software description; null or empty string if none.

getServiceAlgorithmDescription

public java.lang.String getServiceAlgorithmDescription()
Get the service algorithm description.

Returns:
the algorithm description; null or empty string if none.

getServiceWebPage

public java.lang.String getServiceWebPage()
Get the service web page.

Returns:
the service web page; null or empty string if none.

getServiceWSDLLocation

public java.lang.String getServiceWSDLLocation()
Get the service wsdl location.

Returns:
the service wsdl location; null or empty string if none.

getServiceLogoImageLink

public java.lang.String getServiceLogoImageLink()
Get the service logo image link.

Returns:
the service logo image link; null or empty string if none.

getDefaultOptionNamesAndValues

public OSOption getDefaultOptionNamesAndValues()
Get the default option names and values in the standard OSOption structure which is specified by the OSoL schema.

Returns:
the default option names and values in the standard OSOption structure, null if none.

getOptimizationDescription

public java.lang.String getOptimizationDescription()
Get the optimization description.

Returns:
the optimization description; null or empty string if none.

getOptimizationVariableType

public java.lang.String getOptimizationVariableType()
Get the optimization variable type, which can be: continuous, pureBinary, mixedBinary, pureInteger, mixedInteger, discrete.

Returns:
the optimization variable type; null or empty string if none.

getOptimizationObjectiveType

public java.lang.String getOptimizationObjectiveType()
Get the optimization objective type, which can be: none, singleObjective, multiObjectives

Returns:
the optimization objective type; null or empty string if none.

getOptimizationConstraintType

public java.lang.String getOptimizationConstraintType()
Get the optimization constraint type, which can be: generalRange, pureEquality, pureBound, pureLinearComplementarity, pureNonlinearComplementarity, linearMixedComplementarity, nonlinearMixedComplementarity, generalMixedComplementarity, pureCone, mixedCone.

Returns:
the optimization constraint type; null or empty string if none.

getOptimizationObjectiveLinearity

public java.lang.String getOptimizationObjectiveLinearity()
Get the optimization objective linearity, which can be: none, linearNetwork, linear, sumOfSquares, convexQuadratic, convexNonlinear, generalQuadratic, generalNonlinear

Returns:
the optimization objective linearity; null or empty string if none.

getOptimizationConstraintLinearity

public java.lang.String getOptimizationConstraintLinearity()
Get the constraint objective linearity, which can be: none, bound, linearNetwork, linear, convexQuadratic, convexNonlinear, generalQuadratic, generalNonlinear

Returns:
the optimization constraint linearity; null or empty string if none.

getOptimizationObjectiveDifferentiability

public java.lang.String getOptimizationObjectiveDifferentiability()
Get the optimization objective differentiability, which can be: generallyDifferentiable, twiceDifferentiable, firstDifferentiable, nonDifferentiableContinous, nonContinuous, simulation.

Returns:
the optimization objective differentiability; null or empty string if none.

getOptimizationConstraintDifferentiability

public java.lang.String getOptimizationConstraintDifferentiability()
Get the optimization constraint differentiability, which can be: generallyDifferentiable, twiceDifferentiable, firstDifferentiable, nonDifferentiableContinous, nonContinuous, simulation.

Returns:
the optimization constraint differentiability; null or empty string if none.

getOptimizationParameterType

public java.lang.String getOptimizationParameterType()
Get the optimization parameter type, which can be: number, string, both

Returns:
the optimization parameter type; null or empty string if none.

getOptimizationStochasticity

public java.lang.String getOptimizationStochasticity()
Get the optimization stochasticity, which can be: deterministic, stochastic, both

Returns:
the optimization stochasticity; null or empty string if none.

getOptimizationRealTime

public boolean getOptimizationRealTime()
Get whether the service supports real time optimization or not.

Returns:
whether the service supports real time optimization or not.

getOptimizationFunctionType

public FunctionType getOptimizationFunctionType()
Get the function types that the service supports.

Returns:
the function types that the service supports, null if none.

getOptimizationSpecialStructure

public SpecialStructure getOptimizationSpecialStructure()
Get the special structures that the service supports.

Returns:
the special structures that the service supports, null if none.

getOptimizationSpecialAlgorithm

public SpecialAlgorithm getOptimizationSpecialAlgorithm()
Get the special algorithms that the service supports.

Returns:
the special algorithms that the service supports, null if none.

getOtherEntityInfo

public java.util.HashMap<java.lang.String,java.lang.String> getOtherEntityInfo()
Get the hash map of other entity information.

Returns:
the hash map of other entity info.

getOtherEntityInfoNumber

public int getOtherEntityInfoNumber()
Get the number of other entity info.

Returns:
the number of other entity info.

getOtherEntityInfoValueByName

public java.lang.String getOtherEntityInfoValueByName(java.lang.String name)
Get the String value from the other entity info hash map.

Parameters:
name - holds the name of entity info to get.
Returns:
String value from the other entity info hash map, null if none.

getOtherEntityDescriptionByName

public java.lang.String getOtherEntityDescriptionByName(java.lang.String name)
Get the String value from the other entity info hash map.

Parameters:
name - holds the name of entity info to get.
Returns:
String value from the other entity info hash map, null if none.

getOtherEntityInfoNames

public java.lang.String[] getOtherEntityInfoNames()
Get the names of all other entity info.

Returns:
the names of all other entity info.

getOtherEntityInfoValues

public java.lang.String[] getOtherEntityInfoValues()
Get the values of all other entity info.

Returns:
the values of all other entity info.

getOtherEntityDescriptions

public java.lang.String[] getOtherEntityDescriptions()
Get the descriptions of all other entity info.

Returns:
the descriptions of all other entity info.

main

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

Parameters:
argv - command line arguments.