org.optimizationservices.oscommon.representationparser
Class OSaLReader

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

public class OSaLReader
extends OSgLReader

The OSaLReader class parses an OSaL 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
OSaLReader()
          Default constructor.
OSaLReader(boolean validate)
          constructor.
 
Method Summary
 java.lang.String getAnalysisMessage()
          Get analysis message.
 AnalysisStatus getAnalysisStatus()
          Get analysis status
 java.util.GregorianCalendar getAnalysisTime()
          Get analysis time.
 ConstraintAnalysis getConstraintAnalysis()
          get analysis of the constraints
 int getConstraintNumber()
          Get constraint number.
 InstanceAnalysis getInstanceAnalysis()
          get analysis of the entire instance.
 java.lang.String getInstanceName()
          Get instance name.
 java.lang.String getJobID()
          Get job ID.
 LinearConstraintCoefficientAnalysis getLinearConstraintCoefficientAnalysis()
          get analysis of the linear constraint coefficients.
 NonlinearExpressionAnalysis getNonlinearExpressionAnalysis()
          get analysis of the entire nonlinear expressions.
 ObjectiveAnalysis getObjectiveAnalysis()
          get analysis of the objectives
 int getObjectiveNumber()
          Get objective number.
 OSAnalysis getOSAnalysis()
          get the standard OSAnalysis, a local interface for storing Optimization Services analysis result.
 java.util.HashMap<java.lang.String,java.lang.String> getOtherAnalyses()
          Get the hash map of other analyses.
 java.lang.String getOtherAnalysisDescriptionByName(java.lang.String name)
          Get the String value from the other analysis hash map.
 java.lang.String[] getOtherAnalysisDescriptions()
          Get the descriptions of all other analyses.
 java.lang.String[] getOtherAnalysisNames()
          Get the names of all other analyses.
 int getOtherAnalysisNumber()
          Get the number of other analyses.
 java.lang.String getOtherAnalysisValueByName(java.lang.String name)
          Get the String value from the other analysis hash map.
 java.lang.String[] getOtherAnalysisValues()
          Get the values of all other analyses.
 QuadraticCoefficientAnalysis getQuadraticCoefficientAnalysis()
          get analysis of the entire quadratic coefficients.
 java.lang.String getServiceName()
          Get service name.
 java.lang.String getServiceURI()
          Get service URI.
 VariableAnalysis getVariableAnalysis()
          get analysis of the variables
 int getVariableNumber()
          Get variable number.
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

OSaLReader

public OSaLReader(boolean validate)
constructor.

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

OSaLReader

public OSaLReader()
Default constructor.

Method Detail

getOSAnalysis

public OSAnalysis getOSAnalysis()
                         throws java.lang.Exception
get the standard OSAnalysis, a local interface for storing Optimization Services analysis result.

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

getAnalysisStatus

public AnalysisStatus getAnalysisStatus()
Get analysis status

Returns:
analysis status, null if none.

getServiceURI

public java.lang.String getServiceURI()
Get service URI.

Returns:
the service URI, null or empty string if none.

getServiceName

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

Returns:
the service name, null or empty string if none.

getInstanceName

public java.lang.String getInstanceName()
Get instance name.

Returns:
the instance name, null or empty string if none.

getJobID

public java.lang.String getJobID()
Get job ID.

Returns:
the job ID, null or empty string if none.

getAnalysisTime

public java.util.GregorianCalendar getAnalysisTime()
Get analysis time.

Returns:
the analysis time, null or empty string if none.

getAnalysisMessage

public java.lang.String getAnalysisMessage()
Get analysis message.

Returns:
the analysis message, null or empty string if none.

getVariableNumber

public int getVariableNumber()
Get variable number.

Returns:
variable number, -1 if no information.

getObjectiveNumber

public int getObjectiveNumber()
Get objective number.

Returns:
objective number, -1 if no information.

getConstraintNumber

public int getConstraintNumber()
Get constraint number.

Returns:
constraint number, -1 if no information.

getInstanceAnalysis

public InstanceAnalysis getInstanceAnalysis()
get analysis of the entire instance.

Returns:
InstanceAnalysis, null if none.

getVariableAnalysis

public VariableAnalysis getVariableAnalysis()
get analysis of the variables

Returns:
VariableAnalysis, null if none.

getObjectiveAnalysis

public ObjectiveAnalysis getObjectiveAnalysis()
get analysis of the objectives

Returns:
ObjectiveAnalysis

getConstraintAnalysis

public ConstraintAnalysis getConstraintAnalysis()
get analysis of the constraints

Returns:
ConstraintAnalysis, null if none.

getLinearConstraintCoefficientAnalysis

public LinearConstraintCoefficientAnalysis getLinearConstraintCoefficientAnalysis()
get analysis of the linear constraint coefficients.

Returns:
LinearConstraintCoefficientAnalysis

getQuadraticCoefficientAnalysis

public QuadraticCoefficientAnalysis getQuadraticCoefficientAnalysis()
get analysis of the entire quadratic coefficients.

Returns:
QuadraticCoefficientAnalysis

getNonlinearExpressionAnalysis

public NonlinearExpressionAnalysis getNonlinearExpressionAnalysis()
get analysis of the entire nonlinear expressions.

Returns:
NonlinearExpressions

getOtherAnalyses

public java.util.HashMap<java.lang.String,java.lang.String> getOtherAnalyses()
Get the hash map of other analyses.

Returns:
the hash map of other analyses.

getOtherAnalysisNumber

public int getOtherAnalysisNumber()
Get the number of other analyses.

Returns:
the number of other analyses.

getOtherAnalysisValueByName

public java.lang.String getOtherAnalysisValueByName(java.lang.String name)
Get the String value from the other analysis hash map.

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

getOtherAnalysisDescriptionByName

public java.lang.String getOtherAnalysisDescriptionByName(java.lang.String name)
Get the String value from the other analysis hash map.

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

getOtherAnalysisNames

public java.lang.String[] getOtherAnalysisNames()
Get the names of all other analyses.

Returns:
the names of all other analyses.

getOtherAnalysisValues

public java.lang.String[] getOtherAnalysisValues()
Get the values of all other analyses.

Returns:
the values of all other analyses.

getOtherAnalysisDescriptions

public java.lang.String[] getOtherAnalysisDescriptions()
Get the descriptions of all other analyses.

Returns:
the descriptions of all other analyses.

main

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

Parameters:
argv - command line arguments.