Java Doc for SAXHandler.java in  » Ajax » zk » org » zkoss » idom » 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 » Ajax » zk » org.zkoss.idom.input 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.xml.sax.helpers.DefaultHandler
      org.zkoss.idom.input.SAXHandler

SAXHandler
public class SAXHandler extends DefaultHandler implements LexicalHandler,DeclHandler(Code)
The SAX Hanlder. It implements ContentHandler, LexicalHandler and DeclHandler. It is the caller's job to set up this handler properly if required.

This class doesn't depend on SAXBuilder, so it can be used in any other place, e.g., javax.xml.transform.sax.SAXResult.
author:
   tomyeh
See Also:   SAXBuilder



Field Summary
protected  List_declNamespaces
     The namespaces in between startPrefixMapping and endPrefixMapping.
protected  Document_doc
     The Document being created.
protected  IDOMFactory_factory
     The iDOM factory.
protected  boolean_inCData
     Indicator of whether we are in a CDATA.
protected  boolean_inDTD
     Indicator of whether we are in a DTD.
protected  Locator_loc
     Locator.
protected  Stack_stack
     The Group stack.

Constructor Summary
public  SAXHandler(IDOMFactory factory)
     Constructor.
public  SAXHandler()
     Constructor.

Method Summary
final protected  voidaddToCurrentGroup(Item vtx)
     Adds the item to the current group; also attach the locator.
final protected  voidattachLocator(Item vtx)
     Attaches the locator to the item.
public  voidattributeDecl(String eName, String aName, String type, String valueDefault, String value)
    
public  voidcharacters(char[] ch, int start, int length)
    
public  voidcomment(char[] ch, int start, int length)
    
protected  InputSourcedefaultResolveEntity(String publicId, String systemId)
     The default entity resolver.
public  voidelementDecl(String name, String model)
    
public  voidendCDATA()
    
public  voidendDTD()
    
public  voidendDocument()
    
public  voidendElement(String nsURI, String lname, String tname)
    
public  voidendEntity(String name)
    
public  voidendPrefixMapping(String prefix)
    
public  voiderror(SAXParseException ex)
    
public  voidexternalEntityDecl(String name, String pubId, String sysId)
    
public  voidfatalError(SAXParseException ex)
    
final public  DocumentgetDocument()
     Gets the document being created.
final public  EntityResolvergetEntityResolver()
     Gets the org.xml.sax.EntityResolver.
final public  ErrorHandlergetErrorHandler()
     Gets the org.xml.sax.ErrorHandler.
final public  IDOMFactorygetIDOMFactory()
     Gets the iDOM factory.
final protected  GroupgetTopGroup()
     Returns the top group, or null if not available.
public  voidignorableWhitespace(char[] ch, int start, int length)
    
public  voidinternalEntityDecl(String name, String value)
    
final public  booleanisCoalescing()
     Indicates whether or not the factory is configured to produce parsers which converts CDATA to Text and appends it to the adjacent (if any) Text node.
final public  booleanisExpandEntityReferences()
     Tests whether to expand entity reference nodes.
final public  booleanisIgnoringComments()
     Indicates whether or not the factory is configured to produce parsers which ignores comments.
final public  booleanisIgnoringElementContentWhitespace()
     Tests whether to ignore whitespaces in element content.
public  voidnotationDecl(String name, String publicID, String systemID)
    
final protected  voidpopGroup()
     Pops out the current group, and the one under it becomes the new current group.
public  voidprocessingInstruction(String target, String data)
    
final protected  voidpushGroup(Group group)
     Adds a new group to the current group as a child, and pushes the new group to be the new current group.
public  InputSourceresolveEntity(String publicId, String systemId)
    
final public  voidsetCoalescing(boolean coalescing)
     Specifies that the parser produced by this code will convert CDATA to Text and append it to the adjacent (if any) text.
public  voidsetDocumentLocator(Locator locator)
    
final public  voidsetEntityResolver(org.xml.sax.EntityResolver er)
     Specifies the org.xml.sax.EntityResolver to be used to resolve entities present in the XML docu-ment to be parsed.
