APIdia Launch Partner
Top Fields Constructors Methods
com.sun.org.apache.xerces.internal.impl.xs.opti

public Class SchemaParsingConfig

extends BasicParserConfiguration
implements XMLPullParserConfiguration
Class Inheritance
All Implemented Interfaces
com.sun.org.apache.xerces.internal.xni.parser.XMLPullParserConfiguration, com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration, com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager
Imports
com.sun.org.apache.xerces.internal.impl.Constants, .XML11DTDScannerImpl, .XML11NSDocumentScannerImpl, .XMLDTDScannerImpl, .XMLEntityHandler, .XMLEntityManager, .XMLErrorReporter, .XMLNSDocumentScannerImpl, .XMLVersionDetector, com.sun.org.apache.xerces.internal.impl.dv.DTDDVFactory, com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter, com.sun.org.apache.xerces.internal.impl.validation.ValidationManager, com.sun.org.apache.xerces.internal.impl.xs.XSMessageFormatter, com.sun.org.apache.xerces.internal.parsers.BasicParserConfiguration, com.sun.org.apache.xerces.internal.util.FeatureState, .PropertyState, .SymbolTable, com.sun.org.apache.xerces.internal.xni.XMLLocator, .XNIException, com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool, com.sun.org.apache.xerces.internal.xni.parser.XMLComponent, .XMLComponentManager, .XMLConfigurationException, .XMLDTDScanner, .XMLDocumentScanner, .XMLInputSource, .XMLPullParserConfiguration, java.io.IOException, java.util.Locale, javax.xml.XMLConstants, jdk.xml.internal.JdkConstants, .JdkXmlUtils

Author
Rahul Srivastava, Sun Microsystems Inc.

Field Summary

Modifier and TypeField and Description
protected static final String
ALLOW_JAVA_ENCODINGS

Feature identifier: allow Java encodings.

protected static final String
CONTINUE_AFTER_FATAL_ERROR

Feature identifier: continue after fatal error.

protected static final String
DATATYPE_VALIDATOR_FACTORY

Property identifier: datatype validator factory.

protected static final String
DOCUMENT_SCANNER

Property identifier document scanner:

protected static final String
DTD_SCANNER

Property identifier: DTD scanner.

protected static final String
DTD_VALIDATOR

Property identifier: DTD validator.

protected static final String
ENTITY_MANAGER

Property identifier: entity manager.

protected static final String
ERROR_REPORTER

Property identifier: error reporter.

private boolean
f11Initialized

Flag indiciating whether XML11 components have been initialized.

protected boolean
fConfigUpdated

fConfigUpdated is set to true if there has been any change to the configuration settings, i.e a feature or a property was changed.

protected XMLDTDScanner
fCurrentDTDScanner

Current DTD scanner.

protected DTDDVFactory
fCurrentDVFactory

Current Datatype validator factory.

protected XMLDocumentScanner
fCurrentScanner

Current scanner

protected final DTDDVFactory
fDatatypeValidatorFactory

The XML 1.0 Datatype validator factory.

protected final XMLDTDScannerImpl
fDTDScanner

The XML 1.0 DTD scanner.

protected final XMLEntityManager
fEntityManager

Entity manager.

protected final XMLErrorReporter
fErrorReporter

Error reporter.

protected XMLGrammarPool
fGrammarPool

Grammar pool.

protected XMLInputSource
fInputSource

Input Source

protected XMLLocator
fLocator

Locator

protected final XMLNSDocumentScannerImpl
fNamespaceScanner

The XML 1.0 Document scanner.

protected boolean
fParseInProgress

True if a parse is in progress.

protected final ValidationManager
protected final XMLVersionDetector
fVersionDetector

XML version detector.

protected DTDDVFactory
fXML11DatatypeFactory

The XML 1.1 Datatype validator factory.

protected XML11DTDScannerImpl
fXML11DTDScanner

The XML 1.1 DTD scanner.

protected XML11NSDocumentScannerImpl
fXML11NSDocScanner

The XML 1.1 Document scanner.

protected static final String
GENERATE_SYNTHETIC_ANNOTATIONS

Feature identifier: generate synthetic annotations.

protected static final String
LOAD_EXTERNAL_DTD

Feature identifier: load external DTD.

protected static final String
LOCALE

Property identifier: locale.

protected static final String
NAMESPACE_BINDER

