Java Doc for XMLDTDScannerImpl.java in  » 6.0-JDK-Modules » sjsxp » com » sun » xml » stream » 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 » 6.0 JDK Modules » sjsxp » com.sun.xml.stream 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.xml.stream.XMLScanner
      com.sun.xml.stream.XMLDTDScannerImpl

XMLDTDScannerImpl
public class XMLDTDScannerImpl extends XMLScanner implements XMLDTDScanner,XMLComponent,XMLEntityHandler(Code)
This class is responsible for scanning the declarations found in the internal and external subsets of a DTD in an XML document. The scanner acts as the sources for the DTD information which is communicated to the DTD handlers.

This component requires the following features and properties from the component manager that uses it:

  • http://xml.org/sax/features/validation
  • http://apache.org/xml/features/scanner/notify-char-refs
  • http://apache.org/xml/properties/internal/symbol-table
  • http://apache.org/xml/properties/internal/error-reporter
  • http://apache.org/xml/properties/internal/entity-manager

author:
   Arnaud Le Hors, IBM
author:
   Andy Clark, IBM
author:
   Glenn Marcy, IBM
author:
   Eric Ye, IBM
author:
   Sunitha Reddy, Sun Microsystems
version:
   $Id: XMLDTDScannerImpl.java,v 1.4 2006/11/29 22:01:31 spericas Exp $


Field Summary
final protected static  intSCANNER_STATE_END_OF_INPUT
     Scanner state: end of input.
final protected static  intSCANNER_STATE_MARKUP_DECL
     Scanner state: markup declaration.
final protected static  intSCANNER_STATE_TEXT_DECL
     Scanner state: text declaration.
protected  XMLDTDContentModelHandlerfDTDContentModelHandler
     DTD content model handler.
public  XMLDTDHandlerfDTDHandler
     DTD handler.
protected  intfScannerState
     Scanner state.
protected  booleanfSeenExternalDTD
     Seen external DTD.
protected  booleanfSeenExternalPE
     Seen external parameter entity.
protected  booleanfStandalone
     Standalone.
 booleannonValidatingMode
    
 DTDGrammarnvGrammarInfo
     Object contains grammar information for a non-validaing parser.

Constructor Summary
public  XMLDTDScannerImpl()
     Default constructor.
public  XMLDTDScannerImpl(SymbolTable symbolTable, XMLErrorReporter errorReporter, XMLEntityManager entityManager)
     Constructor for he use of non-XMLComponentManagers.

Method Summary
public  voidendEntity(String name)
     This method notifies the end of an entity.
public  XMLDTDContentModelHandlergetDTDContentModelHandler()
    
public  XMLDTDHandlergetDTDHandler()
    
public  BooleangetFeatureDefault(String featureId)
     Returns the default state for a feature, or null if this component does not want to report a default value for this feature.
public  DTDGrammargetGrammar()
    
public  ObjectgetPropertyDefault(String propertyId)
     Returns the default state for a property, or null if this component does not want to report a default value for this property.
public  String[]getRecognizedFeatures()
     Returns a list of feature identifiers that are recognized by this component.
public  String[]getRecognizedProperties()
     Returns a list of property identifiers that are recognized by this component.
public  voidreset(XMLComponentManager componentManager)
    
public  voidreset()
    
public  voidreset(PropertyManager props)
    
final protected  StringscanAttDefaultDecl(String elName, String atName, String type, XMLString defaultVal, XMLString nonNormalizedDefaultVal)
    
final protected  voidscanAttlistDecl()
    
final protected  voidscanComment()
     Scans a comment.
public  booleanscanDTDExternalSubset(boolean complete)
     Scans the external subset of the document.
Parameters:
  complete - True if the scanner should scan the documentcompletely, pushing all events to the registereddocument handler.
public  booleanscanDTDInternalSubset(boolean complete, boolean standalone, boolean hasExternalSubset)
     Scans the internal subset of the document.
Parameters:
  complete - True if the scanner should scan the documentcompletely, pushing all events to the registereddocument handler.
final protected  booleanscanDecls(boolean complete)
     Dispatch an XML "event".
Parameters:
  complete - True if this method is intended to scanand dispatch as much as possible.
final protected  voidscanElementDecl()
    
final protected  voidscanEntityValue(XMLString value, XMLString nonNormalizedValue)
     Scans an entity value.
final protected  voidscanPIData(String target, XMLString data)
     Scans a processing data.
final protected  booleanscanTextDecl()
     Dispatch an XML "event".
Parameters:
  complete - True if this method is intended to scanand dispatch as much as possible.
final protected  booleanscanningInternalSubset()
    
public  voidsetDTDContentModelHandler(XMLDTDContentModelHandler dtdContentModelHandler)
    
public  voidsetDTDHandler(XMLDTDHandler dtdHandler)
    
