Java Doc for SAXHandler.java in  » Workflow-Engines » OpenWFE » org » jdom » input » 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 » OpenWFE » org.jdom.input 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.xml.sax.helpers.DefaultHandler
      org.jdom.input.SAXHandler

SAXHandler
public class SAXHandler extends DefaultHandler implements LexicalHandler,DeclHandler,DTDHandler(Code)
A support class for SAXBuilder .
version:
   $Revision: 1.1 $, $Date: 2005/04/27 09:32:41 $
author:
   Brett McLaughlin
author:
   Jason Hunter
author:
   Philip Nelson
author:
   Bradley S. Huffman
author:
   phil@triloggroup.com



Constructor Summary
public  SAXHandler()
     This will create a new SAXHandler that listens to SAX events and creates a JDOM Document.
public  SAXHandler(JDOMFactory factory)
     This will create a new SAXHandler that listens to SAX events and creates a JDOM Document.

Method Summary
public  voidattributeDecl(String eName, String aName, String type, String valueDefault, String value)
     This handles an attribute declaration in the internal subset.
public  voidcharacters(char[] ch, int start, int length)
     This will report character data (within an element).
public  voidcomment(char[] ch, int start, int length)
     This reports that a comments is parsed.
public  voidelementDecl(String name, String model)
     Handle an element declaration in a DTD.
public  voidendCDATA()
    
public  voidendDTD()
     This signifies that the reading of the DTD is complete.
public  voidendElement(String namespaceURI, String localName, String qName)
     Indicates the end of an element (</[element name]>) is reached.
public  voidendEntity(String name)
    
public  voidexternalEntityDecl(String name, String publicID, String systemID)
     This is called when the parser encounters an external entity declaration.
protected  voidflushCharacters()
     This will flush any characters from SAX character calls we've been buffering.
protected  voidflushCharacters(String data)
     Flush the given string into the document.
public  ElementgetCurrentElement()
     Returns the being-parsed element.
public  DocumentgetDocument()
     Returns the document.
public  LocatorgetDocumentLocator()
     Provides access to the Locator object provided by the SAX parser.
public  booleangetExpandEntities()
     Returns whether or not entities will be expanded during the build.
public  JDOMFactorygetFactory()
     Returns the factory used for constructing objects.
public  booleangetIgnoringElementContentWhitespace()
     Returns whether or not the parser will elminate whitespace in element content (sometimes known as "ignorable whitespace") when building the document.
public  voidignorableWhitespace(char[] ch, int start, int length)
     Capture ignorable whitespace as text.
public  voidinternalEntityDecl(String name, String value)
     Handle an internal entity declaration in a DTD.
public  voidnotationDecl(String name, String publicID, String systemID)
    
public  voidprocessingInstruction(String target, String data)
     This will indicate that a processing instruction has been encountered.
protected  voidpushElement(Element element)
     Pushes an element onto the tree under construction.
public  voidsetDocumentLocator(Locator locator)
     Receives an object for locating the origin of SAX document events.
public  voidsetExpandEntities(boolean expand)
     This sets whether or not to expand entities during the build. A true means to expand entities as normal content.
public  voidsetIgnoringElementContentWhitespace(boolean ignoringWhite)
     Specifies whether or not the parser should elminate whitespace in element content (sometimes known as "ignorable whitespace") when building the document.
public  voidskippedEntity(String name)
     This indicates that an unresolvable entity reference has been encountered, normally because the external DTD subset has not been read.
public  voidstartCDATA()
    
public  voidstartDTD(String name, String publicID, String systemID)
     This will signify that a DTD is being parsed, and can be used to ensure that comments and other lexical structures in the DTD are not added to the JDOM Document object.
public  voidstartDocument()
    
public  voidstartElement(String namespaceURI, String localName, String qName, Attributes atts)
     This reports the occurrence of an actual element.
public  voidstartEntity(String name)
    
public  voidstartPrefixMapping(String prefix, String uri)
     This will add the prefix mapping to the JDOM Document object.
public  voidunparsedEntityDecl(String name, String publicID, String systemID, String notationName)
    


Constructor Detail
SAXHandler
public SAXHandler()(Code)
This will create a new SAXHandler that listens to SAX events and creates a JDOM Document. The objects will be constructed using the default factory.