Property identifier: namespace binder.

protected static final String
NORMALIZE_DATA

Feature identifier: expose schema normalized value

protected static final String
NOTIFY_BUILTIN_REFS

Feature identifier: notify built-in refereces.

protected static final String
NOTIFY_CHAR_REFS

Feature identifier: notify character refereces.

protected static final String
SCHEMA_ELEMENT_DEFAULT

Feature identifier: send element default value via characters()

protected static final String
SCHEMA_VALIDATOR

Property identifier: XML Schema validator.

protected static final String
protected static final String
WARN_ON_DUPLICATE_ATTDEF

Feature identifier: warn on duplicate attribute definition.

protected static final String
WARN_ON_UNDECLARED_ELEMDEF

Feature identifier: warn on undeclared element definition.

protected static final String
protected static final String
XMLGRAMMAR_POOL

Property identifier: grammar pool.

Inherited from com.sun.org.apache.xerces.internal.parsers.BasicParserConfiguration:
ENTITY_RESOLVERERROR_HANDLEREXTERNAL_GENERAL_ENTITIESEXTERNAL_PARAMETER_ENTITIESfComponentsfDocumentHandlerfDTDContentModelHandlerfDTDHandlerfLastComponentfLocalefSymbolTableNAMESPACESSYMBOL_TABLEVALIDATIONXML_STRING

Constructor Summary

AccessConstructor and Description
public
SchemaParsingConfig()

Default constructor.

public
SchemaParsingConfig(SymbolTable
The symbol table to use.
symbolTable
)

Constructs a parser configuration using the specified symbol table.

public
SchemaParsingConfig(SymbolTable
The symbol table to use.
symbolTable
,
XMLGrammarPool
The grammar pool to use.
grammarPool
)

Constructs a parser configuration using the specified symbol table and grammar pool.

public
SchemaParsingConfig(SymbolTable
The symbol table to use.
symbolTable
,
XMLGrammarPool
The grammar pool to use.
grammarPool
,
XMLComponentManager
The parent settings.
parentSettings
)

Constructs a parser configuration using the specified symbol table, grammar pool, and parent settings.

Method Summary

Modifier and TypeMethod and Description
private void
addRecognizedParamsAndSetDefaults(XMLComponent
The component whose recognized features and properties will be added to the configuration
component
)

Adds all of the component's recognized features and properties to the list of default recognized features and properties, and sets default values on the configuration for features and properties which were previously absent from the configuration.

protected FeatureState
checkFeature(String
The unique identifier (URI) of the feature.
featureId
)

Overrides com.sun.org.apache.xerces.internal.parsers.BasicParserConfiguration.checkFeature.

Check a feature.

protected PropertyState
checkProperty(String
The unique identifier (URI) of the property being set.
propertyId
)

Overrides com.sun.org.apache.xerces.internal.parsers.BasicParserConfiguration.checkProperty.

Check a property.

public void
cleanup()

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLPullParserConfiguration.cleanup.

If the application decides to terminate parsing before the xml document is fully parsed, the application should call this method to free any resource allocated during parsing.

protected void
configurePipeline()

Configures the XML 1.0 pipeline.

protected void
configureXML11Pipeline()

Configures the XML 1.1 pipeline.

public FeatureState

Returns:

true if the feature is supported
getFeatureState
(String
The feature identifier.
featureId
)

Overrides com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings.getFeatureState.

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager.getFeatureState.

Returns the state of a feature.

public PropertyState

Returns:

the value of the property
getPropertyState
(String
The property identifier.
propertyId
)

Overrides com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings.getPropertyState.

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager.getPropertyState.

Returns the value of a property.

private void
public boolean

Returns:

True if there is more document to parse.
parse
(boolean
True if the pull parser should parse the remaining document completely.
complete
)

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLPullParserConfiguration.parse.

Parses the document in a pull parsing fashion.

public void
public void
public void
protected final void
resetXML10()

Reset all XML 1.0 components before parsing

protected final void
resetXML11()

Reset all XML 1.1 components before parsing

public void
setFeature(String
The unique identifier (URI) of the feature.
featureId
,
boolean
The requested state of the feature (true or false).
state
)

Overrides com.sun.org.apache.xerces.internal.parsers.BasicParserConfiguration.setFeature.

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration.setFeature.

Set the state of a feature.

