Java Doc for DTDGrammar.java in  » Web-Server » Rimfaxe-Web-Server » org » apache » xerces » validators » dtd » 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 » Web Server » Rimfaxe Web Server » org.apache.xerces.validators.dtd 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.xerces.validators.common.Grammar
      org.apache.xerces.validators.dtd.DTDGrammar

DTDGrammar
public class DTDGrammar extends Grammar implements XMLDTDScanner.EventHandler(Code)
A DTD grammar. This class is an EventHandler to receive callbacks from the XMLDTDScanner. When the callbacks are received, the grammar structures are directly populated from the callback information.

In addition to being a recipient of scanner callbacks, the DTD grammar class can act as a pass-through filter for the DTD events. This is useful for parsers that must expose the DTD information to the application. (e.g. SAX2 DeclHandler callbacks.)
author:
   Andy Clark
version:
   $Id: DTDGrammar.java,v 1.10 2001/07/20 17:27:38 lmartin Exp $




Constructor Summary
public  DTDGrammar(StringPool stringPool)
     Default constructor.

Method Summary
public  intaddAttDef(QName elementDecl, QName attributeDecl, int attType, boolean attList, int enumeration, int attDefaultType, int attDefaultValue, boolean isExternal)
    
public  intaddContentSpecNode(int nodeType, int nodeValue)
    
public  intaddContentSpecNode(int nodeType, int leftNodeIndex, int rightNodeIndex)
    
public  intaddElementDecl(QName elementDecl)
    
public  intaddElementDecl(QName elementDecl, int contentSpecType, int contentSpec, boolean isExternal)
    
public  intaddExternalEntityDecl(int name, int publicId, int systemId)
    
public  intaddExternalPEDecl(int name, int publicId, int systemId)
    
public  intaddInternalEntityDecl(int name, int value)
    
public  intaddInternalPEDecl(int name, int value)
    
public  voidaddNameToEnumeration(int enumIndex, int elementType, int attrName, int nameIndex, boolean isNotationType)
    
public  intaddNotationDecl(int notationName, int publicId, int systemId)
    
public  intaddUniqueLeafNode(int nameIndex)
    
public  intaddUnparsedEntityDecl(int name, int publicId, int systemId, int notationName)
    
public  voidcallComment(int data)
    
public  voidcallEndDTD()
     End of DTD.
public  voidcallProcessingInstruction(int piTarget, int piData)
    
public  voidcallStartDTD()
     Start of DTD.
public  voidcallTextDecl(int version, int encoding)
     Signal the Text declaration of an external entity.
public  voiddoctypeDecl(QName rootElement, int publicId, int systemId)
    
public  voidendEntityDecl()
     End the scope of an entity declaration.
public  voidendEnumeration(int enumIndex)
    
public  booleangetAttributeDeclIsExternal(int attributeDeclIndex)
    
public  StringgetContentSpecNodeAsString(int nodeIndex)
    
public  intgetElementDeclIndex(QName element, int scopeIndex)
    
public  booleangetElementDeclIsExternal(int elementDeclIndex)
    
public  booleangetRootElementQName(QName root)
    
public  voidinternalSubset(int internalSubset)
     Supports DOM Level 2 internalSubset additions.
protected  booleanisDTD()
    
protected  voidputElementNameMapping(QName name, int scope, int elementDeclIndex)
    
public  voidreset(StringPool stringPool)
     Resets the DTD grammar.
public  voidsetElementDeclDTD(int elementDeclIndex, XMLElementDecl elementDecl)
    
public  voidsetElementDeclIsExternal(int elementDeclIndex, boolean isExternal)
    
public  booleanstartEntityDecl(boolean isPE, int entityName)
     Start the scope of an entity declaration.
public  intstartEnumeration()
    
public  voidstartReadingFromExternalSubset(int publicId, int systemId)
    
public  voidstopReadingFromExternalSubset()
    


Constructor Detail
DTDGrammar
public DTDGrammar(StringPool stringPool)(Code)
Default constructor.




Method Detail
addAttDef
public int addAttDef(QName elementDecl, QName attributeDecl, int attType, boolean attList, int enumeration, int attDefaultType, int attDefaultValue, boolean isExternal) throws Exception(Code)
Add an attribute definition
Parameters:
  handle - to the element whose attribute is being declared
