Java Doc for DAXParser.java in  » Workflow-Engines » pegasus-2.1.0 » org » griphyn » vdl » euryale » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Workflow Engines » pegasus 2.1.0 » org.griphyn.vdl.euryale 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.xml.sax.helpers.DefaultHandler
      org.griphyn.vdl.euryale.DAXParser

DAXParser
public class DAXParser extends DefaultHandler (Code)
This class uses the xerces SAX2 parser to validate and parse an DAX document. This class extends the xerces DefaultHandler so that we only need to override callbacks of interest.
author:
   Kavitha Ranganathan
author:
   Jens-S. Vöckler
author:
   Yong Zhao
version:
   $Revision: 460 $


Field Summary
final static  intTAG_ADAG
    
final static  intTAG_ARGUMENT
    
final static  intTAG_OTHER
    
final static  intTAG_PROFILE
    

Constructor Summary
public  DAXParser(String schemaLocation)
     The class constructor initializes the Xerces parser, sets the classes that hold the callback functions, and the features that enable schema validation.

Method Summary
public  voidcharacters(char[] ch, int start, int length)
     This method is the callback function for characters in an element.
public  voidcreateElementObject(String e, java.util.List names, java.util.List values)
     This method finds out what is the current element, creates the java object that corresponds to the element, and sets the member variables with the values of the attributes of the element.
public  voidelementCharacters(String elementChars)
     This method sets the content of the java object corresponding to the element "text", which has mixed content.
public  voidendDocument()
     The parser comes to the end of the document.
public  voidendElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
     The parser is at the end of an element.
public  voidendPrefixMapping(java.lang.String prefix)
     Out of the reach of the prefix, remove it from the HashMap.
public  CallbackgetCallback()
     Obtains the current instance to be used for callbacks.
public  voidignorableWhitespace(char[] ch, int start, int length)
     Currently, ignorable whitespace will be ignored.
public  booleanparse(String daxURI)
     This function parses a DAX source (could be a document, a stream, etc.), and creates java class instances that correspond to the DAX. These will provided to the callback functions instead of being collected here in memory.
Parameters:
  daxURI - is the URI for the DAX source.
public  booleanparse(InputStream stream)
     This function parses a DAX source (could be a document, a stream, etc.), and creates java class instances that correspond to the DAX. These will provided to the callback functions instead of being collected here in memory.
Parameters:
  stream - is an input stream for the DAX source.
public  voidprocessingInstruction(java.lang.String target, java.lang.String data)
     Receive a processing instruction.
public  voidsetCallback(Callback callback)
     Sets a new callback object to use for future callbacks.
public  voidsetDocumentLocator(Locator locator)
     Obtains the document locator from the parser.
public  voidsetElementRelation(String elementName)
     This method sets the relations between the current java object and its parent object according to the element hierarchy.
public  voidsetSchemaLocations(String list)
     Set the list of external real locations where the XML schema may be found. Since this list can be determined at run-time through properties etc., we expect this function to be called between instantiating the parser, and using the parser.
Parameters:
  list - is a list of strings representing schema locations.
public  voidskippedEntity(java.lang.String name)
     Receive a notification that an entity was skipped.
public  voidstartDocument()
     This method specifies what to do when the parser is at the beginning of the document.
public  voidstartElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, Attributes atts)
     This method defines the action to take when the parser begins to parse an element.
public  voidstartPrefixMapping(java.lang.String prefix, java.lang.String uri)
     There is a prefix or namespace defined, put the prefix and its URI in the HashMap.

Field Detail
TAG_ADAG
final static int TAG_ADAG(Code)



TAG_ARGUMENT
final static int TAG_ARGUMENT(Code)



TAG_OTHER
final static int TAG_OTHER(Code)



TAG_PROFILE
final static int TAG_PROFILE(Code)




Constructor Detail
DAXParser
public DAXParser(String schemaLocation)(Code)
The class constructor initializes the Xerces parser, sets the classes that hold the callback functions, and the features that enable schema validation.
Parameters:
  schemaLocation - is any URI pointing to the XML schema definition.




Method Detail
characters
public void characters(char[] ch, int start, int length) throws SAXException(Code)
This method is the callback function for characters in an element. The element should be mixed-content.
Parameters:
  ch - are the characters from the XML document
Parameters:
  start - is the start position into the array
Parameters:
  length - is the amount of valid data in the array



createElementObject
public void createElementObject(String e, java.util.List names, java.util.List values) throws IllegalArgumentException(Code)
This method finds out what is the current element, creates the java object that corresponds to the element, and sets the member variables with the values of the attributes of the element.
Parameters:
  e - is the name of the element
Parameters:
  names - is a list of attribute names, as strings.
Parameters:
  values - is a list of attribute values, to match the key list.



elementCharacters
public void elementCharacters(String elementChars)(Code)
This method sets the content of the java object corresponding to the element "text", which has mixed content.
See Also:   org.griphyn.vdl.classes.Text



endDocument
public void endDocument()(Code)
The parser comes to the end of the document.



endElement
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws SAXException(Code)
The parser is at the end of an element. Each successfully and completely parsed Definition will trigger a callback to the registered DefinitionHandler.
Parameters:
  namespaceURI - is the URI of the namespace for the element