public  voidsetInputSource(XMLInputSource inputSource)
     Sets the input source.
final protected  voidsetScannerState(int state)
     Sets the scanner state.
public  voidstartEntity(String name, XMLResourceIdentifier identifier, String encoding)
     This method notifies of the start of an entity.
protected  voidstartPE(String name, boolean literal)
    

Field Detail
SCANNER_STATE_END_OF_INPUT
final protected static int SCANNER_STATE_END_OF_INPUT(Code)
Scanner state: end of input.



SCANNER_STATE_MARKUP_DECL
final protected static int SCANNER_STATE_MARKUP_DECL(Code)
Scanner state: markup declaration.



SCANNER_STATE_TEXT_DECL
final protected static int SCANNER_STATE_TEXT_DECL(Code)
Scanner state: text declaration.



fDTDContentModelHandler
protected XMLDTDContentModelHandler fDTDContentModelHandler(Code)
DTD content model handler.



fDTDHandler
public XMLDTDHandler fDTDHandler(Code)
DTD handler.



fScannerState
protected int fScannerState(Code)
Scanner state.



fSeenExternalDTD
protected boolean fSeenExternalDTD(Code)
Seen external DTD.



fSeenExternalPE
protected boolean fSeenExternalPE(Code)
Seen external parameter entity.



fStandalone
protected boolean fStandalone(Code)
Standalone.



nonValidatingMode
boolean nonValidatingMode(Code)



nvGrammarInfo
DTDGrammar nvGrammarInfo(Code)
Object contains grammar information for a non-validaing parser.




Constructor Detail
XMLDTDScannerImpl
public XMLDTDScannerImpl()(Code)
Default constructor.



XMLDTDScannerImpl
public XMLDTDScannerImpl(SymbolTable symbolTable, XMLErrorReporter errorReporter, XMLEntityManager entityManager)(Code)
Constructor for he use of non-XMLComponentManagers.




Method Detail
endEntity
public void endEntity(String name) throws XNIException, IOException(Code)
This method notifies the end of an entity. The DTD has the pseudo-name of "[dtd]" parameter entity names start with '%'; and general entities are just specified by their name.
Parameters:
  name - The name of the entity.
throws:
  XNIException - Thrown by handler to signal an error.



getDTDContentModelHandler
public XMLDTDContentModelHandler getDTDContentModelHandler()(Code)
getDTDContentModelHandler XMLDTDContentModelHandler



getDTDHandler
public XMLDTDHandler getDTDHandler()(Code)
getDTDHandler the XMLDTDHandler



getFeatureDefault
public Boolean getFeatureDefault(String featureId)(Code)
Returns the default state for a feature, or null if this component does not want to report a default value for this feature.
Parameters:
  featureId - The feature identifier.
since:
   Xerces 2.2.0



getGrammar
public DTDGrammar getGrammar()(Code)



getPropertyDefault
public Object getPropertyDefault(String propertyId)(Code)
Returns the default state for a property, or null if this component does not want to report a default value for this property.
Parameters:
  propertyId - The property identifier.
since:
   Xerces 2.2.0



getRecognizedFeatures
public String[] getRecognizedFeatures()(Code)
Returns a list of feature identifiers that are recognized by this component. This method may return null if no features are recognized by this component.



getRecognizedProperties
public String[] getRecognizedProperties()(Code)
Returns a list of property identifiers that are recognized by this component. This method may return null if no properties are recognized by this component.



reset
public void reset(XMLComponentManager componentManager) throws XMLConfigurationException(Code)
reset
Parameters:
  componentManager -



reset
public void reset()(Code)



reset
public void reset(PropertyManager props)(Code)



