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


java.lang.Object
   org.xml.sax.helpers.DefaultHandler
      org.griphyn.cPlanner.parser.Parser

All known Subclasses:   org.griphyn.cPlanner.parser.PDAXParser,  org.griphyn.cPlanner.parser.ConfigXmlParser,  org.griphyn.cPlanner.parser.DaxParser,
Parser
abstract public class Parser extends DefaultHandler (Code)
This is the base class which all the xml parsing classes extend. It initializes the xml parser namely Xerces, sets it's various features like turning on validation against schema etc, plus the namespace resolution.
author:
   Karan Vahi
author:
   Gaurang Mehta
version:
   $Revision: 50 $


Field Summary
final protected  StringDEFAULT_PARSER_NAME
     Default parser name.
protected  booleanmAdjFName
     Boolean flag to ensure that two adjacent filenames are separated by a whitespace.
protected  LocatormLocator
     Locator object to determine on which line in the xml has the error occured.
protected  StringmLogMsg
     The String which contains the messages to be logged.
protected  LogManagermLogger
     The LogManager object which logs the Pegasus messages.
protected  XMLReadermParser
     The object which is used to parse the dax.
protected  PegasusPropertiesmProps
     The object holding all the properties pertaining to Pegasus.
protected  StringBuffermTextContent
     Holds the text in an element (text between start and final tags if any).
protected  StringmTextString
     A String that holds the contents of data passed as text.

Constructor Summary
public  Parser(PegasusProperties properties)
     Intialises the parser.

Method Summary
public  voidcharacters(char[] chars, int start, int length)
     This is used to store the character data that is in xml.
abstract public  voidendDocument()
     This is called automatically when the end of the XML file is reached.
abstract public  voidendElement(String uri, String localName, String qName)
     An empty implementation is provided by DefaultHandler class.
abstract public  StringgetSchemaLocation()
     Helps the load database to locate the VDLx 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  StringignoreWhitespace(String str)
     Our own implementation for ignorable whitespace.
public  voidsetDocumentLocator(Locator loc)
     Overrides the empty implementation provided by Default Handler and sets the locator variable for the locator.
public  booleansetParserFeature(String uri, boolean flag)
     Sets a parser feature, and fails here enabling us to set all the following features.
Parameters:
  uri - is the feature's URI to modify
Parameters:
  flag - is the new value to set.
public  voidsetSchemaLocations(String list)
     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.
abstract public  voidstartElement(String uri, String local, String raw, Attributes attrs)
     An empty implementation is provided by DefaultHandler of ContentHandler. This method receives the notification from the sacks parser when start tag of an element comes.
abstract public  voidstartParser(String file)
     Start the parser.
public  voidtestForFile(String file)
     Tests whether the file exists or not.

Field Detail
DEFAULT_PARSER_NAME
final protected String DEFAULT_PARSER_NAME(Code)
Default parser name. Using Xerces at present.



mAdjFName
protected boolean mAdjFName(Code)
Boolean flag to ensure that two adjacent filenames are separated by a whitespace.



mLocator
protected Locator mLocator(Code)
Locator object to determine on which line in the xml has the error occured.



mLogMsg
protected String mLogMsg(Code)
The String which contains the messages to be logged.



mLogger
protected LogManager mLogger(Code)
The LogManager object which logs the Pegasus messages.



mParser
protected XMLReader mParser(Code)
The object which is used to parse the dax. This reads the XML document and sends it to the event handlers.



mProps
protected PegasusProperties mProps(Code)
The object holding all the properties pertaining to Pegasus.



mTextContent
protected StringBuffer mTextContent(Code)
Holds the text in an element (text between start and final tags if any). Used in case of elements of mixed type.



mTextString
protected String mTextString(Code)
A String that holds the contents of data passed as text. The string should only be trimmed when the appropriate end tag of the element is invoked. At this point, a whitespace is added if there are whitespaces in at the ends.




Constructor Detail
Parser
public Parser(PegasusProperties properties)(Code)
Intialises the parser. Sets the various features. However the parsing is done in the implementing class, by call mParser.parse(filename).
Parameters:
  properties - the PegasusProperties to be used.




Method Detail
characters
public void characters(char[] chars, int start, int length)(Code)
This is used to store the character data that is in xml. An implementation of the interface for the Sacks parser.



endDocument
abstract public void endDocument()(Code)
This is called automatically when the end of the XML file is reached.



endElement
abstract public void endElement(String uri, String localName, String qName)(Code)
An empty implementation is provided by DefaultHandler class. This method is called automatically by the Sax parser when the end tag of an element comes in the xml file. Any parser class should implement this method



getSchemaLocation
abstract public String getSchemaLocation()(Code)
Helps the load database to locate the VDLx 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.



ignoreWhitespace
public String ignoreWhitespace(String str)(Code)
Our own implementation for ignorable whitespace. A String that holds the contents of data passed as text by the underlying parser. The whitespaces at the end are replaced by one whitespace.
Parameters:
  str - The string that contains whitespaces. String corresponding to the trimmed version.



setDocumentLocator
public void setDocumentLocator(Locator loc)(Code)
Overrides the empty implementation provided by Default Handler and sets the locator variable for the locator.
Parameters:
  loc - the Locator object which keeps the track as to the linenumbers of the line being parsed.



setParserFeature
public boolean setParserFeature(String uri, boolean flag)(Code)
Sets a parser feature, and fails here enabling us to set all the following features.
Parameters:
  uri - is the feature's URI to modify
Parameters:
  flag - is the new value to set. true if the feature could be set, else false foran exception.



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. The contentexists in pairs, one of the namespace URI, one of the location URL.



startElement
abstract public void startElement(String uri, String local, String raw, Attributes attrs) throws SAXException(Code)
An empty implementation is provided by DefaultHandler of ContentHandler. This method receives the notification from the sacks parser when start tag of an element comes. Any parser class must implement this method.



startParser
abstract public void startParser(String file)(Code)
Start the parser. This starts the parsing of the file by the parser.
Parameters:
  file - the path to the XML file you want to parse.



testForFile
public void testForFile(String file) throws FileNotFoundException(Code)
Tests whether the file exists or not.



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.