Class DAXParser3

  • All Implemented Interfaces:
    DAXParser, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

    public class DAXParser3
    extends StackBasedXMLParser
    implements DAXParser
    This class uses the Xerces SAX2 parser to validate and parse an XML document conforming to the DAX Schema 3.2
    Version:
    $Revision$
    Author:
    Karan Vahi vahi@isi.edu
    • Field Detail

      • SCHEMA_LOCATION

        public static final java.lang.String SCHEMA_LOCATION
        The "not-so-official" location URL of the Site Catalog Schema.
        See Also:
        Constant Field Values
      • SCHEMA_NAMESPACE

        public static final java.lang.String SCHEMA_NAMESPACE
        uri namespace
        See Also:
        Constant Field Values
      • UNDEFINED_SITE

        public static final java.lang.String UNDEFINED_SITE
        Constant denoting an undefined site
        See Also:
        Constant Field Values
      • DAX_VERSION_3_2_0

        public static final long DAX_VERSION_3_2_0
      • DAX_VERSION_3_3_0

        public static final long DAX_VERSION_3_3_0
      • DEFAULT_METADATA_TYPE

        private java.lang.String DEFAULT_METADATA_TYPE
        Constant denoting default metadata type
      • mParents

        protected java.util.List<PCRelation> mParents
        List of parents for a child node in the graph
      • mCallback

        protected Callback mCallback
        Handle to the callback
      • mJobPrefix

        protected java.lang.String mJobPrefix
        A job prefix specifed at command line.
    • Constructor Detail

      • DAXParser3

        public DAXParser3​(PegasusBag bag)
        The overloaded constructor.
        Parameters:
        properties - the PegasusProperties to be used.
    • Method Detail

      • setDAXCallback

        public void setDAXCallback​(Callback c)
        Set the DAXCallback for the parser to call out to.
        Specified by:
        setDAXCallback in interface DAXParser
        Parameters:
        c - the callback
      • getDAXCallback

        public Callback getDAXCallback()
        Retuns the DAXCallback for the parser
        Specified by:
        getDAXCallback in interface DAXParser
        Returns:
        the callback
      • startParser

        public void startParser​(java.lang.String file)
        The main method that starts the parsing.
        Specified by:
        startParser in class Parser
        Parameters:
        file - the XML file to be parsed.
      • getSchemaNamespace

        public java.lang.String getSchemaNamespace()
        Returns the XML schema namespace that a document being parsed conforms to.
        Specified by:
        getSchemaNamespace in class Parser
        Returns:
        the schema namespace
      • getSchemaLocation

        public java.lang.String getSchemaLocation()
        Returns the local path to the XML schema against which to validate.
        Specified by:
        getSchemaLocation in class Parser
        Returns:
        path to the schema
      • createObject

        public java.lang.Object createObject​(java.lang.String element,
                                             java.util.List names,
                                             java.util.List values)
        Composes the SiteData object corresponding to the element name in the XML document.
        Specified by:
        createObject in class StackBasedXMLParser
        Parameters:
        element - 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.
        Returns:
        the relevant SiteData object, else null if unable to construct.
        Throws:
        java.lang.IllegalArgumentException - if the element name is too short.
      • setElementRelation

        public boolean setElementRelation​(java.lang.String childElement,
                                          java.lang.Object parent,
                                          java.lang.Object child)
        This method sets the relations between the currently finished XML element(child) and its containing element in terms of Java objects. Usually it involves adding the object to the parent's child object list.
        Specified by:
        setElementRelation in class StackBasedXMLParser
        Parameters:
        childElement - name is the the child element name
        parent - is a reference to the parent's Java object
        child - is the completed child object to connect to the parent
        Returns:
        true if the element was added successfully, false, if the child does not match into the parent.
      • convertExecutableToTCE

        public java.util.List<TransformationCatalogEntry> convertExecutableToTCE​(Executable executable)
        Converts the executable into transformation catalog entries
        Parameters:
        executable - executable object
        Returns:
        transformation catalog entries
      • constructJobID

        protected java.lang.String constructJobID​(Job j)
        Returns the id for a job
        Parameters:
        j - the job
        Returns:
        the id.
      • sanityCheckOnVersion

        protected void sanityCheckOnVersion​(java.lang.String version)
        Sanity check on the version that this parser works on.
        Parameters:
        version - the version as specified in the DAX
      • main

        public static void main​(java.lang.String[] args)
        Parameters:
        args -