final public  voidsetErrorHandler(ErrorHandler eh)
     Specifies the org.xml.sax.ErrorHandler to be used to report errors present in the XML document to be parsed.
final public  voidsetExpandEntityReferences(boolean expand)
     Sets whether to expand entities during parsing. A true means to expand entities as normal content.
final public  voidsetIDOMFactory(IDOMFactory factory)
     Sets the iDOM factory.
final public  voidsetIgnoringComments(boolean ignoreComments)
     Specifies that the parser produced by this code will ignore comments.
final public  voidsetIgnoringElementContentWhitespace(boolean ignore)
     Sets whether the parser should elminate whitespace in element content.
public  voidstartCDATA()
    
public  voidstartDTD(String name, String pubId, String sysId)
    
public  voidstartDocument()
    
public  voidstartElement(String nsURI, String lname, String tname, Attributes attrs)
    
public  voidstartEntity(String name)
    
public  voidstartPrefixMapping(String prefix, String uri)
    
public  voidunparsedEntityDecl(String name, String pubId, String sysId, String notationName)
    
public  voidwarning(SAXParseException ex)
    

Field Detail
_declNamespaces
protected List _declNamespaces(Code)
The namespaces in between startPrefixMapping and endPrefixMapping.



_doc
protected Document _doc(Code)
The Document being created.



_factory
protected IDOMFactory _factory(Code)
The iDOM factory.



_inCData
protected boolean _inCData(Code)
Indicator of whether we are in a CDATA.



_inDTD
protected boolean _inDTD(Code)
Indicator of whether we are in a DTD.



_loc
protected Locator _loc(Code)
Locator.



_stack
protected Stack _stack(Code)
The Group stack. The top one is the current group being processed.




Constructor Detail
SAXHandler
public SAXHandler(IDOMFactory factory)(Code)
Constructor.
Parameters:
  factory - the iDOM factory; null for DefaultIDOMFactory.



SAXHandler
public SAXHandler()(Code)
Constructor.




Method Detail
addToCurrentGroup
final protected void addToCurrentGroup(Item vtx)(Code)
Adds the item to the current group; also attach the locator.



attachLocator
final protected void attachLocator(Item vtx)(Code)
Attaches the locator to the item.



attributeDecl
public void attributeDecl(String eName, String aName, String type, String valueDefault, String value) throws SAXException(Code)



characters
public void characters(char[] ch, int start, int length) throws SAXException(Code)



comment
public void comment(char[] ch, int start, int length) throws SAXException(Code)



defaultResolveEntity
protected InputSource defaultResolveEntity(String publicId, String systemId) throws SAXException(Code)
The default entity resolver. It is used if SAXHandler.setEntityResolver is not called. This implementation searches the class path under /metainfo/xml.

For example, http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd is asked. It searches from classpath for /metainfo/xml/java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd and /metainfo/xml/portlet-app_1_0.xsd




elementDecl
public void elementDecl(String name, String model) throws SAXException(Code)



endCDATA
public void endCDATA() throws SAXException(Code)



endDTD
public void endDTD() throws SAXException(Code)



endDocument
public void endDocument() throws SAXException(Code)



endElement
public void endElement(String nsURI, String lname, String tname) throws SAXException(Code)



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



endPrefixMapping
public void endPrefixMapping(String prefix) throws SAXException(Code)



error
public void error(SAXParseException ex) throws SAXException(Code)



externalEntityDecl
public void externalEntityDecl(String name, String pubId, String sysId) throws SAXException(Code)



fatalError
public void fatalError(SAXParseException ex) throws SAXException(Code)



getDocument
final public Document getDocument()(Code)
Gets the document being created. Called to retrieve the iDOM tree after parsed.



getEntityResolver
final public EntityResolver getEntityResolver()(Code)
Gets the org.xml.sax.EntityResolver. the enity resolverr; null to use the default implementation



getErrorHandler
final public ErrorHandler getErrorHandler()(Code)
Gets the org.xml.sax.ErrorHandler. the error handler; null to use the default implementation