Parameters:
  localName - is the element name without namespace
Parameters:
  qName - is the element name as it appears in the docment



endPrefixMapping
public void endPrefixMapping(java.lang.String prefix) throws SAXException(Code)
Out of the reach of the prefix, remove it from the HashMap.
Parameters:
  prefix - is the prefix that was being mapped previously.



getCallback
public Callback getCallback()(Code)
Obtains the current instance to be used for callbacks. the current callback instance object, or null.
See Also:   DAXParser.setCallback(Callback)



ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException(Code)
Currently, ignorable whitespace will be ignored.
Parameters:
  ch - are the characters from the XML document
Parameters:
  start - is the start position into the array
Parameters:
  length - is the amount of valid data in the array



parse
public boolean parse(String daxURI)(Code)
This function parses a DAX source (could be a document, a stream, etc.), and creates java class instances that correspond to the DAX. These will provided to the callback functions instead of being collected here in memory.
Parameters:
  daxURI - is the URI for the DAX source. true for valid parsing, false if an error occurred.



parse
public boolean parse(InputStream stream)(Code)
This function parses a DAX source (could be a document, a stream, etc.), and creates java class instances that correspond to the DAX. These will provided to the callback functions instead of being collected here in memory.
Parameters:
  stream - is an input stream for the DAX source. true for valid parsing, false if an error occurred.



processingInstruction
public void processingInstruction(java.lang.String target, java.lang.String data) throws SAXException(Code)
Receive a processing instruction. Currently, we are just printing a debug message that we received a PI.
Parameters:
  target - the processing instruction target
Parameters:
  data - the processing instruction data, or null if none was supplied.The data does not include any whitespace separating it from the target.



setCallback
public void setCallback(Callback callback)(Code)
Sets a new callback object to use for future callbacks.
Parameters:
  callback - is the new callback object.
See Also:   DAXParser.getCallback()



setDocumentLocator
public void setDocumentLocator(Locator locator)(Code)
Obtains the document locator from the parser. The document location can be used to print debug information, i.e the current location (line, column) in the document.
Parameters:
  locator - is the externally set current position



setElementRelation
public void setElementRelation(String elementName)(Code)
This method sets the relations between the current java object and its parent object according to the element hierarchy. Usually it involves adding the object to the parent's child object list.



setSchemaLocations
public void setSchemaLocations(String list)(Code)
Set the list of external real locations where the XML schema may be found. Since this list can be determined at run-time through properties etc., we expect this function to be called between instantiating the parser, and using the parser.
Parameters:
  list - is a list of strings representing schema locations. The contentexists in pairs, one of the namespace URI, one of the location URL.



skippedEntity
public void skippedEntity(java.lang.String name) throws SAXException(Code)
Receive a notification that an entity was skipped. Currently, we are just printing a debug message to this fact.
Parameters:
  name - The name of the skipped entity. If it is a parameterentity, the name will begin with '%', and if it is the external DTDsubset, it will be the string "[dtd]".



startDocument
public void startDocument()(Code)
This method specifies what to do when the parser is at the beginning of the document. In this case, we simply print a message for debugging.



startElement
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, Attributes atts) throws SAXException(Code)
This method defines the action to take when the parser begins to parse an element.
Parameters:
  namespaceURI - is the URI of the namespace for the element
Parameters:
  localName - is the element name without namespace
Parameters:
  qName - is the element name as it appears in the docment
Parameters:
  atts - has the names and values of all the attributes



startPrefixMapping
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws SAXException(Code)
There is a prefix or namespace defined, put the prefix and its URI in the HashMap. We can get the URI when the prefix is used here after.
Parameters:
  prefix - the Namespace prefix being declared.
Parameters:
  uri - the Namespace URI the prefix is mapped to.



Methods inherited from org.xml.sax.helpers.DefaultHandler
public void characters(char ch, int start, int length) throws SAXException(Code)(Java Doc)
public void endDocument() throws SAXException(Code)(Java Doc)
public void endElement(String uri, String localName, String qName) throws SAXException(Code)(Java Doc)
public void endPrefixMapping(String prefix) throws SAXException(Code)(Java Doc)
public void error(SAXParseException e) throws SAXException(Code)(Java Doc)
public void fatalError(SAXParseException e) throws SAXException(Code)(Java Doc)
public void ignorableWhitespace(char ch, int start, int length) throws SAXException(Code)(Java Doc)
public void notationDecl(String name, String publicId, String systemId) throws SAXException(Code)(Java Doc)
public void processingInstruction(String target, String data) throws SAXException(Code)(Java Doc)
public InputSource resolveEntity(String publicId, String systemId) throws IOException, SAXException(Code)(Java Doc)
public void setDocumentLocator(Locator locator)(Code)(Java Doc)
public void skippedEntity(String name) throws SAXException(Code)(Java Doc)
public void startDocument() throws SAXException(Code)(Java Doc)
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException(Code)(Java Doc)
public void startPrefixMapping(String prefix, String uri) throws SAXException(Code)(Java Doc)
public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException(Code)(Java Doc)
public void warning(SAXParseException e) throws SAXException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.