scanAttDefaultDecl
final protected String scanAttDefaultDecl(String elName, String atName, String type, XMLString defaultVal, XMLString nonNormalizedDefaultVal) throws IOException, XNIException(Code)
Scans an attribute default declaration

 [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
 

Parameters:
  name - The name of the attribute being scanned.
Parameters:
  defaultVal - The string to fill in with the default value.



scanAttlistDecl
final protected void scanAttlistDecl() throws IOException, XNIException(Code)
Scans an attlist declaration

 [52]  AttlistDecl    ::=   '<!ATTLIST' S Name AttDef* S? '>'
 [53]  AttDef         ::=   S Name S AttType S DefaultDecl
 

Note: Called after scanning past '<!ATTLIST'




scanComment
final protected void scanComment() throws IOException, XNIException(Code)
Scans a comment.

 [15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
 

Note: Called after scanning past '<!--'




scanDTDExternalSubset
public boolean scanDTDExternalSubset(boolean complete) throws IOException, XNIException(Code)
Scans the external subset of the document.
Parameters:
  complete - True if the scanner should scan the documentcompletely, pushing all events to the registereddocument handler. A value of false indicates thatthat the scanner should only scan the next portionof the document and return. A scanner instance ispermitted to completely scan a document if it doesnot support this "pull" scanning model. True if there is more to scan, false otherwise.



scanDTDInternalSubset
public boolean scanDTDInternalSubset(boolean complete, boolean standalone, boolean hasExternalSubset) throws IOException, XNIException(Code)
Scans the internal subset of the document.
Parameters:
  complete - True if the scanner should scan the documentcompletely, pushing all events to the registereddocument handler. A value of false indicates thatthat the scanner should only scan the next portionof the document and return. A scanner instance ispermitted to completely scan a document if it doesnot support this "pull" scanning model.
Parameters:
  standalone - True if the document was specified as standalone.This value is important for verifying certainwell-formedness constraints.
Parameters:
  hasExternalDTD - True if the document has an external DTD.This allows the scanner to properly notifythe handler of the end of the DTD in theabsence of an external subset. True if there is more to scan, false otherwise.



scanDecls
final protected boolean scanDecls(boolean complete) throws IOException, XNIException(Code)
Dispatch an XML "event".
Parameters:
  complete - True if this method is intended to scanand dispatch as much as possible. True if there is more to scan.
throws:
  IOException - Thrown on i/o error.
throws:
  XNIException - Thrown on parse error.



scanElementDecl
final protected void scanElementDecl() throws IOException, XNIException(Code)
Scans an element declaration

 [45]    elementdecl    ::=    '<!ELEMENT' S Name S contentspec S? '>'
 [46]    contentspec    ::=    'EMPTY' | 'ANY' | Mixed | children
 

Note: Called after scanning past '<!ELEMENT'




scanEntityValue
final protected void scanEntityValue(XMLString value, XMLString nonNormalizedValue) throws IOException, XNIException(Code)
Scans an entity value.
Parameters:
  value - The string to fill in with the value.
Parameters:
  nonNormalizedValue - The string to fill in with thenon-normalized value.Note: This method uses fString, fStringBuffer (throughthe use of scanCharReferenceValue), and fStringBuffer2, anything in themat the time of calling is lost.



scanPIData
final protected void scanPIData(String target, XMLString data) throws IOException, XNIException(Code)
Scans a processing data. This is needed to handle the situation where a document starts with a processing instruction whose target name starts with "xml". (e.g. xmlfoo)
Parameters:
  target - The PI target
Parameters:
  data - The string to fill in with the data



scanTextDecl
final protected boolean scanTextDecl() throws IOException, XNIException(Code)
Dispatch an XML "event".
Parameters:
  complete - True if this method is intended to scanand dispatch as much as possible. True if a TextDecl was scanned.
throws:
  IOException - Thrown on i/o error.
throws:
  XNIException - Thrown on parse error.



scanningInternalSubset
final protected boolean scanningInternalSubset()(Code)



setDTDContentModelHandler
public void setDTDContentModelHandler(XMLDTDContentModelHandler dtdContentModelHandler)(Code)
setDTDContentModelHandler
Parameters:
  dtdContentModelHandler -



setDTDHandler
public void setDTDHandler(XMLDTDHandler dtdHandler)(Code)
setDTDHandler
Parameters:
  dtdHandler -



setInputSource
public void setInputSource(XMLInputSource inputSource) throws IOException(Code)
Sets the input source.
Parameters:
  inputSource - The input source or null.
throws:
  IOException - Thrown on i/o error.



setScannerState
final protected void setScannerState(int state)(Code)
Sets the scanner state.
Parameters:
  state - The new scanner state.



startEntity
public void startEntity(String name, XMLResourceIdentifier identifier, String encoding) throws XNIException(Code)
This method notifies of the start of an entity. The DTD has the pseudo-name of "[dtd]" parameter entity names start with '%'; and general entities are just specified by their name.
Parameters:
  name - The name of the entity.
Parameters:
  identifier - The resource identifier.
Parameters:
  encoding - The auto-detected IANA encoding name of the entitystream. This value will be null in those situationswhere the entity encoding is not auto-detected (e.g.internal entities or a document entity that isparsed from a java.io.Reader).
throws:
  XNIException - Thrown by handler to signal an error.



startPE
protected void startPE(String name, boolean literal) throws IOException, XNIException(Code)
start a parameter entity dealing with the textdecl if there is any
Parameters:
  name - The name of the parameter entity to start (without the '%')
Parameters:
  literal - Whether this is happening within a literal



Fields inherited from com.sun.xml.stream.XMLScanner
final protected static boolean DEBUG_ATTR_NORMALIZATION(Code)(Java Doc)
final protected static String ENTITY_MANAGER(Code)(Java Doc)
final protected static String ERROR_REPORTER(Code)(Java Doc)
final protected static String NOTIFY_CHAR_REFS(Code)(Java Doc)
final protected static String SYMBOL_TABLE(Code)(Java Doc)
final protected static String VALIDATION(Code)(Java Doc)
protected ArrayList attributeValueCache(Code)(Java Doc)
final protected static String fAmpSymbol(Code)(Java Doc)
final protected static String fAposSymbol(Code)(Java Doc)
protected boolean fAttributeCacheInitDone(Code)(Java Doc)
protected int fAttributeCacheUsedCount(Code)(Java Doc)
protected String fCharRefLiteral(Code)(Java Doc)
final protected static String fEncodingSymbol(Code)(Java Doc)
protected int fEntityDepth(Code)(Java Doc)
protected XMLEntityManager fEntityManager(Code)(Java Doc)
protected XMLEntityReaderImpl fEntityScanner(Code)(Java Doc)
protected XMLEntityStorage fEntityStore(Code)(Java Doc)
protected XMLErrorReporter fErrorReporter(Code)(Java Doc)
protected XMLEvent fEvent(Code)(Java Doc)
final protected static String fGtSymbol(Code)(Java Doc)
final protected static String fLtSymbol(Code)(Java Doc)
protected boolean fNotifyCharRefs(Code)(Java Doc)
protected PropertyManager fPropertyManager(Code)(Java Doc)
final protected static String fQuotSymbol(Code)(Java Doc)
protected boolean fReportEntity(Code)(Java Doc)
protected XMLResourceIdentifierImpl fResourceIdentifier(Code)(Java Doc)
protected boolean fScanningAttribute(Code)(Java Doc)
final protected static String fStandaloneSymbol(Code)(Java Doc)
protected int fStringBufferIndex(Code)(Java Doc)
protected SymbolTable fSymbolTable(Code)(Java Doc)
protected boolean fValidation(Code)(Java Doc)
final protected static String fVersionSymbol(Code)(Java Doc)
int initialCacheCount(Code)(Java Doc)
protected ArrayList stringBufferCache(Code)(Java Doc)

Methods inherited from com.sun.xml.stream.XMLScanner
public void endEntity(String name) throws IOException, XNIException(Code)(Java Doc)
public boolean getFeature(String featureId) throws XMLConfigurationException(Code)(Java Doc)
XMLStringBuffer getStringBuffer()(Code)(Java Doc)
protected static boolean isInvalid(int value)(Code)(Java Doc)
protected static boolean isInvalidLiteral(int value)(Code)(Java Doc)
protected static boolean isValidNCName(int value)(Code)(Java Doc)
protected static boolean isValidNameChar(int value)(Code)(Java Doc)
protected static boolean isValidNameStartChar(int value)(Code)(Java Doc)
protected void normalizeWhitespace(XMLString value)(Code)(Java Doc)
protected void reportFatalError(String msgId, Object[] args) throws XNIException(Code)(Java Doc)
public void reset(XMLComponentManager componentManager) throws XMLConfigurationException(Code)(Java Doc)
public void reset(PropertyManager propertyManager)(Code)(Java Doc)
protected void scanAttributeValue(XMLString value, XMLString nonNormalizedValue, String atName, XMLAttributes attributes, int attrIndex, boolean checkEntities) throws IOException, XNIException(Code)(Java Doc)
protected int scanCharReferenceValue(XMLStringBuffer buf, XMLStringBuffer buf2) throws IOException, XNIException(Code)(Java Doc)
protected void scanComment(XMLStringBuffer text) throws IOException, XNIException(Code)(Java Doc)
protected void scanExternalID(String[] identifiers, boolean optionalSystemId) throws IOException, XNIException(Code)(Java Doc)
protected void scanPI(XMLStringBuffer data) throws IOException, XNIException(Code)(Java Doc)
protected void scanPIData(String target, XMLStringBuffer data) throws IOException, XNIException(Code)(Java Doc)
public String scanPseudoAttribute(boolean scanningTextDecl, XMLString value) throws IOException, XNIException(Code)(Java Doc)
protected boolean scanPubidLiteral(XMLString literal) throws IOException, XNIException(Code)(Java Doc)
protected boolean scanSurrogates(XMLStringBuffer buf) throws IOException, XNIException(Code)(Java Doc)
protected void scanXMLDeclOrTextDecl(boolean scanningTextDecl, String[] pseudoAttributeValues) throws IOException, XNIException(Code)(Java Doc)
public void setFeature(String featureId, boolean value) throws XMLConfigurationException(Code)(Java Doc)
public void setProperty(String propertyId, Object value) throws XMLConfigurationException(Code)(Java Doc)
protected void setPropertyManager(PropertyManager propertyManager)(Code)(Java Doc)
public void startEntity(String name, XMLResourceIdentifier identifier, String encoding) throws XNIException(Code)(Java Doc)
protected boolean versionSupported(String version)(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.