org.optimizationservices.oscommon.representationparser
Class OSRegistryReader

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

public class OSRegistryReader
extends OSgLReader

The OSRegistryReader class parses an osRegistry 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
OSRegistryReader()
          Constructor.
OSRegistryReader(boolean validate)
          constructor
 
Method Summary
 java.lang.String getDescription()
          Get the OSRegistry description.
 NewsElement[] getNews()
          Get the OSRegistry news.
 OSRegistry getOSRegistry()
          get the standard OSRegistry, a local interface for storing Optimization Services registry.
 ServiceEntry getService(java.lang.String serviceURI)
          Get an OSRegistry service.
 ServiceEntry[] getServices()
          Get the OSRegistry services.
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

OSRegistryReader

public OSRegistryReader(boolean validate)
constructor

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

OSRegistryReader

public OSRegistryReader()
Constructor.

Method Detail

getOSRegistry

public OSRegistry getOSRegistry()
                         throws java.lang.Exception
get the standard OSRegistry, a local interface for storing Optimization Services registry.

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

getDescription

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

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

getNews

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

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

getServices

public ServiceEntry[] getServices()
Get the OSRegistry services.

Returns:
the service array. Each element of the array corresponds to a service entry; null if none.
See Also:
ServiceEntry

getService

public ServiceEntry getService(java.lang.String serviceURI)
Get an OSRegistry service.

Returns:
the found service, which is in the ServiceEntry data structure.
See Also:
ServiceEntry

main

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

Parameters:
argv - command line arguments.