SAXHandler
public SAXHandler(JDOMFactory factory)(Code)
This will create a new SAXHandler that listens to SAX events and creates a JDOM Document. The objects will be constructed using the provided factory.
Parameters:
  factory - JDOMFactory to be used for constructingobjects




Method Detail
attributeDecl
public void attributeDecl(String eName, String aName, String type, String valueDefault, String value) throws SAXException(Code)
This handles an attribute declaration in the internal subset.
Parameters:
  eName - String element name of attribute
Parameters:
  aName - String attribute name
Parameters:
  type - String attribute type
Parameters:
  valueDefault - String default value of attribute
Parameters:
  value - String value of attribute
throws:
  SAXException -



characters
public void characters(char[] ch, int start, int length) throws SAXException(Code)
This will report character data (within an element).
Parameters:
  ch - char[] character array with character data
Parameters:
  start - int index in array where data starts.
Parameters:
  length - int length of data.
throws:
  SAXException -



comment
public void comment(char[] ch, int start, int length) throws SAXException(Code)
This reports that a comments is parsed. If not in the DTD, this comment is added to the current JDOM Element, or the Document itself if at that level.
Parameters:
  ch - ch[] array of comment characters.
Parameters:
  start - int index to start reading from.
Parameters:
  length - int length of data.
throws:
  SAXException -



elementDecl
public void elementDecl(String name, String model) throws SAXException(Code)
Handle an element declaration in a DTD.
Parameters:
  name - String name of element
Parameters:
  model - String model of the element in DTD syntax
throws:
  SAXException -



endCDATA
public void endCDATA() throws SAXException(Code)
Report a CDATA section



endDTD
public void endDTD() throws SAXException(Code)
This signifies that the reading of the DTD is complete.
throws:
  SAXException -



endElement
public void endElement(String namespaceURI, String localName, String qName) throws SAXException(Code)
Indicates the end of an element (</[element name]>) is reached. Note that the parser does not distinguish between empty elements and non-empty elements, so this will occur uniformly.
Parameters:
  namespaceURI - String URI of namespace thiselement is associated with
Parameters:
  localName - String name of element without prefix
Parameters:
  qName - String name of element in XML 1.0 form
throws:
  SAXException - when things go wrong



endEntity
public void endEntity(String name) throws SAXException(Code)



externalEntityDecl
public void externalEntityDecl(String name, String publicID, String systemID) throws SAXException(Code)
This is called when the parser encounters an external entity declaration.
Parameters:
  name - entity name
Parameters:
  publicID - public id
Parameters:
  systemID - system id
throws:
  SAXException - when things go wrong



flushCharacters
protected void flushCharacters() throws SAXException(Code)
This will flush any characters from SAX character calls we've been buffering.
throws:
  SAXException - when things go wrong



flushCharacters
protected void flushCharacters(String data) throws SAXException(Code)
Flush the given string into the document. This is a protected method so subclassers can control text handling without knowledge of the internals of this class.
Parameters:
  data - string to flush



getCurrentElement
public Element getCurrentElement() throws SAXException(Code)
Returns the being-parsed element. Element - element being built.
throws:
  SAXException -



getDocument
public Document getDocument()(Code)
Returns the document. Should be called after parsing is complete. Document - Document that was built



getDocumentLocator
public Locator getDocumentLocator()(Code)
Provides access to the Locator object provided by the SAX parser. Locator an object that can returnthe location of any SAX document event.



getExpandEntities
public boolean getExpandEntities()(Code)
Returns whether or not entities will be expanded during the build. boolean - whether entity expansionwill occur during build.
See Also:   SAXHandler.setExpandEntities



getFactory
public JDOMFactory getFactory()(Code)
Returns the factory used for constructing objects. JDOMFactory - the factory used forconstructing objects.
See Also:   SAXHandler.SAXHandler(org.jdom.JDOMFactory)



getIgnoringElementContentWhitespace
public boolean getIgnoringElementContentWhitespace()(Code)
Returns whether or not the parser will elminate whitespace in element content (sometimes known as "ignorable whitespace") when building the document. boolean - whether ignorable whitespace willbe ignored during build.
See Also:   SAXHandler.setIgnoringElementContentWhitespace



ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException(Code)
Capture ignorable whitespace as text. If setIgnoringElementContentWhitespace(true) has been called then this method does nothing.
Parameters:
  ch - [] - char array of ignorable whitespace
Parameters:
  start - int - starting position within array