public void
setInputSource(XMLInputSource
The document's input source.
inputSource
)

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLPullParserConfiguration.setInputSource.

Sets the input source for the document to parse.

public void
setLocale(Locale
The locale object to use for localization of messages.
locale
)

Overrides com.sun.org.apache.xerces.internal.parsers.BasicParserConfiguration.setLocale.

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration.setLocale.

Set the locale to use for messages.

public void
Inherited from com.sun.org.apache.xerces.internal.parsers.BasicParserConfiguration:
addComponentgetDocumentHandlergetDTDContentModelHandlergetDTDHandlergetEntityResolvergetErrorHandlergetLocalesetDocumentHandlersetDTDContentModelHandlersetDTDHandlersetEntityResolversetErrorHandler

Field Detail

ALLOW_JAVA_ENCODINGSback to summary
protected static final String ALLOW_JAVA_ENCODINGS

Feature identifier: allow Java encodings.

CONTINUE_AFTER_FATAL_ERRORback to summary
protected static final String CONTINUE_AFTER_FATAL_ERROR

Feature identifier: continue after fatal error.

DATATYPE_VALIDATOR_FACTORYback to summary
protected static final String DATATYPE_VALIDATOR_FACTORY

Property identifier: datatype validator factory.

DOCUMENT_SCANNERback to summary
protected static final String DOCUMENT_SCANNER

Property identifier document scanner:

DTD_SCANNERback to summary
protected static final String DTD_SCANNER

Property identifier: DTD scanner.

DTD_VALIDATORback to summary
protected static final String DTD_VALIDATOR

Property identifier: DTD validator.

ENTITY_MANAGERback to summary
protected static final String ENTITY_MANAGER

Property identifier: entity manager.

ERROR_REPORTERback to summary
protected static final String ERROR_REPORTER

Property identifier: error reporter.

f11Initializedback to summary
private boolean f11Initialized

Flag indiciating whether XML11 components have been initialized.

fConfigUpdatedback to summary
protected boolean fConfigUpdated

fConfigUpdated is set to true if there has been any change to the configuration settings, i.e a feature or a property was changed.

fCurrentDTDScannerback to summary
protected XMLDTDScanner fCurrentDTDScanner

Current DTD scanner.

fCurrentDVFactoryback to summary
protected DTDDVFactory fCurrentDVFactory

Current Datatype validator factory.

fCurrentScannerback to summary
protected XMLDocumentScanner fCurrentScanner

Current scanner

fDatatypeValidatorFactoryback to summary
protected final DTDDVFactory fDatatypeValidatorFactory

The XML 1.0 Datatype validator factory.

fDTDScannerback to summary
protected final XMLDTDScannerImpl fDTDScanner

The XML 1.0 DTD scanner.

fEntityManagerback to summary
protected final XMLEntityManager fEntityManager

Entity manager.

fErrorReporterback to summary
protected final XMLErrorReporter fErrorReporter

Error reporter.

fGrammarPoolback to summary
protected XMLGrammarPool fGrammarPool

Grammar pool.

fInputSourceback to summary
protected XMLInputSource fInputSource

Input Source

fLocatorback to summary
protected XMLLocator fLocator

Locator

fNamespaceScannerback to summary
protected final XMLNSDocumentScannerImpl fNamespaceScanner

The XML 1.0 Document scanner.

fParseInProgressback to summary
protected boolean fParseInProgress

True if a parse is in progress. This state is needed because some features/properties cannot be set while parsing (e.g. validation and namespaces).

fValidationManagerback to summary
protected final ValidationManager fValidationManager
fVersionDetectorback to summary
protected final XMLVersionDetector fVersionDetector

XML version detector.

fXML11DatatypeFactoryback to summary
protected DTDDVFactory fXML11DatatypeFactory

The XML 1.1 Datatype validator factory.

fXML11DTDScannerback to summary
protected XML11DTDScannerImpl fXML11DTDScanner

The XML 1.1 DTD scanner.

fXML11NSDocScannerback to summary
protected XML11NSDocumentScannerImpl fXML11NSDocScanner

The XML 1.1 Document scanner.

GENERATE_SYNTHETIC_ANNOTATIONSback to summary
protected static final String GENERATE_SYNTHETIC_ANNOTATIONS

Feature identifier: generate synthetic annotations.

LOAD_EXTERNAL_DTDback to summary
protected static final String LOAD_EXTERNAL_DTD