getIDOMFactory
final public IDOMFactory getIDOMFactory()(Code)
Gets the iDOM factory. Null for DefaultIDOMFactory.THE.



getTopGroup
final protected Group getTopGroup()(Code)
Returns the top group, or null if not available.



ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException(Code)



internalEntityDecl
public void internalEntityDecl(String name, String value) throws SAXException(Code)



isCoalescing
final public boolean isCoalescing()(Code)
Indicates whether or not the factory is configured to produce parsers which converts CDATA to Text and appends it to the adjacent (if any) Text node.

Default: false. true if the factory is configured to produce parsers whichconverts CDATA nodes to Text nodesand appends it to the adjacent (if any) Text node; false otherwise.




isExpandEntityReferences
final public boolean isExpandEntityReferences()(Code)
Tests whether to expand entity reference nodes.



isIgnoringComments
final public boolean isIgnoringComments()(Code)
Indicates whether or not the factory is configured to produce parsers which ignores comments.

Default: false. true if the factory is configured to produce parserswhich ignores comments; false otherwise.




isIgnoringElementContentWhitespace
final public boolean isIgnoringElementContentWhitespace()(Code)
Tests whether to ignore whitespaces in element content.



notationDecl
public void notationDecl(String name, String publicID, String systemID) throws SAXException(Code)



popGroup
final protected void popGroup()(Code)
Pops out the current group, and the one under it becomes the new current group.



processingInstruction
public void processingInstruction(String target, String data) throws SAXException(Code)



pushGroup
final protected void pushGroup(Group group)(Code)
Adds a new group to the current group as a child, and pushes the new group to be the new current group.



resolveEntity
public InputSource resolveEntity(String publicId, String systemId) throws SAXException(Code)



setCoalescing
final public void setCoalescing(boolean coalescing)(Code)
Specifies that the parser produced by this code will convert CDATA to Text and append it to the adjacent (if any) text.

Default: false.




setDocumentLocator
public void setDocumentLocator(Locator locator)(Code)



setEntityResolver
final public void setEntityResolver(org.xml.sax.EntityResolver er)(Code)
Specifies the org.xml.sax.EntityResolver to be used to resolve entities present in the XML docu-ment to be parsed.

Default: null -- to use the default implementation and behavior.




setErrorHandler
final public void setErrorHandler(ErrorHandler eh)(Code)
Specifies the org.xml.sax.ErrorHandler to be used to report errors present in the XML document to be parsed.

Default: null -- to use the default imple-mentation and behavior.




setExpandEntityReferences
final public void setExpandEntityReferences(boolean expand)(Code)
Sets whether to expand entities during parsing. A true means to expand entities as normal content. A false means to leave entities unexpanded as EntityReference objects.

Default: true.
Parameters:
  expand - whether entity expansion should occur.




setIDOMFactory
final public void setIDOMFactory(IDOMFactory factory)(Code)
Sets the iDOM factory. Null for DefaultIDOMFactory.THE.



setIgnoringComments
final public void setIgnoringComments(boolean ignoreComments)(Code)
Specifies that the parser produced by this code will ignore comments.

Default: false.




setIgnoringElementContentWhitespace
final public void setIgnoringElementContentWhitespace(boolean ignore)(Code)
Sets whether the parser should elminate whitespace in element content. They are known as "ignorable whitespace". Only whitespace which is contained within element content that has an element only content model will be eliminated (see XML Rec 2.10).

For this setting to take effect requires that validation be turned on.

Default: false.
Parameters:
  ignore - Whether to ignore whitespaces in element content.




startCDATA
public void startCDATA() throws SAXException(Code)



startDTD
public void startDTD(String name, String pubId, String sysId) throws SAXException(Code)



startDocument
public void startDocument() throws SAXException(Code)



startElement
public void startElement(String nsURI, String lname, String tname, Attributes attrs) throws SAXException(Code)



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



startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws SAXException(Code)



unparsedEntityDecl
public void unparsedEntityDecl(String name, String pubId, String sysId, String notationName) throws SAXException(Code)



warning
public void warning(SAXParseException ex) throws SAXException(Code)



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.