|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.optimizationservices.oscommon.localinterface.OSRepository
public class OSRepository
The OSRepository
class is a local interface for storing Optimization Services
repository. Its design follows the Optimization Services Repository Language (OSRepository).
All the data structures in this class are standards specified in the OSRepository schema.
Field Summary | |
---|---|
java.lang.String |
description
description holds the general description of the os repository. |
RepositoryInstance[] |
instance
instance holds an array of os repository instances. |
News |
news
news holds the news for the os repository. |
Constructor Summary | |
---|---|
OSRepository()
Default constructor. |
Method Summary | |
---|---|
boolean |
addInstance(RepositoryInstance instance)
Add an OSRepository instance. |
boolean |
addNews(NewsElement newsElement)
Add an OSRepository news element. |
boolean |
deleteInstance(java.lang.String instanceName)
Delete an OSRepository instance. |
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. |
static void |
main(java.lang.String[] args)
main for test purposes. |
OSRepository |
readOSRepository(java.lang.String osRepository,
boolean isFile,
boolean validate)
read an OSRepository instance and return and OSRepository object. |
boolean |
setDescription(java.lang.String description)
Set the OSRepository description. |
boolean |
setInstances(RepositoryInstance[] instances)
Set the OSRepository instances. |
boolean |
setNews(NewsElement[] newsElements)
Set the OSRepository news. |
java.lang.String |
writeOSRepository()
write the OSRepository to an osRepository xml string. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.String description
public News news
public RepositoryInstance[] instance
Constructor Detail |
---|
public OSRepository()
Method Detail |
---|
public OSRepository readOSRepository(java.lang.String osRepository, boolean isFile, boolean validate) throws java.lang.Exception
osRepository
- holds the optimization repository in a string which format follows the
Optimization Services repository Language (OSRepository) schema.isFile
- holds whether the osRepository string is a file name or a string that literally holds the osRepository contents.validate
- holds whether the reader should be validating against the schema or not.
java.lang.Exception
- if there are errors in reading the string or setting the OSRepository.public java.lang.String writeOSRepository() throws java.lang.Exception
java.lang.Exception
- if there are errors in writing the osRepository string.public java.lang.String getDescription()
public boolean setDescription(java.lang.String description)
description
- holds the OSRepository description.
public NewsElement[] getNews()
NewsElement
public boolean setNews(NewsElement[] newsElements)
NewsElement
public boolean addNews(NewsElement newsElement)
NewsElement
public RepositoryInstance[] getInstances()
RepositoryInstance
public RepositoryInstance getInstance(java.lang.String instanceName)
RepositoryInstance
public boolean setInstances(RepositoryInstance[] instances)
RepositoryInstance
public boolean addInstance(RepositoryInstance instance)
RepositoryInstance
public boolean deleteInstance(java.lang.String instanceName)
RepositoryInstance
public static void main(java.lang.String[] args)
argv
- command line arguments.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |