Java Doc for InvocationParser.java in  » Workflow-Engines » pegasus-2.1.0 » org » griphyn » vdl » parser » 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.parser 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.xml.sax.helpers.DefaultHandler
      org.griphyn.vdl.parser.InvocationParser

InvocationParser
public class InvocationParser extends DefaultHandler (Code)
This class uses the Xerces SAX2 parser to validate and parse an XML document which contains information from kickstart generated invocation record.
author:
   Jens-S. Vöckler
author:
   Yong Zhao
version:
   $Revision: 50 $


Field Summary
final protected static  StringvendorParserClass
     Default parser is the Xerces parser.

Constructor Summary
public  InvocationParser(String schemaLocation)
     The class constructor.

Method Summary
public  voidcharacters(char[] ch, int start, int length)
     This method is the callback function for characters in an element.
protected  InvocationcreateObject(String e, java.util.List names, java.util.List values)
     This method determines the actively parsed 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.
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  voidignorableWhitespace(char[] ch, int start, int length)
     Currently, ignorable whitespace will be ignored.
public  InvocationRecordparse(java.io.InputStream reader)
     This function parses a XML source from an InputStream source, and creates java class instances that correspond to different elements in the XML source.
Parameters:
  reader - is a bytestream opened for reading.
public  InvocationRecordparse(java.io.Reader reader)
     This function parses a XML source from the new Reader source, and creates java class instances that correspond to different elements in the XML source.
Parameters:
  reader - is a character stream opened for reading.
public  voidprocessingInstruction(java.lang.String target, java.lang.String data)
     Receive a processing instruction.
public  voidsetDocumentLocator(Locator locator)
     Obtains the document locator from the parser.
protected  booleansetElementRelation(char initial, Invocation parent, Invocation child)
     This method sets the relations between the currently finished XML element and its containing element in terms of Java objects.
public  voidsetSchemaLocations(String list)
     Sets the list of external real locations where the XML schema may be found.
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
vendorParserClass
final protected static String vendorParserClass(Code)
Default parser is the Xerces parser.




Constructor Detail
InvocationParser
public InvocationParser(String schemaLocation)(Code)
The class constructor. This function initializes the Xerces parser and the features that enable schema validation.
Parameters:
  schemaLocation - is the default location of the XML Schemawhich this parser is capable of parsing. It may be null to usethe defaults provided in the document.




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 is expected to be of 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



createObject
protected Invocation createObject(String e, java.util.List names, java.util.List values) throws IllegalArgumentException(Code)
This method determines the actively parsed 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. A new VDL Java object, which may only be partly constructed.
exception:
  IllegalArgumentException - if the element name is too short.



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.



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 InvocationRecord parse(java.io.InputStream reader)(Code)
This function parses a XML source from an InputStream source, and creates java class instances that correspond to different elements in the XML source.
Parameters:
  reader - is a bytestream opened for reading. the records with the invocation information, or null on failure.



parse
public InvocationRecord parse(java.io.Reader reader)(Code)
This function parses a XML source from the new Reader source, and creates java class instances that correspond to different elements in the XML source.
Parameters:
  reader - is a character stream opened for reading. the records with the invocation information, or null on failure.



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.



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
protected boolean setElementRelation(char initial, Invocation parent, Invocation child)(Code)
This method sets the relations between the currently finished XML element and its containing element in terms of Java objects. Usually it involves adding the object to the parent's child object list.
Parameters:
  initial - is the first charactor of the parent element name
Parameters:
  parent - is a reference to the parent's Java object
Parameters:
  child - is the completed child object to connect to the parent true if the element was added successfully, false, if thechild does not match into the parent.



setSchemaLocations
public void setSchemaLocations(String list)(Code)
Sets 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. Thecontent exists in pairs, one of the namespace URI, one of thelocation 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.