Feature identifier: load external DTD.

LOCALEback to summary
protected static final String LOCALE

Property identifier: locale.

NAMESPACE_BINDERback to summary
protected static final String NAMESPACE_BINDER

Property identifier: namespace binder.

NORMALIZE_DATAback to summary
protected static final String NORMALIZE_DATA

Feature identifier: expose schema normalized value

NOTIFY_BUILTIN_REFSback to summary
protected static final String NOTIFY_BUILTIN_REFS

Feature identifier: notify built-in refereces.

NOTIFY_CHAR_REFSback to summary
protected static final String NOTIFY_CHAR_REFS

Feature identifier: notify character refereces.

SCHEMA_ELEMENT_DEFAULTback to summary
protected static final String SCHEMA_ELEMENT_DEFAULT

Feature identifier: send element default value via characters()

SCHEMA_VALIDATORback to summary
protected static final String SCHEMA_VALIDATOR

Property identifier: XML Schema validator.

VALIDATION_MANAGERback to summary
protected static final String VALIDATION_MANAGER
WARN_ON_DUPLICATE_ATTDEFback to summary
protected static final String WARN_ON_DUPLICATE_ATTDEF

Feature identifier: warn on duplicate attribute definition.

WARN_ON_UNDECLARED_ELEMDEFback to summary
protected static final String WARN_ON_UNDECLARED_ELEMDEF

Feature identifier: warn on undeclared element definition.

XML11_DATATYPE_VALIDATOR_FACTORYback to summary
protected static final String XML11_DATATYPE_VALIDATOR_FACTORY
XMLGRAMMAR_POOLback to summary
protected static final String XMLGRAMMAR_POOL

Property identifier: grammar pool.

Constructor Detail

SchemaParsingConfigback to summary
public SchemaParsingConfig()

Default constructor.

SchemaParsingConfigback to summary
public SchemaParsingConfig(SymbolTable symbolTable)

Constructs a parser configuration using the specified symbol table.

Parameters
symbolTable:SymbolTable

The symbol table to use.

SchemaParsingConfigback to summary
public SchemaParsingConfig(SymbolTable symbolTable, XMLGrammarPool grammarPool)

Constructs a parser configuration using the specified symbol table and grammar pool.

Revisit

Grammar pool will be updated when the new validation engine is implemented.

Parameters
symbolTable:SymbolTable

The symbol table to use.

grammarPool:XMLGrammarPool

The grammar pool to use.

SchemaParsingConfigback to summary
public SchemaParsingConfig(SymbolTable symbolTable, XMLGrammarPool grammarPool, XMLComponentManager parentSettings)

Constructs a parser configuration using the specified symbol table, grammar pool, and parent settings.

Revisit

Grammar pool will be updated when the new validation engine is implemented.

Parameters
symbolTable:SymbolTable

The symbol table to use.

grammarPool:XMLGrammarPool

The grammar pool to use.

parentSettings:XMLComponentManager

The parent settings.

Method Detail

addRecognizedParamsAndSetDefaultsback to summary
private void addRecognizedParamsAndSetDefaults(XMLComponent component)

Adds all of the component's recognized features and properties to the list of default recognized features and properties, and sets default values on the configuration for features and properties which were previously absent from the configuration.

Parameters
component:XMLComponent

The component whose recognized features and properties will be added to the configuration

checkFeatureback to summary
protected FeatureState checkFeature(String featureId) throws XMLConfigurationException

Overrides com.sun.org.apache.xerces.internal.parsers.BasicParserConfiguration.checkFeature.

Check a feature. If feature is know and supported, this method simply returns. Otherwise, the appropriate exception is thrown.

Parameters
featureId:String

The unique identifier (URI) of the feature.

Exceptions
XMLConfigurationException:
Thrown for configuration error. In general, components should only throw this exception if it is really a critical error.
checkPropertyback to summary
protected PropertyState checkProperty(String propertyId) throws XMLConfigurationException

Overrides com.sun.org.apache.xerces.internal.parsers.BasicParserConfiguration.checkProperty.

Check a property. If the property is know and supported, this method simply returns. Otherwise, the appropriate exception is thrown.

Parameters
propertyId:String

The unique identifier (URI) of the property being set.