Parameters:
  attName - StringPool handle to the attribute name being declared
Parameters:
  attType - type of the attribute
Parameters:
  enumeration - StringPool handle of the attribute's enumeration list (if any)
Parameters:
  attDefaultType - an integer value denoting the DefaultDecl value
Parameters:
  attDefaultValue - StringPool handle of this attribute's default value handle to the attribute definition
exception:
  java.lang.Exception -



addContentSpecNode
public int addContentSpecNode(int nodeType, int nodeValue) throws Exception(Code)
Create an XMLContentSpec for a single non-leaf
Parameters:
  nodeType - the type of XMLContentSpec to create - from XMLContentSpec.CONTENTSPECNODE_*
Parameters:
  nodeValue - handle to an XMLContentSpec handle to the newly create XMLContentSpec
exception:
  java.lang.Exception -



addContentSpecNode
public int addContentSpecNode(int nodeType, int leftNodeIndex, int rightNodeIndex) throws Exception(Code)
Create an XMLContentSpec for a two child leaf
Parameters:
  nodeType - the type of XMLContentSpec to create - from XMLContentSpec.CONTENTSPECNODE_*
Parameters:
  leftNodeIndex - handle to an XMLContentSpec
Parameters:
  rightNodeIndex - handle to an XMLContentSpec handle to the newly create XMLContentSpec
exception:
  java.lang.Exception -



addElementDecl
public int addElementDecl(QName elementDecl) throws Exception(Code)
Add an element declaration (forward reference)
Parameters:
  handle - to the name of the element being declared handle to the element whose declaration was added
exception:
  java.lang.Exception -



addElementDecl
public int addElementDecl(QName elementDecl, int contentSpecType, int contentSpec, boolean isExternal) throws Exception(Code)
Add an element declaration
Parameters:
  handle - to the name of the element being declared
Parameters:
  contentSpecType - handle to the type name of the content spec
Parameters:
  ContentSpec - handle to the content spec node for the contentSpecType handle to the element declaration that was added
exception:
  java.lang.Exception -



addExternalEntityDecl
public int addExternalEntityDecl(int name, int publicId, int systemId) throws Exception(Code)
Add a declaration for an entity
Parameters:
  name - StringPool handle of the entity name
Parameters:
  publicId - StringPool handle of the publicId
Parameters:
  systemId - StringPool handle of the systemId handle to the entity declaration
exception:
  java.lang.Exception -



addExternalPEDecl
public int addExternalPEDecl(int name, int publicId, int systemId) throws Exception(Code)
Add a declaration for an external parameter entity
Parameters:
  name - StringPool handle of the parameter entity name
Parameters:
  publicId - StringPool handle of the publicId
Parameters:
  systemId - StringPool handle of the systemId handle to the parameter entity declaration
exception:
  java.lang.Exception -



addInternalEntityDecl
public int addInternalEntityDecl(int name, int value) throws Exception(Code)
Add a declaration for an internal entity
Parameters:
  name - StringPool handle of the entity name
Parameters:
  value - StringPool handle of the entity value handle to the entity declaration
exception:
  java.lang.Exception -



addInternalPEDecl
public int addInternalPEDecl(int name, int value) throws Exception(Code)
Add a declaration for an internal parameter entity
Parameters:
  name - StringPool handle of the parameter entity name
Parameters:
  value - StringPool handle of the parameter entity value handle to the parameter entity declaration
exception:
  java.lang.Exception -



addNameToEnumeration
public void addNameToEnumeration(int enumIndex, int elementType, int attrName, int nameIndex, boolean isNotationType) throws Exception(Code)
Add a name to an enumeration
Parameters:
  enumIndex - StringPool handle to the string list for the enumeration
Parameters:
  elementType - handle to the element that owns the attribute with the enumeration
Parameters:
  attrName - StringPool handle to the name of the attribut with the enumeration
Parameters:
  nameIndex - StringPool handle to the name to be added to the enumeration
Parameters:
  isNotationType - true if the enumeration is an enumeration of NOTATION names
exception:
  java.lang.Exception -



addNotationDecl
public int addNotationDecl(int notationName, int publicId, int systemId) throws Exception(Code)
Add a declaration for a notation
Parameters:
  notationName -
Parameters:
  publicId -
Parameters:
  systemId - handle to the notation declaration
exception:
  java.lang.Exception -



addUniqueLeafNode
public int addUniqueLeafNode(int nameIndex) throws Exception(Code)
create an XMLContentSpec for a leaf
Parameters:
  nameIndex - StringPool handle to the name (Element) for the node handle to the newly create XMLContentSpec
exception:
  java.lang.Exception -



addUnparsedEntityDecl
public int addUnparsedEntityDecl(int name, int publicId, int systemId, int notationName) throws Exception(Code)
Add a declaration for an unparsed entity
Parameters:
  name - StringPool handle of the entity name
Parameters:
  publicId - StringPool handle of the publicId
Parameters:
  systemId - StringPool handle of the systemId
Parameters:
  notationName - StringPool handle of the notationName handle to the entity declaration
exception:
  java.lang.Exception -



callComment
public void callComment(int data) throws Exception(Code)
Called when a comment has been scanned
Parameters:
  data - StringPool handle of the comment text
exception:
  java.lang.Exception -



callEndDTD
public void callEndDTD() throws Exception(Code)
End of DTD.



callProcessingInstruction
public void callProcessingInstruction(int piTarget, int piData) throws Exception(Code)
Called when a processing instruction has been scanned
Parameters:
  piTarget - StringPool handle of the PI target
Parameters:
  piData - StringPool handle of the PI data
exception:
  java.lang.Exception -



callStartDTD
public void callStartDTD() throws Exception(Code)
Start of DTD.



callTextDecl
public void callTextDecl(int version, int encoding) throws Exception(Code)
Signal the Text declaration of an external entity.
Parameters:
  version - the handle in the string pool for the version number
Parameters:
  encoding - the handle in the string pool for the encoding
exception:
  java.lang.Exception -



doctypeDecl
public void doctypeDecl(QName rootElement, int publicId, int systemId) throws Exception(Code)
Called when the doctype decl is scanned
Parameters:
  rootElementType - handle of the rootElement
Parameters:
  publicId - StringPool handle of the public id
Parameters:
  systemId - StringPool handle of the system id
exception:
  java.lang.Exception -



endEntityDecl
public void endEntityDecl() throws Exception(Code)
End the scope of an entity declaration.
exception:
  java.lang.Exception -



endEnumeration
public void endEnumeration(int enumIndex) throws Exception(Code)
Finish processing an enumeration
Parameters:
  enumIndex - handle to the string list which holds the enumeration to be finshed.
exception:
  java.lang.Exception -



getAttributeDeclIsExternal
public boolean getAttributeDeclIsExternal(int attributeDeclIndex)(Code)



getContentSpecNodeAsString
public String getContentSpecNodeAsString(int nodeIndex) throws Exception(Code)
Create a string representation of an XMLContentSpec tree
Parameters:
  handle - to an XMLContentSpec String representation of the content spec tree
exception:
  java.lang.Exception -



getElementDeclIndex
public int getElementDeclIndex(QName element, int scopeIndex)(Code)
public int getElementDeclIndex(int localpartIndex, int scopeIndex) { //System.out.println("getElementDeclIndex: "+localpartIndex+", "+scopeIndex); return super.getElementDeclIndex(localpartIndex, scopeIndex); } public int getElementDeclIndex(int uriIndex, int localpartIndex, int scopeIndex) { //System.out.println("!!! getElementDeclIndex: "+uriIndex+", "+localpartIndex+", "+scopeIndex); return super.getElementDeclIndex(localpartIndex, -1); } /**



getElementDeclIsExternal
public boolean getElementDeclIsExternal(int elementDeclIndex)(Code)



getRootElementQName
public boolean getRootElementQName(QName root)(Code)



internalSubset
public void internalSubset(int internalSubset) throws Exception(Code)
Supports DOM Level 2 internalSubset additions. Called when the internal subset is completely scanned.



isDTD
protected boolean isDTD()(Code)



putElementNameMapping
protected void putElementNameMapping(QName name, int scope, int elementDeclIndex)(Code)



reset
public void reset(StringPool stringPool)(Code)
Resets the DTD grammar.



setElementDeclDTD
public void setElementDeclDTD(int elementDeclIndex, XMLElementDecl elementDecl)(Code)



setElementDeclIsExternal
public void setElementDeclIsExternal(int elementDeclIndex, boolean isExternal)(Code)
public void setContentSpecLeaf(int contentSpecIndex, QName elementName) { fTempContentSpec.setValues(XMLContentSpec.CONTENTSPECNODE_LEAF, elementName.rawname, -1); super.setContentSpec(contentSpecIndex, fTempContentSpec); } /**



startEntityDecl
public boolean startEntityDecl(boolean isPE, int entityName) throws Exception(Code)
Start the scope of an entity declaration. true on success; otherwisefalse if the entity declaration is recursive.
exception:
  java.lang.Exception -



startEnumeration
public int startEnumeration() throws Exception(Code)
Called when the scanner start scanning an enumeration StringPool handle to a string list that will hold the enumeration names
exception:
  java.lang.Exception -



startReadingFromExternalSubset
public void startReadingFromExternalSubset(int publicId, int systemId) throws Exception(Code)
Called when the DTDScanner starts reading from the external subset
Parameters:
  publicId - StringPool handle of the public id
Parameters:
  systemId - StringPool handle of the system id
exception:
  java.lang.Exception -



stopReadingFromExternalSubset
public void stopReadingFromExternalSubset() throws Exception(Code)
Called when the DTDScanner stop reading from the external subset
exception:
  java.lang.Exception -



Fields inherited from org.apache.xerces.validators.common.Grammar
final public static int TOP_LEVEL_SCOPE(Code)(Java Doc)

Methods inherited from org.apache.xerces.validators.common.Grammar
protected void clearContentModel(int contentSpecIndex)(Code)(Java Doc)
protected int convertContentSpecTree(int index)(Code)(Java Doc)
protected int createAttributeDecl()(Code)(Java Doc)
protected int createContentSpec()(Code)(Java Doc)
protected int createElementDecl()(Code)(Java Doc)
protected boolean existContentModel(int contentSpecIndex)(Code)(Java Doc)
public boolean getAttributeDecl(int attributeDeclIndex, XMLAttributeDecl attributeDecl)(Code)(Java Doc)
public XMLContentModel getContentModel(int contentSpecIndex, int contentType, SubstitutionGroupComparator comparator) throws Exception(Code)(Java Doc)
public boolean getContentSpec(int contentSpecIndex, XMLContentSpec contentSpec)(Code)(Java Doc)
public XMLContentModel getElementContentModel(int elementDeclIndex, SubstitutionGroupComparator comparator) throws Exception(Code)(Java Doc)
public boolean getElementDecl(int elementDeclIndex, XMLElementDecl elementDecl)(Code)(Java Doc)
public int getElementDeclIndex(int localpartIndex, int scopeIndex)(Code)(Java Doc)
public int getElementDeclIndex(int uriIndex, int localpartIndex, int scopeIndex)(Code)(Java Doc)
public int getElementDeclIndex(QName element, int scopeIndex)(Code)(Java Doc)
public int getFirstAttributeDeclIndex(int elementDeclIndex)(Code)(Java Doc)
public Document getGrammarDocument()(Code)(Java Doc)
public int getNextAttributeDeclIndex(int attributeDeclIndex)(Code)(Java Doc)
protected boolean isDTD()(Code)(Java Doc)
public void printAttributes(int elementDeclIndex)(Code)(Java Doc)
public void printElements(org.apache.xerces.utils.StringPool pool)(Code)(Java Doc)
protected void putElementNameMapping(QName name, int scope, int elementDeclIndex)(Code)(Java Doc)
protected void setAttributeDecl(int elementDeclIndex, int attributeDeclIndex, XMLAttributeDecl attributeDecl)(Code)(Java Doc)
protected void setContentSpec(int contentSpecIndex, XMLContentSpec contentSpec)(Code)(Java Doc)
protected void setElementDecl(int elementDeclIndex, XMLElementDecl elementDecl)(Code)(Java Doc)
protected void setFirstAttributeDeclIndex(int elementDeclIndex, int newFirstAttrIndex)(Code)(Java Doc)
protected void setGrammarDocument(Document grammarDocument)(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.