SchemaFactory for XML Schema.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | XMLSchemaFactory.
Extension of XMLGrammarPoolImpl which exposes the number of grammars stored in the grammar pool. |
| pack-priv static class | XMLSchemaFactory.
A grammar pool which wraps another. |
| Modifier and Type | Field and Description |
|---|---|
| private final DOMEntityResolverWrapper | fDOMEntityResolverWrapper
The DOMEntityResolverWrapper |
| private ErrorHandler | fErrorHandler
User-specified ErrorHandler; can be null. |
| private final ErrorHandlerWrapper | fErrorHandlerWrapper
The ErrorHandlerWrapper |
| private LSResourceResolver | fLSResourceResolver
The LSResrouceResolver |
| private final boolean | fOverrideDefaultParser
Indicates whether 3rd party parser may be used to override the system-default Note the default value (false) is the safe option. |
| private XMLSecurityManager | fSecurityManager
The SecurityManager. |
| private XMLSecurityPropertyManager | fSecurityPropertyMgr
The Security property manager. |
| private boolean | fUseGrammarPoolOnly
Whether or not to allow new schemas to be added to the grammar pool |
| private final JdkXmlFeatures | |
| private final XMLSchemaFactory. | fXMLGrammarPoolWrapper
The container for the real grammar pool. |
| private final XMLSchemaLoader | fXMLSchemaLoader
The XMLSchemaLoader |
| private static final String | JAXP_SOURCE_FEATURE_PREFIX
JAXP Source feature prefix. |
| private static final String | SCHEMA_FULL_CHECKING
Feature identifier: schema full checking. |
| private static final String | SECURITY_MANAGER
Property identifier: XMLSecurityManager. |
| private static final String | USE_GRAMMAR_POOL_ONLY
Feature identifier: use grammar pool only. |
| private static final String | XML_SECURITY_PROPERTY_MANAGER
Property identifier: Security property manager. |
| private static final String | XMLGRAMMAR_POOL
Property identifier: grammar pool. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ErrorHandler | getErrorHandler()
Implements abstract javax. Gets the current |
| public boolean | getFeature(String name)
Overrides javax. Look up the value of a feature flag. |
| public Object | getProperty(String name)
Overrides javax. Look up the value of a property. |
| public LSResourceResolver | getResourceResolver()
Implements abstract javax. Gets the current |
| public boolean | Returns: true if SchemaFactory supports schemaLanguage, else false.Specifies the schema language which the returned schemaLanguage)SchemaFactory will understand.
schemaLanguage must specify a valid schema language.Implements abstract javax. Is specified schema supported by this |
| public Schema | newSchema(Source[] schemas)
Implements abstract javax. Parses the specified source(s) as a schema and returns it as a schema. |
| public Schema | newSchema()
Implements abstract javax. Creates a special |
| public Schema | |
| private void | |
| private void | |
| public void | setErrorHandler(ErrorHandler errorHandler)
Implements abstract javax. Sets the |
| public void | setFeature(String name, boolean value)
Overrides javax. Set a feature for this |
| public void | setProperty(String name, Object object)
Overrides javax. Set the value of a property. |
| public void | setResourceResolver(LSResourceResolver resourceResolver)
Implements abstract javax. Sets the |
| fDOMEntityResolverWrapper | back to summary |
|---|---|
| private final DOMEntityResolverWrapper fDOMEntityResolverWrapper The DOMEntityResolverWrapper | |
| fErrorHandler | back to summary |
|---|---|
| private ErrorHandler fErrorHandler User-specified ErrorHandler; can be null. | |
| fErrorHandlerWrapper | back to summary |
|---|---|
| private final ErrorHandlerWrapper fErrorHandlerWrapper The ErrorHandlerWrapper | |
| fLSResourceResolver | back to summary |
|---|---|
| private LSResourceResolver fLSResourceResolver The LSResrouceResolver | |
| fOverrideDefaultParser | back to summary |
|---|---|
| private final boolean fOverrideDefaultParser Indicates whether 3rd party parser may be used to override the system-default Note the default value (false) is the safe option. Note same as the old property useServicesMechanism | |
| fSecurityManager | back to summary |
|---|---|
| private XMLSecurityManager fSecurityManager The SecurityManager. | |
| fSecurityPropertyMgr | back to summary |
|---|---|
| private XMLSecurityPropertyManager fSecurityPropertyMgr The Security property manager. | |
| fUseGrammarPoolOnly | back to summary |
|---|---|
| private boolean fUseGrammarPoolOnly Whether or not to allow new schemas to be added to the grammar pool | |
| fXmlFeatures | back to summary |
|---|---|
| private final JdkXmlFeatures fXmlFeatures | |
| fXMLGrammarPoolWrapper | back to summary |
|---|---|
| private final XMLSchemaFactory. The container for the real grammar pool. | |
| fXMLSchemaLoader | back to summary |
|---|---|
| private final XMLSchemaLoader fXMLSchemaLoader The XMLSchemaLoader | |
| JAXP_SOURCE_FEATURE_PREFIX | back to summary |
|---|---|
| private static final String JAXP_SOURCE_FEATURE_PREFIX JAXP Source feature prefix. | |
| SCHEMA_FULL_CHECKING | back to summary |
|---|---|
| private static final String SCHEMA_FULL_CHECKING Feature identifier: schema full checking. | |
| SECURITY_MANAGER | back to summary |
|---|---|
| private static final String SECURITY_MANAGER Property identifier: XMLSecurityManager. | |
| USE_GRAMMAR_POOL_ONLY | back to summary |
|---|---|
| private static final String USE_GRAMMAR_POOL_ONLY Feature identifier: use grammar pool only. | |
| XML_SECURITY_PROPERTY_MANAGER | back to summary |
|---|---|
| private static final String XML_SECURITY_PROPERTY_MANAGER Property identifier: Security property manager. | |
| XMLGRAMMAR_POOL | back to summary |
|---|---|
| private static final String XMLGRAMMAR_POOL Property identifier: grammar pool. | |
| XMLSchemaFactory | back to summary |
|---|---|
| public XMLSchemaFactory() | |
| getErrorHandler | back to summary |
|---|---|
| public ErrorHandler getErrorHandler() Implements abstract javax. Doc from javax. Gets the current | |
| getFeature | back to summary |
|---|---|
| public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException Overrides javax. Doc from javax. Look up the value of a feature flag. The feature name is any fully-qualified URI. It is
possible for a Implementors are free (and encouraged) to invent their own features, using names built on their own URIs.
| |
| getProperty | back to summary |
|---|---|
| public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException Overrides javax. Doc from javax. Look up the value of a property. The property name is any fully-qualified URI. It is
possible for a
Implementors are free (and encouraged) to invent their own properties, using names built on their own URIs.
| |
| getResourceResolver | back to summary |
|---|---|
| public LSResourceResolver getResourceResolver() Implements abstract javax. Doc from javax. Gets the current | |
| isSchemaLanguageSupported | back to summary |
|---|---|
| public boolean isSchemaLanguageSupported(String schemaLanguage) Implements abstract javax. Is specified schema supported by this
| |
| newSchema | back to summary |
|---|---|
| public Schema newSchema(Source[] schemas) throws SAXException Implements abstract javax. Doc from javax. Parses the specified source(s) as a schema and returns it as a schema.
The callee will read all the
When an W3C XML Schema 1.0
The resulting schema contains components from the specified sources.
The same result would be achieved if all these sources were
imported, using appropriate values for schemaLocation and namespace,
into a single schema document with a different targetNamespace
and no components of its own, if the import elements were given
in the same order as the sources. Section 4.2.3 of the XML Schema
recommendation describes the options processors have in this
regard. While a processor should be consistent in its treatment of
JAXP schema sources and XML Schema imports, the behaviour between
JAXP-compliant parsers may vary; in particular, parsers may choose
to ignore all but the first
If the parsed set of schemas includes error(s) as
specified in the section 5.1 of the XML Schema spec, then
the error must be reported to the RELAX NGFor RELAX NG, this method must throw
| |
| newSchema | back to summary |
|---|---|
| public Schema newSchema() throws SAXException Implements abstract javax. Doc from javax. Creates a special The exact semantics of the returned Also, implementations are allowed to use implementation-specific property/feature to alter the semantics of this method. Implementors and developers should pay particular attention
to how the features set on this W3C XML Schema 1.0
For XML Schema, this method creates a
The returned Note that the use of schema location hints introduces a vulnerability to denial-of-service attacks. RELAX NGRELAX NG does not support this operation.
| |
| newSchema | back to summary |
|---|---|
| public Schema newSchema(XMLGrammarPool pool) throws SAXException | |
| propagateFeatures | back to summary |
|---|---|
| private void propagateFeatures(AbstractXMLSchema schema) | |
| propagateProperties | back to summary |
|---|---|
| private void propagateProperties(AbstractXMLSchema schema) | |
| setErrorHandler | back to summary |
|---|---|
| public void setErrorHandler(ErrorHandler errorHandler) Implements abstract javax. Doc from javax. Sets the
Error handler can be used to customize the error handling process
during schema parsing. When an
The error handler can abort the parsing of a schema immediately
by throwing
If any
Applications can call this method even during a
When the class DraconianErrorHandler implements
When a new | |
| setFeature | back to summary |
|---|---|
| public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException Overrides javax. Doc from javax. Set a feature for this Implementors and developers should pay particular attention
to how the special The feature name is any fully-qualified URI. It is
possible for a All implementations are required to support the
| |
| setProperty | back to summary |
|---|---|
| public void setProperty(String name, Object object) throws SAXNotRecognizedException, SAXNotSupportedException Overrides javax. Doc from javax. Set the value of a property. The property name is any fully-qualified URI. It is
possible for a
All implementations that implement JAXP 1.5 or newer are required to
support the
| |
| setResourceResolver | back to summary |
|---|---|
| public void setResourceResolver(LSResourceResolver resourceResolver) Implements abstract javax. Doc from javax. Sets the
Applications can call this method even during a
When the class DumbDOMResourceResolver implements
If a
When a new | |
| Access | Constructor and Description |
|---|---|
| public | |
| public | XMLGrammarPoolImplExtension(int initialCapacity)
Constructs a grammar pool with a specified number of buckets. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv int |
| XMLGrammarPoolImplExtension | back to summary |
|---|---|
| public XMLGrammarPoolImplExtension() Constructs a grammar pool with a default number of buckets. | |
| XMLGrammarPoolImplExtension | back to summary |
|---|---|
| public XMLGrammarPoolImplExtension(int initialCapacity) Constructs a grammar pool with a specified number of buckets. | |
| getGrammarCount | back to summary |
|---|---|
| pack-priv int getGrammarCount() Returns the number of grammars contained in this pool. | |
| Modifier and Type | Field and Description |
|---|---|
| private XMLGrammarPool |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | cacheGrammars(String grammarType, Grammar[] grammars)
Implements com. return the final set of grammars that the validator ended up with. |
| public void | clear()
Implements com. Removes all grammars from the pool. |
| pack-priv XMLGrammarPool | |
| public void | lockPool()
Implements com. Causes the XMLGrammarPool not to store any grammars when the cacheGrammars(String, Grammar[[]) method is called. |
| public Grammar | retrieveGrammar(XMLGrammarDescription desc)
Implements com. This method requests that the application retrieve a grammar corresponding to the given GrammarIdentifier from its cache. |
| public Grammar[] | retrieveInitialGrammarSet(String grammarType)
Implements com. retrieve the initial known set of grammars. |
| pack-priv void | |
| public void | unlockPool()
Implements com. Allows the XMLGrammarPool to store grammars when its cacheGrammars(String, Grammar[]) method is called. |
| fGrammarPool | back to summary |
|---|---|
| private XMLGrammarPool fGrammarPool | |
| XMLGrammarPoolWrapper | back to summary |
|---|---|
| pack-priv XMLGrammarPoolWrapper() | |
| cacheGrammars | back to summary |
|---|---|
| public void cacheGrammars(String grammarType, Grammar[] grammars) Implements com. Doc from com. return the final set of grammars that the validator ended up with. This method is called after the validation finishes. The application may then choose to cache some of the returned grammars. | |
| clear | back to summary |
|---|---|
| public void clear() Implements com. Doc from com. Removes all grammars from the pool. | |
| getGrammarPool | back to summary |
|---|---|
| pack-priv XMLGrammarPool getGrammarPool() | |
| lockPool | back to summary |
|---|---|
| public void lockPool() Implements com. Doc from com. Causes the XMLGrammarPool not to store any grammars when the cacheGrammars(String, Grammar[[]) method is called. | |
| retrieveGrammar | back to summary |
|---|---|
| public Grammar retrieveGrammar(XMLGrammarDescription desc) Implements com. Doc from com. This method requests that the application retrieve a grammar corresponding to the given GrammarIdentifier from its cache. If it cannot do so it must return null; the parser will then call the EntityResolver. An application must not call its EntityResolver itself from this method; this may result in infinite recursions. | |
| retrieveInitialGrammarSet | back to summary |
|---|---|
| public Grammar[] retrieveInitialGrammarSet(String grammarType) Implements com. Doc from com. retrieve the initial known set of grammars. this method is called by a validator before the validation starts. the application can provide an initial set of grammars available to the current validation attempt. | |
| setGrammarPool | back to summary |
|---|---|
| pack-priv void setGrammarPool(XMLGrammarPool grammarPool) | |
| unlockPool | back to summary |
|---|---|
| public void unlockPool() Implements com. Doc from com. Allows the XMLGrammarPool to store grammars when its cacheGrammars(String, Grammar[]) method is called. This is the default state of the object. | |