Exceptions
XMLConfigurationException:
Thrown for configuration error. In general, components should only throw this exception if it is really a critical error.
cleanupback to summary
public void cleanup()

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLPullParserConfiguration.cleanup.

If the application decides to terminate parsing before the xml document is fully parsed, the application should call this method to free any resource allocated during parsing. For example, close all opened streams.

configurePipelineback to summary
protected void configurePipeline()

Configures the XML 1.0 pipeline.

configureXML11Pipelineback to summary
protected void configureXML11Pipeline()

Configures the XML 1.1 pipeline.

getFeatureStateback to summary
public FeatureState getFeatureState(String featureId) throws XMLConfigurationException

Overrides com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings.getFeatureState.

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager.getFeatureState.

Returns the state of a feature.

Parameters
featureId:String

The feature identifier.

Returns:FeatureState

true if the feature is supported

Exceptions
XMLConfigurationException:
Thrown for configuration error. In general, components should only throw this exception if it is really a critical error.
getPropertyStateback to summary
public PropertyState getPropertyState(String propertyId) throws XMLConfigurationException

Overrides com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings.getPropertyState.

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager.getPropertyState.

Returns the value of a property.

Parameters
propertyId:String

The property identifier.

Returns:PropertyState

the value of the property

Exceptions
XMLConfigurationException:
Thrown for configuration error. In general, components should only throw this exception if it is really a critical error.
initXML11Componentsback to summary
private void initXML11Components()
parseback to summary
public boolean parse(boolean complete) throws XNIException, IOException

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLPullParserConfiguration.parse.

Parses the document in a pull parsing fashion.

Parameters
complete:boolean

True if the pull parser should parse the remaining document completely.

Returns:boolean

True if there is more document to parse.

Exceptions
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.
See Also
setInputSource
parseback to summary
public void parse(XMLInputSource source) throws XNIException, IOException

Implements abstract com.sun.org.apache.xerces.internal.parsers.BasicParserConfiguration.parse.

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration.parse.

Parses the specified input source.

Parameters
source:XMLInputSource

The input source.

Exceptions
XNIException:
Throws exception on XNI error.
IOException:
Throws exception on i/o error.
resetback to summary
public void reset() throws XNIException

Overrides com.sun.org.apache.xerces.internal.parsers.BasicParserConfiguration.reset.

Reset all components before parsing.

Exceptions
XNIException:
Thrown if an error occurs during initialization.
resetNodePoolback to summary
public void resetNodePool()
resetXML10back to summary
protected final void resetXML10() throws XNIException

Reset all XML 1.0 components before parsing

resetXML11back to summary
protected final void resetXML11() throws XNIException

Reset all XML 1.1 components before parsing

setFeatureback to summary
public void setFeature(String featureId, boolean state) throws XMLConfigurationException

Overrides com.sun.org.apache.xerces.internal.parsers.BasicParserConfiguration.setFeature.

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration.setFeature.

Set the state of a feature. Set the state of any feature in a SAX2 parser. The parser might not recognize the feature, and if it does recognize it, it might not be able to fulfill the request.

Parameters
featureId:String

The unique identifier (URI) of the feature.

state:boolean

The requested state of the feature (true or false).

Exceptions
XMLConfigurationException:
If the requested feature is not known.
setInputSourceback to summary
public void setInputSource(XMLInputSource inputSource) throws XMLConfigurationException, IOException

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLPullParserConfiguration.setInputSource.

Sets the input source for the document to parse.

Parameters
inputSource:XMLInputSource

The document's input source.

Exceptions
XMLConfigurationException:
Thrown if there is a configuration error when initializing the parser.
IOException:
Thrown on I/O error.
See Also
parse(boolean)
setLocaleback to summary
public void setLocale(Locale locale) throws XNIException

Overrides com.sun.org.apache.xerces.internal.parsers.BasicParserConfiguration.setLocale.

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration.setLocale.

Set the locale to use for messages.

Parameters
locale:Locale

The locale object to use for localization of messages.

Exceptions
XNIException:
Thrown if the parser does not support the specified locale.
setPropertyback to summary
public void setProperty(String propertyId, Object value) throws XMLConfigurationException

Overrides com.sun.org.apache.xerces.internal.parsers.BasicParserConfiguration.setProperty.

Implements com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration.setProperty.

setProperty

Exceptions
XMLConfigurationException:

Doc from com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration.setProperty.

Thrown if there is a configuration error.