| org.griphyn.cPlanner.parser.Parser org.griphyn.cPlanner.parser.DaxParser
Method Summary | |
public void | endDocument() Here we have all the elements in our data structure. | public void | endElement(String uri, String localName, String qName) Overrides the default implementation when the elements end tag comes. | public String | extractVersionFromSchema(String schema) Determines the version of the DAX as specified in a schema string.
Parameters: schema - the schema string as specified in the root element ofthe DAX. | public String | getSchemaLocation() Helps the load database to locate the DAX XML schema, if available.
Please note that the schema location URL in the instance document
is only a hint, and may be overriden by the findings of this method.
a location pointing to a definition document of the XMLschema that can read VDLx. | public String | getSchemaOfDocument(String file) A convenience method that tries to get the name of the schema the document
refers to. | public String | getVersionOfDAX(String file) A convenience method that tries to determine the version of the dax
schema by reading ahead in the DAX file, and searching for
the version attribue in the file. | public static void | main(String args) The main program. | public float | shiftRight(String value) Returns a float with the decimal point shifted right till the end.
Is necessary for comparing a String "1.10" with a String "1.9".
Parameters: value - the value that has to be shifted right. | public void | startElement(String uri, String local, String raw, Attributes attrs) Overriding the empty implementation provided by
DefaultHandler of ContentHandler. | public void | startParser(String daxFileName) This starts the parsing of the file by the parser. | protected boolean | useDoubleNegative(String daxVersion) Determines whether to use a doubleNegative or not.
Parameters: daxVersion - the version of the dax as determined. |
SCHEMA_LOCATION | final public static String SCHEMA_LOCATION(Code) | | The "not-so-official" location URL of the DAX schema definition.
|
SCHEMA_NAMESPACE | final public static String SCHEMA_NAMESPACE(Code) | | URI namespace
|
DaxParser | public DaxParser(PegasusProperties properties)(Code) | | The default constructor
Parameters: properties - the PegasusProperties to be used. |
DaxParser | public DaxParser(String daxFileName, PegasusProperties properties, Callback callback)(Code) | | The constructor initialises the parser, and turns on the validation feature
in Xerces.
Parameters: daxFileName - the file which you want to parse. Parameters: properties - the PegasusProperties to be used. Parameters: callback - the object which implements the callback. |
endDocument | public void endDocument()(Code) | | Here we have all the elements in our data structure. This is called
automatically when the end of the XML file is reached.
|
endElement | public void endElement(String uri, String localName, String qName)(Code) | | Overrides the default implementation when the elements end tag comes.
This method is called automatically by the Sax parser when the end tag of
an element comes in the xml file.
|
extractVersionFromSchema | public String extractVersionFromSchema(String schema)(Code) | | Determines the version of the DAX as specified in a schema string.
Parameters: schema - the schema string as specified in the root element ofthe DAX. the version. |
getSchemaLocation | public String getSchemaLocation()(Code) | | Helps the load database to locate the DAX XML schema, if available.
Please note that the schema location URL in the instance document
is only a hint, and may be overriden by the findings of this method.
a location pointing to a definition document of the XMLschema that can read VDLx. Result may be null, if such a documentis unknown or unspecified. |
getSchemaOfDocument | public String getSchemaOfDocument(String file)(Code) | | A convenience method that tries to get the name of the schema the document
refers to. It returns the value of the xsi:schemaLocation.
Parameters: file - the name of the dax file. |
getVersionOfDAX | public String getVersionOfDAX(String file)(Code) | | A convenience method that tries to determine the version of the dax
schema by reading ahead in the DAX file, and searching for
the version attribue in the file.
Parameters: file - the name of the dax file. |
main | public static void main(String args)(Code) | | The main program. The DaxParser can be run standalone, by which it just
parses the file and populates the required data objects.
|
shiftRight | public float shiftRight(String value)(Code) | | Returns a float with the decimal point shifted right till the end.
Is necessary for comparing a String "1.10" with a String "1.9".
Parameters: value - the value that has to be shifted right. the float value, with the decimal point shifted or -1 in caseof error. |
startElement | public void startElement(String uri, String local, String raw, Attributes attrs) throws SAXException(Code) | | Overriding the empty implementation provided by
DefaultHandler of ContentHandler. This receives the notification
from the sacks parser when start tag of an element comes
|
startParser | public void startParser(String daxFileName)(Code) | | This starts the parsing of the file by the parser.
Parameters: daxFileName - the path/uri to the XML file you want to parse. |
useDoubleNegative | protected boolean useDoubleNegative(String daxVersion)(Code) | | Determines whether to use a doubleNegative or not.
Parameters: daxVersion - the version of the dax as determined. boolean |
|
|