Java Doc for XMLEntityManager.java in  » XML » xerces-2_9_1 » org » apache » xerces » impl » 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 » XML » xerces 2_9_1 » org.apache.xerces.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.xerces.impl.XMLEntityManager

XMLEntityManager
public class XMLEntityManager implements XMLComponent,XMLEntityResolver(Code)
The entity manager handles the registration of general and parameter entities; resolves entities; and starts entities. The entity manager is a central component in a standard parser configuration and this class works directly with the entity scanner to manage the underlying xni.

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

  • http://xml.org/sax/features/validation
  • http://xml.org/sax/features/external-general-entities
  • http://xml.org/sax/features/external-parameter-entities
  • http://apache.org/xml/features/allow-java-encodings
  • http://apache.org/xml/properties/internal/symbol-table
  • http://apache.org/xml/properties/internal/error-reporter
  • http://apache.org/xml/properties/internal/entity-resolver

author:
   Andy Clark, IBM
author:
   Arnaud Le Hors, IBM
version:
   $Id: XMLEntityManager.java 572040 2007-09-02 17:24:29Z mrglavas $

Inner Class :abstract public static class Entity
Inner Class :protected static class InternalEntity extends Entity
Inner Class :protected static class ExternalEntity extends Entity
Inner Class :public class ScannedEntity extends Entity
Inner Class :final protected class RewindableInputStream extends InputStream

Field Summary
final protected static  StringALLOW_JAVA_ENCODINGS
     Feature identifier: allow Java encodings.
final protected static  StringBUFFER_SIZE
     property identifier: buffer size.
final public static  intDEFAULT_BUFFER_SIZE
     Default buffer size (2048).
final public static  intDEFAULT_INTERNAL_BUFFER_SIZE
     Default internal entity buffer size (512).
final public static  intDEFAULT_XMLDECL_BUFFER_SIZE
    
final protected static  StringENTITY_RESOLVER
     Property identifier: entity resolver.
final protected static  StringERROR_REPORTER
     Property identifier: error reporter.
final protected static  StringEXTERNAL_GENERAL_ENTITIES
     Feature identifier: external general entities.
final protected static  StringEXTERNAL_PARAMETER_ENTITIES
     Feature identifier: external parameter entities.
final protected static  StringPARSER_SETTINGS
    
final protected static  StringSECURITY_MANAGER
     property identifier: security manager.
final protected static  StringSTANDARD_URI_CONFORMANT
    
final protected static  StringSYMBOL_TABLE
     Property identifier: symbol table.
final protected static  StringVALIDATION
     Feature identifier: validation.
final protected static  StringVALIDATION_MANAGER
    
final protected static  StringWARN_ON_DUPLICATE_ENTITYDEF
    
protected  booleanfAllowJavaEncodings
     Allow Java encoding names.
protected  intfBufferSize
     Buffer size.
protected  ScannedEntityfCurrentEntity
     Current entity.
protected  HashtablefDeclaredEntities
     Shared declared entities.
final protected  HashtablefEntities
     Entities.
protected  intfEntityExpansionCount
    
protected  intfEntityExpansionLimit
    
protected  XMLEntityHandlerfEntityHandler
     Entity handler.
protected  XMLEntityResolverfEntityResolver
     Entity resolver.
protected  XMLEntityScannerfEntityScanner
     Current entity scanner.
final protected  StackfEntityStack
     Entity stack.
protected  XMLErrorReporterfErrorReporter
     Error reporter.
protected  booleanfExternalGeneralEntities
     External general entities.
protected  booleanfExternalParameterEntities
     External parameter entities.
protected  booleanfHasPEReferences
     True if the current document contains parameter entity references.
protected  booleanfInExternalSubset
    
protected  StackfReaderStack
    
protected  SecurityManagerfSecurityManager
    
protected  booleanfStandalone
     True if the document entity is standalone.
protected  booleanfStrictURI
     standard uri conformant (strict uri).
protected  SymbolTablefSymbolTable
     Symbol table.
protected  booleanfValidation
     Validation.
protected  ValidationManagerfValidationManager
     Validation manager.
protected  booleanfWarnDuplicateEntityDef
     warn on duplicate Entity declaration.
protected  XMLEntityScannerfXML10EntityScanner
     XML 1.0 entity scanner.
protected  XMLEntityScannerfXML11EntityScanner
     XML 1.1 entity scanner.

Constructor Summary
public  XMLEntityManager()
     Default constructor.