Parameters:
  length - int - length of whitespace after start
throws:
  SAXException - when things go wrong



internalEntityDecl
public void internalEntityDecl(String name, String value) throws SAXException(Code)
Handle an internal entity declaration in a DTD.
Parameters:
  name - String name of entity
Parameters:
  value - String value of the entity
throws:
  SAXException -



notationDecl
public void notationDecl(String name, String publicID, String systemID) throws SAXException(Code)
Handle the declaration of a Notation in a DTD
Parameters:
  name - name of the notation
Parameters:
  publicID - the public ID of the notation
Parameters:
  systemID - the system ID of the notation



processingInstruction
public void processingInstruction(String target, String data) throws SAXException(Code)
This will indicate that a processing instruction has been encountered. (The XML declaration is not a processing instruction and will not be reported.)
Parameters:
  target - String target of PI
Parameters:
  data - String containing all data sent to the PI.This typically looks like one or more attribute valuepairs.
throws:
  SAXException - when things go wrong



pushElement
protected void pushElement(Element element)(Code)
Pushes an element onto the tree under construction. Allows subclasses to put content under a dummy root element which is useful for building content that would otherwise be a non-well formed document.
Parameters:
  element - root element under which content will be built



setDocumentLocator
public void setDocumentLocator(Locator locator)(Code)
Receives an object for locating the origin of SAX document events. This method is invoked by the SAX parser.

org.jdom.JDOMFactory implementations can use the SAXHandler.getDocumentLocator method to get access to the Locator during parse.


Parameters:
  locator - Locator an object that can returnthe location of any SAX document event.



setExpandEntities
public void setExpandEntities(boolean expand)(Code)
This sets whether or not to expand entities during the build. A true means to expand entities as normal content. A false means to leave entities unexpanded as EntityRef objects. The default is true.
Parameters:
  expand - boolean indicating whether entity expansionshould occur.



setIgnoringElementContentWhitespace
public void setIgnoringElementContentWhitespace(boolean ignoringWhite)(Code)
Specifies whether or not the parser should elminate whitespace in element content (sometimes known as "ignorable whitespace") when building the document. Only whitespace which is contained within element content that has an element only content model will be eliminated (see XML Rec 3.2.1). For this setting to take effect requires that validation be turned on. The default value of this setting is false.
Parameters:
  ignoringWhite - Whether to ignore ignorable whitespace



skippedEntity
public void skippedEntity(String name) throws SAXException(Code)
This indicates that an unresolvable entity reference has been encountered, normally because the external DTD subset has not been read.
Parameters:
  name - String name of entity
throws:
  SAXException - when things go wrong



startCDATA
public void startCDATA() throws SAXException(Code)
Report a CDATA section
throws:
  SAXException -



startDTD
public void startDTD(String name, String publicID, String systemID) throws SAXException(Code)
This will signify that a DTD is being parsed, and can be used to ensure that comments and other lexical structures in the DTD are not added to the JDOM Document object.
Parameters:
  name - String name of element listed in DTD
Parameters:
  publicID - String public ID of DTD
Parameters:
  systemID - String system ID of DTD



startDocument
public void startDocument()(Code)



startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException(Code)
This reports the occurrence of an actual element. It will include the element's attributes, with the exception of XML vocabulary specific attributes, such as xmlns:[namespace prefix] and xsi:schemaLocation.
Parameters:
  namespaceURI - String namespace URI this elementis associated with, or an emptyString
Parameters:
  localName - String name of element (with nonamespace prefix, if one is present)
Parameters:
  qName - String XML 1.0 version of element name:[namespace prefix]:[localName]
Parameters:
  atts - Attributes list for this element
throws:
  SAXException - when things go wrong



startEntity
public void startEntity(String name) throws SAXException(Code)



startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws SAXException(Code)
This will add the prefix mapping to the JDOM Document object.
Parameters:
  prefix - String namespace prefix.
Parameters:
  uri - String namespace URI.



unparsedEntityDecl
public void unparsedEntityDecl(String name, String publicID, String systemID, String notationName) throws SAXException(Code)
Handler for unparsed entity declarations in the DTD
Parameters:
  name - String of the unparsed entity decl
Parameters:
  publicID - String of the unparsed entity decl
Parameters:
  systemID - String of the unparsed entity decl
Parameters:
  notationName - String of the unparsed entity decl



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.