|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
edu.isi.pegasus.planner.parser.Parser
edu.isi.pegasus.planner.parser.StackBasedXMLParser
edu.isi.pegasus.planner.parser.dax.DAXParser3
public class DAXParser3
This class uses the Xerces SAX2 parser to validate and parse an XML document conforming to the DAX Schema 3.2
| Nested Class Summary | |
|---|---|
private class |
DAXParser3.Arguments
Private class to handle mix data content for arguments tags. |
| Field Summary | |
|---|---|
static long |
DAX_VERSION_3_2_0
|
static long |
DAX_VERSION_3_3_0
|
private String |
DEFAULT_METADATA_TYPE
Constant denoting default metadata type |
protected Callback |
mCallback
Handle to the callback |
protected String |
mJobPrefix
A job prefix specifed at command line. |
protected List<PCRelation> |
mParents
List of parents for a child node in the graph |
static String |
SCHEMA_LOCATION
The "not-so-official" location URL of the Site Catalog Schema. |
static String |
SCHEMA_NAMESPACE
uri namespace |
static String |
UNDEFINED_SITE
Constant denoting an undefined site |
| Fields inherited from class edu.isi.pegasus.planner.parser.StackBasedXMLParser |
|---|
mDepth, mParsingDone, mStack |
| Fields inherited from class edu.isi.pegasus.planner.parser.Parser |
|---|
DEFAULT_PARSER_NAME, mAdjFName, mLocator, mLogger, mLogMsg, mParser, mProps, mTextContent, mTextString |
| Constructor Summary | |
|---|---|
DAXParser3(PegasusBag bag)
The overloaded constructor. |
|
| Method Summary | |
|---|---|
protected String |
constructJobID(Job j)
Returns the id for a job |
List<TransformationCatalogEntry> |
convertExecutableToTCE(Executable executable)
Converts the executable into transformation catalog entries |
Object |
createObject(String element,
List names,
List values)
Composes the SiteData object corresponding to the element
name in the XML document. |
Callback |
getDAXCallback()
Retuns the DAXCallback for the parser |
String |
getSchemaLocation()
Returns the local path to the XML schema against which to validate. |
String |
getSchemaNamespace()
Returns the XML schema namespace that a document being parsed conforms to. |
static void |
main(String[] args)
|
protected void |
sanityCheckOnVersion(String version)
Sanity check on the version that this parser works on. |
void |
setDAXCallback(Callback c)
Set the DAXCallback for the parser to call out to. |
boolean |
setElementRelation(String childElement,
Object parent,
Object child)
This method sets the relations between the currently finished XML element(child) and its containing element in terms of Java objects. |
void |
startParser(String file)
The main method that starts the parsing. |
| Methods inherited from class edu.isi.pegasus.planner.parser.StackBasedXMLParser |
|---|
attributeNotSupported, complain, endDocument, endElement, log, startElement, unSupportedNestingOfElements |
| Methods inherited from class edu.isi.pegasus.planner.parser.Parser |
|---|
characters, ignoreWhitespace, ignoreWhitespace, setDocumentLocator, setParserFeature, setSchemaLocations, testForFile |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SCHEMA_LOCATION
public static final String SCHEMA_NAMESPACE
public static final String UNDEFINED_SITE
public static final long DAX_VERSION_3_2_0
public static final long DAX_VERSION_3_3_0
private String DEFAULT_METADATA_TYPE
protected List<PCRelation> mParents
protected Callback mCallback
protected String mJobPrefix
| Constructor Detail |
|---|
public DAXParser3(PegasusBag bag)
properties - the PegasusProperties to be used.| Method Detail |
|---|
public void setDAXCallback(Callback c)
setDAXCallback in interface DAXParserc - the callbackpublic Callback getDAXCallback()
getDAXCallback in interface DAXParserpublic void startParser(String file)
startParser in class Parserfile - the XML file to be parsed.public String getSchemaNamespace()
getSchemaNamespace in class Parserpublic String getSchemaLocation()
getSchemaLocation in class Parser
public Object createObject(String element,
List names,
List values)
SiteData object corresponding to the element
name in the XML document.
createObject in class StackBasedXMLParserelement - the element name encountered while parsing.names - is a list of attribute names, as strings.values - is a list of attribute values, to match the key list.
IllegalArgumentException - if the element name is too short.
public boolean setElementRelation(String childElement,
Object parent,
Object child)
setElementRelation in class StackBasedXMLParserchildElement - name is the the child element nameparent - is a reference to the parent's Java objectchild - is the completed child object to connect to the parent
public List<TransformationCatalogEntry> convertExecutableToTCE(Executable executable)
executable - executable object
protected String constructJobID(Job j)
j - the job
protected void sanityCheckOnVersion(String version)
version - the version as specified in the DAXpublic static void main(String[] args)
args -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||