public  XMLEntityManager(XMLEntityManager entityManager)
     Constructs an entity manager that shares the specified entity declarations during each parse.

REVISIT: We might want to think about the "right" way to expose the list of declared entities.


Method Summary
public static  voidabsolutizeAgainstUserDir(URI uri)
     Absolutizes a URI using the current value of the "user.dir" property as the base URI.
public  voidaddExternalEntity(String name, String publicId, String literalSystemId, String baseSystemId)
     Adds an external entity declaration.

Note: This method ignores subsequent entity declarations.

Note: The name should be a unique symbol.

public  voidaddInternalEntity(String name, String text)
     Adds an internal entity declaration.

Note: This method ignores subsequent entity declarations.

Note: The name should be a unique symbol.

public  voidaddUnparsedEntity(String name, String publicId, String systemId, String baseSystemId, String notation)
     Adds an unparsed entity declaration.

Note: This method ignores subsequent entity declarations.

Note: The name should be a unique symbol.

public  voidcloseReaders()
     Close all opened InputStreams and Readers opened by this parser.
public static  OutputStreamcreateOutputStream(String uri)
    
protected  ReadercreateReader(InputStream inputStream, String encoding, Boolean isBigEndian)
     Creates a reader capable of reading the given input stream in the specified encoding.
Parameters:
  inputStream - The input stream.
Parameters:
  encoding - The encoding name that the input stream isencoded using.
 voidendEntity()
     Ends an entity.
public  voidendExternalSubset()
    
public static  StringexpandSystemId(String systemId, String baseSystemId, boolean strict)
     Expands a system id and returns the system id as a URI, if it can be expanded.
protected static  StringfixURI(String str)
     Fixes a platform dependent filename to standard URI form.
Parameters:
  str - The string to fix.
public  ScannedEntitygetCurrentEntity()
    
public  XMLResourceIdentifiergetCurrentResourceIdentifier()
    
 HashtablegetDeclaredEntities()
     Returns the hashtable of declared entities.

REVISIT: This should be done the "right" way by designing a better way to enumerate the declared entities.

protected  Object[]getEncodingName(byte[] b4, int count)
     Returns the IANA encoding name that is auto-detected from the bytes specified, with the endian-ness of that encoding where appropriate.
Parameters:
  b4 - The first four bytes of the input.
Parameters:
  count - The number of bytes actually read.
public  XMLEntityScannergetEntityScanner()
     Returns the entity scanner.
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  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.
final  booleanhasPEReferences()
     Returns true if the document contains parameter entity references.
public  booleanisDeclaredEntity(String entityName)
     Checks whether an entity given by name is declared.
Parameters:
  entityName - The name of the entity to check.
public  booleanisEntityDeclInExternalSubset(String entityName)
     Checks whether the declaration of an entity given by name is // in the external subset.
public  booleanisExternalEntity(String entityName)
     Checks whether an entity given by name is external.
Parameters:
  entityName - The name of the entity to check.
public  booleanisStandalone()
     Returns true if the document entity is standalone.
public  booleanisUnparsedEntity(String entityName)
     Checks whether an entity given by name is unparsed.
Parameters:
  entityName - The name of the entity to check.
final  voidnotifyHasPEReferences()
     Notifies the entity manager that the current document being processed contains parameter entity references.
final static  voidprint(ScannedEntity currentEntity)
     Prints the contents of the buffer.
public  voidreset(XMLComponentManager componentManager)
     Resets the component.
public  voidreset()
    
public  XMLInputSourceresolveEntity(XMLResourceIdentifier resourceIdentifier)
     Resolves the specified public and system identifiers.
public  voidsetEntityHandler(XMLEntityHandler entityHandler)
     Sets the entity handler.
public  voidsetFeature(String featureId, boolean state)
     Sets the state of a feature.
public static  voidsetInstanceFollowRedirects(HttpURLConnection urlCon, boolean followRedirects)
     Attempt to set whether redirects will be followed for an HttpURLConnection.
public  voidsetProperty(String propertyId, Object value)
     Sets the value of a property.
public  voidsetScannerVersion(short version)
    
public  voidsetStandalone(boolean standalone)
     Sets whether the document entity is standalone.
public  StringsetupCurrentEntity(String name, XMLInputSource xmlInputSource, boolean literal, boolean isExternal)
     This method uses the passed-in XMLInputSource to make fCurrentEntity usable for reading.
