|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.sdsc.inca.util.XmlWrapper edu.sdsc.inca.util.SuiteWrapper
public class SuiteWrapper
Convenience object for accessing suite documents and persisting changes to them.
Field Summary |
---|
Fields inherited from class edu.sdsc.inca.util.XmlWrapper |
---|
PASSWORD_MACRO_VALUE_PATTERN, PROCESSING_INSTRUCTION_PATTERN, XML_CDATA_PATTERN, XML_COMMENT_PATTERN, XML_NAME_PATTERN, XML_NODE_PATTERN |
Constructor Summary | |
---|---|
SuiteWrapper()
Create a new SuiteWrapper object containing a blank suite. |
|
SuiteWrapper(java.lang.String filename)
Create a new SuiteWrapper object from a suite XML file. |
|
SuiteWrapper(edu.sdsc.inca.dataModel.suite.Suite suite)
Create a new SuiteWrapper object from an XML Beans class instance. |
|
SuiteWrapper(edu.sdsc.inca.dataModel.suite.SuiteDocument suiteDoc)
Create a new SuiteWrapper object from an XML Beans class instance. |
Method Summary | |
---|---|
void |
appendSeriesConfig(edu.sdsc.inca.dataModel.util.SeriesConfig seriesConfig)
Append a new series config to the existing suite. |
void |
changeAction(java.lang.String action)
Change the action in all series configs found in the suite document. |
void |
copySuiteAttributes(edu.sdsc.inca.dataModel.suite.SuiteDocument suiteDoc)
Copy the top level suite attributes: name, guid, and description to supplied suite document. |
edu.sdsc.inca.dataModel.suite.SuiteDocument |
diff(edu.sdsc.inca.dataModel.suite.SuiteDocument suiteDoc)
Compare the existing suite against the passed in suite and return the differences as adds and deletes. |
edu.sdsc.inca.dataModel.util.SeriesConfig |
getSeriesConfig(int index)
Return a series config from the suite. |
int |
getSeriesConfigCount()
Return the number of series config objects contained in the suite document. |
int[] |
getSeriesConfigCountByPattern(java.lang.String[] nicknamePatterns,
java.lang.String[] namePatterns)
Count the number of series configs that match the provided patterns. |
edu.sdsc.inca.dataModel.util.SeriesConfig[] |
getSeriesConfigs()
Return all series configs in the suite as an array. |
edu.sdsc.inca.dataModel.suite.SuiteDocument |
getSuiteDocument()
Return the root element of the suite document. |
boolean |
hasRunNowMatch(edu.sdsc.inca.dataModel.util.SeriesConfig runNow)
Given the supplied run now series config, check to see if it has a match to a scheduled series config |
int |
mergeSeriesConfig(edu.sdsc.inca.dataModel.util.SeriesConfig seriesConfig)
Append a new series config to the existing suite. |
void |
removeSeriesConfig(int index)
Remove a specified series config from the suite. |
boolean |
removeSeriesConfig(edu.sdsc.inca.dataModel.util.SeriesConfig config)
Remove a specified series config from the suite. |
void |
save(java.io.File saveTo)
Save the suite to the specified file |
Methods inherited from class edu.sdsc.inca.util.XmlWrapper |
---|
configEqual, createCron, cryptSensitive, escape, getPrettyPrintOptions, main, prettyPrint, read, save, unescape, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SuiteWrapper()
public SuiteWrapper(edu.sdsc.inca.dataModel.suite.Suite suite) throws org.apache.xmlbeans.XmlException
suite
- An instance of Suite, a class generated by XmlBeans
org.apache.xmlbeans.XmlException
- if schema errorpublic SuiteWrapper(edu.sdsc.inca.dataModel.suite.SuiteDocument suiteDoc) throws org.apache.xmlbeans.XmlException
suiteDoc
- An instance of SuiteDocument, a class generated by
XmlBeans
org.apache.xmlbeans.XmlException
- if schema errorpublic SuiteWrapper(java.lang.String filename) throws java.io.IOException, org.apache.xmlbeans.XmlException
filename
- Path to a file containing suite XML.
java.io.IOException
- if trouble reading file from disk
org.apache.xmlbeans.XmlException
- if trouble parsing fileMethod Detail |
---|
public void appendSeriesConfig(edu.sdsc.inca.dataModel.util.SeriesConfig seriesConfig)
seriesConfig
- A new series config object to be added to the end
of the existing suite.public void changeAction(java.lang.String action)
action
- The action to use in all series configs.public void copySuiteAttributes(edu.sdsc.inca.dataModel.suite.SuiteDocument suiteDoc)
suiteDoc
- A suite that where the top level suite attributes will be
copied topublic edu.sdsc.inca.dataModel.suite.SuiteDocument diff(edu.sdsc.inca.dataModel.suite.SuiteDocument suiteDoc) throws org.apache.xmlbeans.XmlException
suiteDoc
- Another suite document to compare to the object's suite
document.
org.apache.xmlbeans.XmlException
- if unable to create diff documentpublic boolean hasRunNowMatch(edu.sdsc.inca.dataModel.util.SeriesConfig runNow)
runNow
- A series config with a run now schedule
public edu.sdsc.inca.dataModel.util.SeriesConfig getSeriesConfig(int index)
index
- The index of the series config to return.
public edu.sdsc.inca.dataModel.util.SeriesConfig[] getSeriesConfigs()
public int getSeriesConfigCount()
public int[] getSeriesConfigCountByPattern(java.lang.String[] nicknamePatterns, java.lang.String[] namePatterns)
nicknamePatterns
- Patterns that should be matched against the
series nicknamenamePatterns
- Patterns that should be matched against the
series reporter name
public int mergeSeriesConfig(edu.sdsc.inca.dataModel.util.SeriesConfig seriesConfig)
seriesConfig
- A new series config object to be added to suite
public edu.sdsc.inca.dataModel.suite.SuiteDocument getSuiteDocument()
public void removeSeriesConfig(int index)
index
- The index of the series config to delete.public boolean removeSeriesConfig(edu.sdsc.inca.dataModel.util.SeriesConfig config)
config
- The series config to delete from suite
public void save(java.io.File saveTo) throws java.io.IOException
saveTo
- The file to save the suite to.
java.io.IOException
- if unable to save to disk
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |