|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.util.XmlWriter
uk.ac.starlink.ttools.cea.CeaWriter
public abstract class CeaWriter
Writes an application description file suitable for use with the AstroGrid Common Execution Architecture.
There are variants of the format according to what the purpose of the output XML will be. This class is an abstract superclass providing common methods whose concrete subclasses do the actual writing.
This makes a best effort at providing a CEA-friendly interface to
the capabilities of STILTS. Call the main(java.lang.String[])
method with
the -help
flag for a usage message.
Constructor Summary | |
---|---|
protected |
CeaWriter(PrintStream out,
CeaConfig config,
CeaTask[] tasks,
boolean redirects,
String cmdline)
Constructor. |
Method Summary | |
---|---|
abstract int |
configure(String[] args)
Hook for additional configuration of concrete subclasses using command-line flags. |
protected void |
endElement(ElementDeclaration el)
Convenience method to end an element described by an ElementDeclaration. |
abstract String |
getSchemaLocation()
Returns the URL of the schema to which the output of this object conforms. |
static void |
main(String[] args)
Main method. |
protected void |
startElement(ElementDeclaration el)
Convenience method to start an element described by an ElementDeclaration. |
protected void |
startElement(ElementDeclaration el,
String moreAtts)
Convenience method to start an element described by an ElementDeclaration with supplied attributes. |
protected abstract void |
writeContent()
Performs the implementation-specific output of XML elements. |
void |
writeDocument()
Writes the configuration XML document. |
protected void |
writeInterfaces()
Writes an Interfaces element suitable for use with CEA. |
protected void |
writeParameters()
Writes a Parameters element suitable for use with CEA. |
Methods inherited from class uk.ac.starlink.util.XmlWriter |
---|
addElement, endElement, formatAttribute, formatText, getIndent, getLevel, print, println, setOut, startElement, startElement, writeDeclaration |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected CeaWriter(PrintStream out, CeaConfig config, CeaTask[] tasks, boolean redirects, String cmdline)
out
- output stream for XMLconfig
- configuration object for the specific flavour of outputtasks
- list of tasks to be described by the outputredirects
- true iff you want stdout/stderr parameters for
standard output/error redirectioncmdline
- command line string, used for logging within the
output onlyMethod Detail |
---|
public abstract int configure(String[] args)
args
- array of command-line arguments all of which are
directed at this object (any generic ones will have
been removed)
public void writeDocument() throws SAXException
SAXException
protected abstract void writeContent() throws SAXException
writeDocument()
; presumably invokes
writeParameters()
and writeInterfaces()
.
SAXException
public abstract String getSchemaLocation()
protected void writeParameters() throws SAXException
SAXException
protected void writeInterfaces() throws SAXException
SAXException
protected void startElement(ElementDeclaration el)
el
- elementprotected void startElement(ElementDeclaration el, String moreAtts)
el
- elementmoreAtts
- formatted attribute string additional to any
defined by the element declarationprotected void endElement(ElementDeclaration el)
el
- elementpublic static void main(String[] args) throws LoadException, SAXException
-help
for a usage message.
args
- argument list
LoadException
SAXException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |