public class DOMConfigurationImpl extends ParserConfigurationSettings implements XMLParserConfiguration, DOMConfiguration
Modifier and Type | Field and Description |
---|---|
protected static String |
BALANCE_SYNTAX_TREES
Feature identifier: balance syntax trees.
|
protected static short |
CDATA |
protected static short |
COMMENTS |
protected static String |
DISALLOW_DOCTYPE_DECL_FEATURE
Feature identifier: load external DTD.
|
protected static String |
DTD_VALIDATOR_FACTORY_PROPERTY
Property identifier: datatype validator factory.
|
protected static String |
DTD_VALIDATOR_PROPERTY
Property identifier: DTD validator.
|
protected static short |
DTNORMALIZATION |
protected static String |
DYNAMIC_VALIDATION |
protected static short |
ENTITIES |
protected static String |
ENTITY_MANAGER
Property identifier: entity manager.
|
protected static String |
ENTITY_RESOLVER
Property identifier: entity resolver.
|
protected static String |
ERROR_HANDLER
Property identifier: error handler.
|
protected static String |
ERROR_REPORTER
Property identifier: error reporter.
|
protected ArrayList |
fComponents
Components.
|
protected DTDDVFactory |
fCurrentDVFactory
Current Datatype validator factory.
|
protected DTDDVFactory |
fDatatypeValidatorFactory
The XML 1.0 Datatype validator factory.
|
protected short |
features
Normalization features
|
protected DOMErrorHandlerWrapper |
fErrorHandlerWrapper |
protected XMLErrorReporter |
fErrorReporter
Error reporter
|
protected Locale |
fLocale
Locale.
|
protected SymbolTable |
fSymbolTable
Symbol table.
|
protected ValidationManager |
fValidationManager |
protected DTDDVFactory |
fXML11DatatypeFactory
The XML 1.1 Datatype validator factory.
|
protected static String |
GENERATE_SYNTHETIC_ANNOTATIONS
Feature: generate synthetic annotations
|
protected static String |
GRAMMAR_POOL
Property id: Grammar pool
|
protected static String |
HONOUR_ALL_SCHEMALOCATIONS
Feature identifier: honour all schemaLocations
|
protected static short |
INFOSET_FALSE_PARAMS |
protected static short |
INFOSET_MASK |
protected static short |
INFOSET_TRUE_PARAMS |
protected static String |
JAXP_SCHEMA_LANGUAGE
Property identifier: JAXP schema language / DOM schema-type.
|
protected static String |
JAXP_SCHEMA_SOURCE
Property identifier: JAXP schema source/ DOM schema-location.
|
protected static short |
NAMESPACES |
protected static String |
NORMALIZE_DATA |
protected static short |
NSDECL |
protected static short |
PSVI |
protected static String |
SCHEMA |
protected static String |
SCHEMA_ELEMENT_DEFAULT
Feature identifier: send element default value via characters()
|
protected static String |
SCHEMA_FULL_CHECKING |
protected static String |
SCHEMA_LOCATION
Property identifier: schema location.
|
protected static String |
SCHEMA_NONS_LOCATION
Property identifier: no namespace schema location.
|
protected static String |
SEND_PSVI
sending psvi in the pipeline
|
protected static short |
SPLITCDATA |
protected static String |
SYMBOL_TABLE
Property identifier: symbol table.
|
protected static String |
USE_GRAMMAR_POOL_ONLY
Feature identifier: use grammar pool only
|
protected static short |
VALIDATE |
protected static String |
VALIDATE_ANNOTATIONS
Feature identifier: validate annotations
|
protected static String |
VALIDATION_MANAGER |
protected static String |
WARN_ON_DUPLICATE_ATTDEF
Feature identifier: warn on duplicate attribute definition.
|
protected static short |
WELLFORMED |
protected static String |
XERCES_NAMESPACES
Feature identifier: namespaces.
|
protected static String |
XERCES_VALIDATION
Feature identifier: validation.
|
protected static String |
XML_STRING
Property identifier: xml string.
|
protected static String |
XML11_DATATYPE_VALIDATOR_FACTORY |
fFeatures, fParentSettings, fProperties, fRecognizedFeatures, fRecognizedProperties, PARSER_SETTINGS
Modifier | Constructor and Description |
---|---|
protected |
DOMConfigurationImpl()
Default Constructor.
|
protected |
DOMConfigurationImpl(SymbolTable symbolTable)
Constructs a parser configuration using the specified symbol table.
|
protected |
DOMConfigurationImpl(SymbolTable symbolTable,
XMLComponentManager parentSettings)
Constructs a parser configuration using the specified symbol table
and parent settings.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addComponent(XMLComponent component) |
boolean |
canSetParameter(String name,
Object value)
DOM Level 3 WD - Experimental.
|
protected void |
checkProperty(String propertyId)
Check a property.
|
protected ValidationManager |
createValidationManager() |
XMLDocumentHandler |
getDocumentHandler()
Returns the registered document handler.
|
XMLDTDContentModelHandler |
getDTDContentModelHandler()
Returns the registered DTD content model handler.
|
XMLDTDHandler |
getDTDHandler()
Returns the registered DTD handler.
|
XMLEntityResolver |
getEntityResolver()
Return the current entity resolver.
|
XMLErrorHandler |
getErrorHandler()
Return the current error handler.
|
boolean |
getFeature(String featureId)
Returns the state of a feature.
|
Locale |
getLocale()
Returns the locale.
|
Object |
getParameter(String name)
DOM Level 3 WD - Experimental.
|
DOMStringList |
getParameterNames()
DOM Level 3 CR - Experimental.
|
void |
parse(XMLInputSource inputSource)
Parse an XML document.
|
protected void |
reset()
reset all components before parsing
|
void |
setDocumentHandler(XMLDocumentHandler documentHandler)
Sets the document handler on the last component in the pipeline
to receive information about the document.
|
void |
setDTDContentModelHandler(XMLDTDContentModelHandler handler)
Sets the DTD content model handler.
|
void |
setDTDHandler(XMLDTDHandler dtdHandler)
Sets the DTD handler.
|
protected void |
setDTDValidatorFactory(String version) |
void |
setEntityResolver(XMLEntityResolver resolver)
Sets the resolver used to resolve external entities.
|
void |
setErrorHandler(XMLErrorHandler errorHandler)
Allow an application to register an error event handler.
|
void |
setFeature(String featureId,
boolean state)
Set the state of a feature.
|
void |
setLocale(Locale locale)
Set the locale to use for messages.
|
void |
setParameter(String name,
Object value)
DOM Level 3 WD - Experimental.
|
void |
setProperty(String propertyId,
Object value)
setProperty
|
addRecognizedFeatures, addRecognizedProperties, checkFeature, getProperty
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addRecognizedFeatures, addRecognizedProperties, getProperty
protected static final String XML11_DATATYPE_VALIDATOR_FACTORY
protected static final String XERCES_VALIDATION
protected static final String XERCES_NAMESPACES
protected static final String SCHEMA
protected static final String SCHEMA_FULL_CHECKING
protected static final String DYNAMIC_VALIDATION
protected static final String NORMALIZE_DATA
protected static final String SCHEMA_ELEMENT_DEFAULT
protected static final String SEND_PSVI
protected static final String GENERATE_SYNTHETIC_ANNOTATIONS
protected static final String VALIDATE_ANNOTATIONS
protected static final String HONOUR_ALL_SCHEMALOCATIONS
protected static final String USE_GRAMMAR_POOL_ONLY
protected static final String DISALLOW_DOCTYPE_DECL_FEATURE
protected static final String BALANCE_SYNTAX_TREES
protected static final String WARN_ON_DUPLICATE_ATTDEF
protected static final String ENTITY_MANAGER
protected static final String ERROR_REPORTER
protected static final String XML_STRING
protected static final String SYMBOL_TABLE
protected static final String GRAMMAR_POOL
protected static final String ERROR_HANDLER
protected static final String ENTITY_RESOLVER
protected static final String JAXP_SCHEMA_LANGUAGE
protected static final String JAXP_SCHEMA_SOURCE
protected static final String DTD_VALIDATOR_PROPERTY
protected static final String DTD_VALIDATOR_FACTORY_PROPERTY
protected static final String VALIDATION_MANAGER
protected static final String SCHEMA_LOCATION
protected static final String SCHEMA_NONS_LOCATION
protected short features
protected static final short NAMESPACES
protected static final short DTNORMALIZATION
protected static final short ENTITIES
protected static final short CDATA
protected static final short SPLITCDATA
protected static final short COMMENTS
protected static final short VALIDATE
protected static final short PSVI
protected static final short WELLFORMED
protected static final short NSDECL
protected static final short INFOSET_TRUE_PARAMS
protected static final short INFOSET_FALSE_PARAMS
protected static final short INFOSET_MASK
protected SymbolTable fSymbolTable
protected ArrayList fComponents
protected ValidationManager fValidationManager
protected Locale fLocale
protected XMLErrorReporter fErrorReporter
protected final DOMErrorHandlerWrapper fErrorHandlerWrapper
protected DTDDVFactory fCurrentDVFactory
protected DTDDVFactory fDatatypeValidatorFactory
protected DTDDVFactory fXML11DatatypeFactory
protected DOMConfigurationImpl()
protected DOMConfigurationImpl(SymbolTable symbolTable)
symbolTable
- The symbol table to use.protected DOMConfigurationImpl(SymbolTable symbolTable, XMLComponentManager parentSettings)
symbolTable
- The symbol table to use.parentSettings
- The parent settings.public void parse(XMLInputSource inputSource) throws XNIException, IOException
The parser can use this method to instruct this configuration to begin parsing an XML document from any valid input source (a character stream, a byte stream, or a URI).
Parsers may not invoke this method while a parse is in progress. Once a parse is complete, the parser may then parse another XML document.
This method is synchronous: it will not return until parsing has ended. If a client application wants to terminate parsing early, it should throw an exception.
parse
in interface XMLParserConfiguration
inputSource
- The input source for the top-level of the
XML document.XNIException
- Any XNI exception, possibly wrapping
another exception.IOException
- An IO exception from the parser, possibly
from a byte stream or character stream
supplied by the parser.public void setDocumentHandler(XMLDocumentHandler documentHandler)
setDocumentHandler
in interface XMLParserConfiguration
documentHandler
- The document handler.public XMLDocumentHandler getDocumentHandler()
getDocumentHandler
in interface XMLParserConfiguration
public void setDTDHandler(XMLDTDHandler dtdHandler)
setDTDHandler
in interface XMLParserConfiguration
dtdHandler
- The DTD handler.public XMLDTDHandler getDTDHandler()
getDTDHandler
in interface XMLParserConfiguration
public void setDTDContentModelHandler(XMLDTDContentModelHandler handler)
setDTDContentModelHandler
in interface XMLParserConfiguration
handler
- The DTD content model handler.public XMLDTDContentModelHandler getDTDContentModelHandler()
getDTDContentModelHandler
in interface XMLParserConfiguration
public void setEntityResolver(XMLEntityResolver resolver)
setEntityResolver
in interface XMLParserConfiguration
resolver
- The new entity resolver. Passing a null value will
uninstall the currently installed resolver.public XMLEntityResolver getEntityResolver()
getEntityResolver
in interface XMLParserConfiguration
setEntityResolver(org.apache.xerces.xni.parser.XMLEntityResolver)
public void setErrorHandler(XMLErrorHandler errorHandler)
If the application does not register an error handler, all error events reported by the SAX parser will be silently ignored; however, normal processing may not continue. It is highly recommended that all SAX applications implement an error handler to avoid unexpected bugs.
Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.
setErrorHandler
in interface XMLParserConfiguration
errorHandler
- The error handler.NullPointerException
- If the handler
argument is null.getErrorHandler()
public XMLErrorHandler getErrorHandler()
getErrorHandler
in interface XMLParserConfiguration
setErrorHandler(org.apache.xerces.xni.parser.XMLErrorHandler)
public boolean getFeature(String featureId) throws XMLConfigurationException
getFeature
in interface XMLComponentManager
getFeature
in interface XMLParserConfiguration
getFeature
in class ParserConfigurationSettings
featureId
- The feature identifier.XMLConfigurationException
- Thrown for configuration error.
In general, components should
only throw this exception if
it is really
a critical error.public void setFeature(String featureId, boolean state) throws XMLConfigurationException
setFeature
in interface XMLParserConfiguration
setFeature
in class ParserConfigurationSettings
featureId
- The unique identifier (URI) of the feature.state
- The requested state of the feature (true or false).XMLConfigurationException
- If the
requested feature is not known.public void setProperty(String propertyId, Object value) throws XMLConfigurationException
setProperty
in interface XMLParserConfiguration
setProperty
in class ParserConfigurationSettings
propertyId
- value
- XMLConfigurationException
- Thrown if there is a configuration
error.public void setLocale(Locale locale) throws XNIException
setLocale
in interface XMLParserConfiguration
locale
- The locale object to use for localization of messages.XNIException
- Thrown if the parser does not support the
specified locale.public Locale getLocale()
getLocale
in interface XMLParserConfiguration
public void setParameter(String name, Object value) throws DOMException
setParameter
in interface DOMConfiguration
DOMException
public Object getParameter(String name) throws DOMException
getParameter
in interface DOMConfiguration
DOMException
public boolean canSetParameter(String name, Object value)
canSetParameter
in interface DOMConfiguration
name
- The name of the parameter to check.value
- An object. if null, the returned value is true.public DOMStringList getParameterNames()
DOMConfiguration
object and for which at least one value
can be set by the application. Note that this list can also contain
parameter names defined outside this specification.getParameterNames
in interface DOMConfiguration
protected void reset() throws XNIException
XNIException
protected void checkProperty(String propertyId) throws XMLConfigurationException
checkProperty
in class ParserConfigurationSettings
propertyId
- The unique identifier (URI) of the property
being set.XMLConfigurationException
- If the
requested feature is not known or supported.protected void addComponent(XMLComponent component)
protected ValidationManager createValidationManager()
protected final void setDTDValidatorFactory(String version)
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.