org.optimizationservices.oscommon.representationparser
Class OSRepositoryReader

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

public class OSRepositoryReader
extends OSgLReader

The OSRepositoryReader class parses an osRepository 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
OSRepositoryReader()
          Constructor.
OSRepositoryReader(boolean validate)
          constructor
 
Method Summary
 java.lang.String getDescription()
          Get the OSRepository description.
 RepositoryInstance getInstance(java.lang.String instanceName)
          Get an OSRepository instance.
 RepositoryInstance[] getInstances()
          Get the OSRepository instances.
 NewsElement[] getNews()
          Get the OSRepository news.
 OSRepository getOSRepository()
          get the standard OSRepository, a local interface for storing Optimization Services repository.
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

OSRepositoryReader

public OSRepositoryReader(boolean validate)
constructor

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

OSRepositoryReader

public OSRepositoryReader()
Constructor.

Method Detail

getOSRepository

public OSRepository getOSRepository()
                             throws java.lang.Exception
get the standard OSRepository, a local interface for storing Optimization Services repository.

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

getDescription

public java.lang.String getDescription()
Get the OSRepository description.

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

getNews

public NewsElement[] getNews()
Get the OSRepository news.

Returns:
the news element array. Each element of the array corresponds to a news element; null if none.
See Also:
NewsElement

getInstances

public RepositoryInstance[] getInstances()
Get the OSRepository instances.

Returns:
the instance array. Each element of the array corresponds to an instance entry; null if none.
See Also:
RepositoryInstance

getInstance

public RepositoryInstance getInstance(java.lang.String instanceName)
Get an OSRepository instance.

Returns:
the found instance, which is in the RepositoryInstance data structure.
See Also:
RepositoryInstance

main

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

Parameters:
argv - command line arguments.