org.optimizationservices.oscommon.localinterface
Class OSURI

java.lang.Object
  extended by org.optimizationservices.oscommon.localinterface.OSURI

public class OSURI
extends java.lang.Object

The OSURI class is a local interface for storing Optimization Services uri. Its design follows the Optimization Services uri Language (OSuL). All the data structures in this class are standards specified in OSuL.

Since:
OS 1.0
Version:
1.0, 03/14/2005
Author:
Robert Fourer, Jun Ma, Kipp Martin

Field Summary
 URI[] uri
          uri holds an array of URIs.
 
Constructor Summary
OSURI()
          Default constructor.
 
Method Summary
 URI[] getURIMatches()
          Get URI matches.
static void main(java.lang.String[] args)
          main for test purposes.
 OSURI readOSuL(java.lang.String osul, boolean isFile, boolean validate)
          read an OSuL instance and return and OSURI object.
 boolean setURIMatches(URI[] URIs)
          Set URI matches.
 java.lang.String writeOSuL()
          write the OSURI to an osul xml string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uri

public URI[] uri
uri holds an array of URIs.

Constructor Detail

OSURI

public OSURI()
Default constructor.

Method Detail

readOSuL

public OSURI readOSuL(java.lang.String osul,
                      boolean isFile,
                      boolean validate)
               throws java.lang.Exception
read an OSuL instance and return and OSURI object.

Parameters:
osul - holds the optimization uri in a string which format follows the Optimization Services uri Language (OSuL) schema.
isFile - holds whether the osul string is a file name or a string that literally holds the osul contents.
validate - holds whether the reader should be validating against the schema or not.
Returns:
the OSURI object constructed from the OSuL String.
Throws:
java.lang.Exception - if there are errors in reading the string or setting the OSURI.

writeOSuL

public java.lang.String writeOSuL()
                           throws java.lang.Exception
write the OSURI to an osul xml string.

Returns:
the osul xml string.
Throws:
java.lang.Exception - if there are errors in writing the osul string.

getURIMatches

public URI[] getURIMatches()
Get URI matches.

Returns:
an array of URIs, null if none. Each member of the URI array is of a URI data structure. It contains information such as the uri value, matchType, serviceName, licenceRequired, userNameRequired, passwordRequired.
See Also:
URI

setURIMatches

public boolean setURIMatches(URI[] URIs)
Set URI matches.

Parameters:
URIs - holds an array of URIs. Each member of the URI array is of a URI data structure. It contains information such as the uri value, matchType, serviceName, licenceRequired, userNameRequired, passwordRequired.
Returns:
whether the URIs are set successfully or not.
See Also:
URI

main

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

Parameters:
argv - command line arguments.