Parameters:
  name - name of the entity (XML is it's the document entity)
Parameters:
  xmlInputSource - the input source, with sufficient informationto begin scanning characters.
Parameters:
  literal - True if this entity is started within aliteral value.
Parameters:
  isExternal - whether this entity should be treated as an internal or external entity.
throws:
  IOException - if anything can't be readXNIException If any parser-specific goes wrong.
public  voidstartDTDEntity(XMLInputSource xmlInputSource)
     Starts the DTD entity.
public  voidstartDocumentEntity(XMLInputSource xmlInputSource)
     Starts the document entity.
public  voidstartEntity(String entityName, boolean literal)
     Starts a named entity.
public  voidstartEntity(String name, XMLInputSource xmlInputSource, boolean literal, boolean isExternal)
     Starts an entity.
public  voidstartExternalSubset()
    

Field Detail
ALLOW_JAVA_ENCODINGS
final protected static String ALLOW_JAVA_ENCODINGS(Code)
Feature identifier: allow Java encodings.



BUFFER_SIZE
final protected static String BUFFER_SIZE(Code)
property identifier: buffer size.



DEFAULT_BUFFER_SIZE
final public static int DEFAULT_BUFFER_SIZE(Code)
Default buffer size (2048).



DEFAULT_INTERNAL_BUFFER_SIZE
final public static int DEFAULT_INTERNAL_BUFFER_SIZE(Code)
Default internal entity buffer size (512).



DEFAULT_XMLDECL_BUFFER_SIZE
final public static int DEFAULT_XMLDECL_BUFFER_SIZE(Code)
Default buffer size before we've finished with the XMLDecl:



ENTITY_RESOLVER
final protected static String ENTITY_RESOLVER(Code)
Property identifier: entity resolver.



ERROR_REPORTER
final protected static String ERROR_REPORTER(Code)
Property identifier: error reporter.



EXTERNAL_GENERAL_ENTITIES
final protected static String EXTERNAL_GENERAL_ENTITIES(Code)
Feature identifier: external general entities.



EXTERNAL_PARAMETER_ENTITIES
final protected static String EXTERNAL_PARAMETER_ENTITIES(Code)
Feature identifier: external parameter entities.



PARSER_SETTINGS
final protected static String PARSER_SETTINGS(Code)



SECURITY_MANAGER
final protected static String SECURITY_MANAGER(Code)
property identifier: security manager.



STANDARD_URI_CONFORMANT
final protected static String STANDARD_URI_CONFORMANT(Code)
Feature identifier: standard uri conformant



SYMBOL_TABLE
final protected static String SYMBOL_TABLE(Code)
Property identifier: symbol table.



VALIDATION
final protected static String VALIDATION(Code)
Feature identifier: validation.



VALIDATION_MANAGER
final protected static String VALIDATION_MANAGER(Code)



WARN_ON_DUPLICATE_ENTITYDEF
final protected static String WARN_ON_DUPLICATE_ENTITYDEF(Code)
Feature identifier: warn on duplicate EntityDef



fAllowJavaEncodings
protected boolean fAllowJavaEncodings(Code)
Allow Java encoding names. This feature identifier is: http://apache.org/xml/features/allow-java-encodings



fBufferSize
protected int fBufferSize(Code)
Buffer size. We get this value from a property. The default size is used if the input buffer size property is not specified. REVISIT: do we need a property for internal entity buffer size?



fCurrentEntity
protected ScannedEntity fCurrentEntity(Code)
Current entity.



fDeclaredEntities
protected Hashtable fDeclaredEntities(Code)
Shared declared entities.



fEntities
final protected Hashtable fEntities(Code)
Entities.



fEntityExpansionCount
protected int fEntityExpansionCount(Code)



fEntityExpansionLimit
protected int fEntityExpansionLimit(Code)



fEntityHandler
protected XMLEntityHandler fEntityHandler(Code)
Entity handler.



fEntityResolver
protected XMLEntityResolver fEntityResolver(Code)
Entity resolver. This property identifier is: http://apache.org/xml/properties/internal/entity-resolver



fEntityScanner
protected XMLEntityScanner fEntityScanner(Code)
Current entity scanner.



fEntityStack
final protected Stack fEntityStack(Code)
Entity stack.



fErrorReporter
protected XMLErrorReporter fErrorReporter(Code)
Error reporter. This property identifier is: http://apache.org/xml/properties/internal/error-reporter



fExternalGeneralEntities
protected boolean fExternalGeneralEntities(Code)
External general entities. This feature identifier is: http://xml.org/sax/features/external-general-entities



fExternalParameterEntities
protected boolean fExternalParameterEntities(Code)
External parameter entities. This feature identifier is: http://xml.org/sax/features/external-parameter-entities



fHasPEReferences
protected boolean fHasPEReferences(Code)
True if the current document contains parameter entity references.



fInExternalSubset
protected boolean fInExternalSubset(Code)



fReaderStack
protected Stack fReaderStack(Code)



fSecurityManager
protected SecurityManager fSecurityManager(Code)



fStandalone
protected boolean fStandalone(Code)
True if the document entity is standalone. This should really only be set by the document source (e.g. XMLDocumentScanner).



fStrictURI
protected boolean fStrictURI(Code)
standard uri conformant (strict uri). http://apache.org/xml/features/standard-uri-conformant



fSymbolTable
protected SymbolTable fSymbolTable(Code)
Symbol table. This property identifier is: http://apache.org/xml/properties/internal/symbol-table



fValidation
protected boolean fValidation(Code)
Validation. This feature identifier is: http://xml.org/sax/features/validation



fValidationManager
protected ValidationManager fValidationManager(Code)
Validation manager. This property identifier is: http://apache.org/xml/properties/internal/validation-manager



fWarnDuplicateEntityDef
protected boolean fWarnDuplicateEntityDef(Code)
warn on duplicate Entity declaration. http://apache.org/xml/features/warn-on-duplicate-entitydef



fXML10EntityScanner
protected XMLEntityScanner fXML10EntityScanner(Code)
XML 1.0 entity scanner.



fXML11EntityScanner
protected XMLEntityScanner fXML11EntityScanner(Code)
XML 1.1 entity scanner.




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



XMLEntityManager
public XMLEntityManager(XMLEntityManager entityManager)(Code)
Constructs an entity manager that shares the specified entity declarations during each parse.

REVISIT: We might want to think about the "right" way to expose the list of declared entities. For now, the knowledge how to access the entity declarations is implicit.





Method Detail
absolutizeAgainstUserDir
public static void absolutizeAgainstUserDir(URI uri) throws URI.MalformedURIException(Code)
Absolutizes a URI using the current value of the "user.dir" property as the base URI. If the URI is already absolute, this is a no-op.
Parameters:
  uri - the URI to absolutize



addExternalEntity
public void addExternalEntity(String name, String publicId, String literalSystemId, String baseSystemId) throws IOException(Code)
Adds an external entity declaration.

Note: This method ignores subsequent entity declarations.

Note: The name should be a unique symbol. The SymbolTable can be used for this purpose.
Parameters:
  name - The name of the entity.
Parameters:
  publicId - The public identifier of the entity.
Parameters:
  literalSystemId - The system identifier of the entity.
Parameters:
  baseSystemId - The base system identifier of the entity.This is the system identifier of the entitywhere the entity being added andis used to expand the system identifier whenthe system identifier is a relative URI.When null the system identifier of the firstexternal entity on the stack is used instead.
See Also:   SymbolTable




addInternalEntity
public void addInternalEntity(String name, String text)(Code)
Adds an internal entity declaration.

Note: This method ignores subsequent entity declarations.

Note: The name should be a unique symbol. The SymbolTable can be used for this purpose.
Parameters:
  name - The name of the entity.
Parameters:
  text - The text of the entity.
See Also:   SymbolTable




addUnparsedEntity
public void addUnparsedEntity(String name, String publicId, String systemId, String baseSystemId, String notation)(Code)
Adds an unparsed entity declaration.

Note: This method ignores subsequent entity declarations.

Note: The name should be a unique symbol. The SymbolTable can be used for this purpose.
Parameters:
  name - The name of the entity.
Parameters:
  publicId - The public identifier of the entity.
Parameters:
  systemId - The system identifier of the entity.
Parameters:
  notation - The name of the notation.
See Also:   SymbolTable




closeReaders
public void closeReaders()(Code)
Close all opened InputStreams and Readers opened by this parser.



createOutputStream
public static OutputStream createOutputStream(String uri) throws IOException(Code)



createReader
protected Reader createReader(InputStream inputStream, String encoding, Boolean isBigEndian) throws IOException(Code)
Creates a reader capable of reading the given input stream in the specified encoding.
Parameters:
  inputStream - The input stream.
Parameters:
  encoding - The encoding name that the input stream isencoded using. If the user has specified thatJava encoding names are allowed, then theencoding name may be a Java encoding name;otherwise, it is an ianaEncoding name.
Parameters:
  isBigEndian - For encodings (like uCS-4), whose names cannotspecify a byte order, this tells whether the order is bigEndian. null menasunknown or not relevant. Returns a reader.



endEntity
void endEntity() throws XNIException(Code)
Ends an entity.
throws:
  XNIException - Thrown by entity handler to signal an error.



endExternalSubset
public void endExternalSubset()(Code)



expandSystemId
public static String expandSystemId(String systemId, String baseSystemId, boolean strict) throws URI.MalformedURIException(Code)
Expands a system id and returns the system id as a URI, if it can be expanded. A return value of null means that the identifier is already expanded. An exception thrown indicates a failure to expand the id.
Parameters:
  systemId - The systemId to be expanded. Returns the URI string representing the expanded systemidentifier. A null value indicates that the givensystem identifier is already expanded.



fixURI
protected static String fixURI(String str)(Code)
Fixes a platform dependent filename to standard URI form.
Parameters:
  str - The string to fix. Returns the fixed URI string.



getCurrentEntity
public ScannedEntity getCurrentEntity()(Code)



getCurrentResourceIdentifier
public XMLResourceIdentifier getCurrentResourceIdentifier()(Code)



getDeclaredEntities
Hashtable getDeclaredEntities()(Code)
Returns the hashtable of declared entities.

REVISIT: This should be done the "right" way by designing a better way to enumerate the declared entities. For now, this method is needed by the constructor that takes an XMLEntityManager parameter.




getEncodingName
protected Object[] getEncodingName(byte[] b4, int count)(Code)
Returns the IANA encoding name that is auto-detected from the bytes specified, with the endian-ness of that encoding where appropriate.
Parameters:
  b4 - The first four bytes of the input.
Parameters:
  count - The number of bytes actually read. a 2-element array: the first element, an IANA-encoding string,the second element a Boolean which is true iff the document is big endian, falseif it's little-endian, and null if the distinction isn't relevant.



getEntityScanner
public XMLEntityScanner getEntityScanner()(Code)
Returns the entity scanner.



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



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.



hasPEReferences
final boolean hasPEReferences()(Code)
Returns true if the document contains parameter entity references.



isDeclaredEntity
public boolean isDeclaredEntity(String entityName)(Code)
Checks whether an entity given by name is declared.
Parameters:
  entityName - The name of the entity to check. True if the entity is declared, false otherwise.



isEntityDeclInExternalSubset
public boolean isEntityDeclInExternalSubset(String entityName)(Code)
Checks whether the declaration of an entity given by name is // in the external subset.
Parameters:
  entityName - The name of the entity to check. True if the entity was declared in the external subset, false otherwise(including when the entity is not declared).



isExternalEntity
public boolean isExternalEntity(String entityName)(Code)
Checks whether an entity given by name is external.
Parameters:
  entityName - The name of the entity to check. True if the entity is external, false otherwise(including when the entity is not declared).



isStandalone
public boolean isStandalone()(Code)
Returns true if the document entity is standalone.



isUnparsedEntity
public boolean isUnparsedEntity(String entityName)(Code)
Checks whether an entity given by name is unparsed.
Parameters:
  entityName - The name of the entity to check. True if the entity is unparsed, false otherwise(including when the entity is not declared).



notifyHasPEReferences
final void notifyHasPEReferences()(Code)
Notifies the entity manager that the current document being processed contains parameter entity references.



print
final static void print(ScannedEntity currentEntity)(Code)
Prints the contents of the buffer.



reset
public void reset(XMLComponentManager componentManager) throws XMLConfigurationException(Code)
Resets the component. The component can query the component manager about any features and properties that affect the operation of the component.
Parameters:
  componentManager - The component manager.
throws:
  SAXException - Thrown by component on initialization error.For example, if a feature or property isrequired for the operation of the component, thecomponent manager may throw aSAXNotRecognizedException or aSAXNotSupportedException.



reset
public void reset()(Code)



resolveEntity
public XMLInputSource resolveEntity(XMLResourceIdentifier resourceIdentifier) throws IOException, XNIException(Code)
Resolves the specified public and system identifiers. This method first attempts to resolve the entity based on the EntityResolver registered by the application. If no entity resolver is registered or if the registered entity handler is unable to resolve the entity, then default entity resolution will occur.
Parameters:
  resourceIdentifier - The XMLResourceIdentifier for the resource to resolve. Returns an input source that wraps the resolved entity.This method will never return null.
throws:
  IOException - Thrown on i/o error.
throws:
  XNIException - Thrown by entity resolver to signal an error.



setEntityHandler
public void setEntityHandler(XMLEntityHandler entityHandler)(Code)
Sets the entity handler. When an entity starts and ends, the entity handler is notified of the change.
Parameters:
  entityHandler - The new entity handler.



setFeature
public void setFeature(String featureId, boolean state) throws XMLConfigurationException(Code)
Sets the state of a feature. This method is called by the component manager any time after reset when a feature changes state.

Note: Components should silently ignore features that do not affect the operation of the component.
Parameters:
  featureId - The feature identifier.
Parameters:
  state - The state of the feature.
throws:
  SAXNotRecognizedException - The component should not throwthis exception.
throws:
  SAXNotSupportedException - The component should not throwthis exception.




setInstanceFollowRedirects
public static void setInstanceFollowRedirects(HttpURLConnection urlCon, boolean followRedirects)(Code)
Attempt to set whether redirects will be followed for an HttpURLConnection. This may fail on earlier JDKs which do not support setting this preference.



setProperty
public void setProperty(String propertyId, Object value) throws XMLConfigurationException(Code)
Sets the value of a property. This method is called by the component manager any time after reset when a property changes value.

Note: Components should silently ignore properties that do not affect the operation of the component.
Parameters:
  propertyId - The property identifier.
Parameters:
  value - The value of the property.
throws:
  SAXNotRecognizedException - The component should not throwthis exception.
throws:
  SAXNotSupportedException - The component should not throwthis exception.




setScannerVersion
public void setScannerVersion(short version)(Code)



setStandalone
public void setStandalone(boolean standalone)(Code)
Sets whether the document entity is standalone.
Parameters:
  standalone - True if document entity is standalone.



setupCurrentEntity
public String setupCurrentEntity(String name, XMLInputSource xmlInputSource, boolean literal, boolean isExternal) throws IOException, XNIException(Code)
This method uses the passed-in XMLInputSource to make fCurrentEntity usable for reading.
Parameters:
  name - name of the entity (XML is it's the document entity)
Parameters:
  xmlInputSource - the input source, with sufficient informationto begin scanning characters.
Parameters:
  literal - True if this entity is started within aliteral value.
Parameters:
  isExternal - whether this entity should be treated as an internal or external entity.
throws:
  IOException - if anything can't be readXNIException If any parser-specific goes wrong. the encoding of the new entity or null if a character stream was employed



startDTDEntity
public void startDTDEntity(XMLInputSource xmlInputSource) throws IOException, XNIException(Code)
Starts the DTD entity. The DTD entity has the "[dtd]" pseudo-name.
Parameters:
  xmlInputSource - The input source of the DTD entity.
throws:
  IOException - Thrown on i/o error.
throws:
  XNIException - Thrown by entity handler to signal an error.



startDocumentEntity
public void startDocumentEntity(XMLInputSource xmlInputSource) throws IOException, XNIException(Code)
Starts the document entity. The document entity has the "[xml]" pseudo-name.
Parameters:
  xmlInputSource - The input source of the document entity.
throws:
  IOException - Thrown on i/o error.
throws:
  XNIException - Thrown by entity handler to signal an error.



startEntity
public void startEntity(String entityName, boolean literal) throws IOException, XNIException(Code)
Starts a named entity.
Parameters:
  entityName - The name of the entity to start.
Parameters:
  literal - True if this entity is started within a literalvalue.
throws:
  IOException - Thrown on i/o error.
throws:
  XNIException - Thrown by entity handler to signal an error.



startEntity
public void startEntity(String name, XMLInputSource xmlInputSource, boolean literal, boolean isExternal) throws IOException, XNIException(Code)
Starts an entity.

This method can be used to insert an application defined XML entity stream into the parsing stream.
Parameters:
  name - The name of the entity.
Parameters:
  xmlInputSource - The input source of the entity.
Parameters:
  literal - True if this entity is started within aliteral value.
Parameters:
  isExternal - whether this entity should be treated as an internal or external entity.
throws:
  IOException - Thrown on i/o error.
throws:
  XNIException - Thrown by entity handler to signal an error.




startExternalSubset
public void startExternalSubset()(Code)



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.