public class XMLSchemaLoader extends java.lang.Object implements org.apache.xerces.xni.grammars.XMLGrammarLoader, org.apache.xerces.xni.parser.XMLComponent, XSElementDeclHelper, org.apache.xerces.xs.XSLoader, org.w3c.dom.DOMConfiguration
This class only knows how to make XSDHandler do its thing. The caller must ensure that all its properties (schemaLocation, JAXPSchemaSource etc.) have been properly set.
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
ALLOW_JAVA_ENCODINGS
Feature identifier: allow java encodings to be recognized when parsing schema docs.
|
protected static java.lang.String |
ASSERT_COMMENT_PI
Feature identifier: comment and PI nodes for
|
protected static java.lang.String |
AUGMENT_PSVI |
protected static java.lang.String |
CONTINUE_AFTER_FATAL_ERROR
Feature identifier: continue after fatal error.
|
protected static java.lang.String |
CTA_FULL_XPATH
Feature identifier: full XPath 2.0 support for CTA
|
protected static java.lang.String |
DATATYPE_XML_VERSION |
protected static java.lang.String |
DISALLOW_DOCTYPE
Feature: disallow doctype
|
protected static java.lang.String |
ENTITY_MANAGER |
static java.lang.String |
ENTITY_RESOLVER
Property identifier: entity resolver.
|
protected static java.lang.String |
ERROR_HANDLER
Property identifier: error handler.
|
static java.lang.String |
ERROR_REPORTER
Property identifier: error reporter.
|
protected static java.lang.String |
GENERATE_SYNTHETIC_ANNOTATIONS
Feature: generate synthetic annotations
|
protected static java.lang.String |
HONOUR_ALL_SCHEMALOCATIONS
Feature identifier: honour all schemaLocations
|
protected static java.lang.String |
JAXP_SCHEMA_SOURCE
Property identifier: JAXP schema source.
|
protected static java.lang.String |
LOCALE
Property identifier: locale.
|
protected static java.lang.String |
NAMESPACE_GROWTH
Feature identifier: namespace growth
|
protected static java.lang.String |
PARSER_SETTINGS |
protected static java.lang.String |
SCHEMA_DV_FACTORY
Property identifier: Schema DV Factory
|
protected static java.lang.String |
SCHEMA_FULL_CHECKING
Feature identifier: schema full checking
|
protected static java.lang.String |
SCHEMA_LOCATION
Property identifier: schema location.
|
protected static java.lang.String |
SCHEMA_NONS_LOCATION
Property identifier: no namespace schema location.
|
protected static java.lang.String |
SECURITY_MANAGER |
protected static java.lang.String |
STANDARD_URI_CONFORMANT_FEATURE
Feature identifier: standard uri conformant feature.
|
static java.lang.String |
SYMBOL_TABLE
Property identifier: symbol table.
|
protected static java.lang.String |
TOLERATE_DUPLICATES
Feature identifier: tolerate duplicates
|
protected static java.lang.String |
VALIDATE_ANNOTATIONS
Feature identifier: validate annotations.
|
protected static java.lang.String |
XML_SCHEMA_VERSION |
static java.lang.String |
XMLGRAMMAR_POOL
Property identifier: grammar pool.
|
| Constructor and Description |
|---|
XMLSchemaLoader() |
XMLSchemaLoader(SymbolTable symbolTable) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canSetParameter(java.lang.String name,
java.lang.Object value)
Check if setting a parameter to a specific value is supported.
|
org.w3c.dom.DOMConfiguration |
getConfig()
The configuration of a document.
|
org.apache.xerces.xni.parser.XMLEntityResolver |
getEntityResolver()
Returns the registered entity resolver.
|
org.apache.xerces.xni.parser.XMLErrorHandler |
getErrorHandler()
Returns the registered error handler.
|
boolean |
getFeature(java.lang.String featureId)
Returns the state of a feature.
|
java.lang.Boolean |
getFeatureDefault(java.lang.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.
|
XSElementDecl |
getGlobalElementDecl(org.apache.xerces.xni.QName element) |
java.util.Locale |
getLocale()
Return the Locale the XMLGrammarLoader is using.
|
java.lang.Object |
getParameter(java.lang.String name)
Return the value of a parameter if known.
|
org.w3c.dom.DOMStringList |
getParameterNames()
The list of the parameters supported by this
DOMConfiguration object and for which at least one value
can be set by the application. |
java.lang.Object |
getProperty(java.lang.String propertyId)
Returns the state of a property.
|
java.lang.Object |
getPropertyDefault(java.lang.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.
|
java.lang.String[] |
getRecognizedFeatures()
Returns a list of feature identifiers that are recognized by
this XMLGrammarLoader.
|
java.lang.String[] |
getRecognizedProperties()
Returns a list of property identifiers that are recognized by
this XMLGrammarLoader.
|
org.apache.xerces.xs.XSModel |
load(org.w3c.dom.ls.LSInput is)
Parse an XML Schema document from a resource identified by a
LSInput . |
org.apache.xerces.xni.grammars.Grammar |
loadGrammar(org.apache.xerces.xni.parser.XMLInputSource source)
Returns a Grammar object by parsing the contents of the
entity pointed to by source.
|
void |
loadGrammar(org.apache.xerces.xni.parser.XMLInputSource[] source)
Returns a Grammar object by parsing the contents of the
entities pointed to by sources.
|
org.apache.xerces.xs.XSModel |
loadInputList(org.apache.xerces.xs.LSInputList is)
Parses the content of XML Schema documents specified as a list of
LSInputs. |
org.apache.xerces.xs.XSModel |
loadURI(java.lang.String uri)
Parse an XML Schema document from a location identified by a URI
reference.
|
org.apache.xerces.xs.XSModel |
loadURIList(org.apache.xerces.xs.StringList uriList)
Parses the content of XML Schema documents specified as the list of URI
references.
|
static void |
processExternalHints(java.lang.String sl,
java.lang.String nsl,
java.util.Hashtable locations,
XMLErrorReporter er) |
void |
reset(org.apache.xerces.xni.parser.XMLComponentManager componentManager)
Resets the component.
|
static org.apache.xerces.xni.parser.XMLInputSource |
resolveDocument(XSDDescription desc,
java.util.Hashtable locationPairs,
org.apache.xerces.xni.parser.XMLEntityResolver entityResolver)
This method tries to resolve location of the given schema.
|
void |
setEntityResolver(org.apache.xerces.xni.parser.XMLEntityResolver entityResolver)
Sets the entity resolver.
|
void |
setErrorHandler(org.apache.xerces.xni.parser.XMLErrorHandler errorHandler)
Sets the error handler.
|
void |
setFeature(java.lang.String featureId,
boolean state)
Sets the state of a feature.
|
void |
setLocale(java.util.Locale locale)
Set the locale to use for messages.
|
void |
setParameter(java.lang.String name,
java.lang.Object value)
Set the value of a parameter.
|
void |
setProperty(java.lang.String propertyId,
java.lang.Object state)
Sets the state of a property.
|
static boolean |
tokenizeSchemaLocationStr(java.lang.String schemaStr,
java.util.Hashtable locations,
java.lang.String base) |
protected static final java.lang.String SCHEMA_FULL_CHECKING
protected static final java.lang.String CONTINUE_AFTER_FATAL_ERROR
protected static final java.lang.String ALLOW_JAVA_ENCODINGS
protected static final java.lang.String STANDARD_URI_CONFORMANT_FEATURE
protected static final java.lang.String VALIDATE_ANNOTATIONS
protected static final java.lang.String DISALLOW_DOCTYPE
protected static final java.lang.String GENERATE_SYNTHETIC_ANNOTATIONS
protected static final java.lang.String HONOUR_ALL_SCHEMALOCATIONS
protected static final java.lang.String AUGMENT_PSVI
protected static final java.lang.String PARSER_SETTINGS
protected static final java.lang.String NAMESPACE_GROWTH
protected static final java.lang.String TOLERATE_DUPLICATES
protected static final java.lang.String CTA_FULL_XPATH
protected static final java.lang.String ASSERT_COMMENT_PI
protected static final java.lang.String SCHEMA_DV_FACTORY
public static final java.lang.String SYMBOL_TABLE
public static final java.lang.String ERROR_REPORTER
protected static final java.lang.String ERROR_HANDLER
public static final java.lang.String ENTITY_RESOLVER
public static final java.lang.String XMLGRAMMAR_POOL
protected static final java.lang.String SCHEMA_LOCATION
protected static final java.lang.String SCHEMA_NONS_LOCATION
protected static final java.lang.String JAXP_SCHEMA_SOURCE
protected static final java.lang.String SECURITY_MANAGER
protected static final java.lang.String LOCALE
protected static final java.lang.String ENTITY_MANAGER
protected static final java.lang.String XML_SCHEMA_VERSION
protected static final java.lang.String DATATYPE_XML_VERSION
public XMLSchemaLoader()
public XMLSchemaLoader(SymbolTable symbolTable)
public java.lang.String[] getRecognizedFeatures()
getRecognizedFeatures in interface org.apache.xerces.xni.grammars.XMLGrammarLoadergetRecognizedFeatures in interface org.apache.xerces.xni.parser.XMLComponentpublic boolean getFeature(java.lang.String featureId)
throws org.apache.xerces.xni.parser.XMLConfigurationException
getFeature in interface org.apache.xerces.xni.grammars.XMLGrammarLoaderfeatureId - The feature identifier.org.apache.xerces.xni.parser.XMLConfigurationException - Thrown on configuration error.public void setFeature(java.lang.String featureId,
boolean state)
throws org.apache.xerces.xni.parser.XMLConfigurationException
setFeature in interface org.apache.xerces.xni.grammars.XMLGrammarLoadersetFeature in interface org.apache.xerces.xni.parser.XMLComponentfeatureId - The feature identifier.state - The state of the feature.org.apache.xerces.xni.parser.XMLConfigurationException - Thrown when a feature is not
recognized or cannot be set.public java.lang.String[] getRecognizedProperties()
getRecognizedProperties in interface org.apache.xerces.xni.grammars.XMLGrammarLoadergetRecognizedProperties in interface org.apache.xerces.xni.parser.XMLComponentpublic java.lang.Object getProperty(java.lang.String propertyId)
throws org.apache.xerces.xni.parser.XMLConfigurationException
getProperty in interface org.apache.xerces.xni.grammars.XMLGrammarLoaderpropertyId - The property identifier.org.apache.xerces.xni.parser.XMLConfigurationException - Thrown on configuration error.public void setProperty(java.lang.String propertyId,
java.lang.Object state)
throws org.apache.xerces.xni.parser.XMLConfigurationException
setProperty in interface org.apache.xerces.xni.grammars.XMLGrammarLoadersetProperty in interface org.apache.xerces.xni.parser.XMLComponentpropertyId - The property identifier.state - The state of the property.org.apache.xerces.xni.parser.XMLConfigurationException - Thrown when a property is not
recognized or cannot be set.public void setLocale(java.util.Locale locale)
setLocale in interface org.apache.xerces.xni.grammars.XMLGrammarLoaderlocale - The locale object to use for localization of messages.org.apache.xerces.xni.XNIException - Thrown if the parser does not support the
specified locale.public java.util.Locale getLocale()
getLocale in interface org.apache.xerces.xni.grammars.XMLGrammarLoaderpublic void setErrorHandler(org.apache.xerces.xni.parser.XMLErrorHandler errorHandler)
setErrorHandler in interface org.apache.xerces.xni.grammars.XMLGrammarLoadererrorHandler - The error handler.public org.apache.xerces.xni.parser.XMLErrorHandler getErrorHandler()
getErrorHandler in interface org.apache.xerces.xni.grammars.XMLGrammarLoaderpublic void setEntityResolver(org.apache.xerces.xni.parser.XMLEntityResolver entityResolver)
setEntityResolver in interface org.apache.xerces.xni.grammars.XMLGrammarLoaderentityResolver - The new entity resolver.public org.apache.xerces.xni.parser.XMLEntityResolver getEntityResolver()
getEntityResolver in interface org.apache.xerces.xni.grammars.XMLGrammarLoaderpublic void loadGrammar(org.apache.xerces.xni.parser.XMLInputSource[] source)
throws java.io.IOException,
org.apache.xerces.xni.XNIException
source - the locations of the entity which forms
the staring point of the grammars to be constructedjava.io.IOException - when a problem is encounted reading the entityorg.apache.xerces.xni.XNIException - when a condition arises (such as a FatalError) that requires parsing
of the entity be terminatedpublic org.apache.xerces.xni.grammars.Grammar loadGrammar(org.apache.xerces.xni.parser.XMLInputSource source)
throws java.io.IOException,
org.apache.xerces.xni.XNIException
loadGrammar in interface org.apache.xerces.xni.grammars.XMLGrammarLoadersource - the location of the entity which forms
the starting point of the grammar to be constructed.java.io.IOException - When a problem is encountered reading the entity
XNIException When a condition arises (such as a FatalError) that requires parsing
of the entity be terminated.org.apache.xerces.xni.XNIExceptionpublic static org.apache.xerces.xni.parser.XMLInputSource resolveDocument(XSDDescription desc, java.util.Hashtable locationPairs, org.apache.xerces.xni.parser.XMLEntityResolver entityResolver) throws java.io.IOException
desc - locationPairs - entityResolver - java.io.IOExceptionpublic static void processExternalHints(java.lang.String sl,
java.lang.String nsl,
java.util.Hashtable locations,
XMLErrorReporter er)
public static boolean tokenizeSchemaLocationStr(java.lang.String schemaStr,
java.util.Hashtable locations,
java.lang.String base)
public java.lang.Boolean getFeatureDefault(java.lang.String featureId)
org.apache.xerces.xni.parser.XMLComponentgetFeatureDefault in interface org.apache.xerces.xni.parser.XMLComponentfeatureId - The feature identifier.public java.lang.Object getPropertyDefault(java.lang.String propertyId)
org.apache.xerces.xni.parser.XMLComponentgetPropertyDefault in interface org.apache.xerces.xni.parser.XMLComponentpropertyId - The property identifier.public void reset(org.apache.xerces.xni.parser.XMLComponentManager componentManager)
throws org.apache.xerces.xni.parser.XMLConfigurationException
org.apache.xerces.xni.parser.XMLComponentreset in interface org.apache.xerces.xni.parser.XMLComponentcomponentManager - The component manager.org.apache.xerces.xni.parser.XMLConfigurationExceptionpublic org.w3c.dom.DOMConfiguration getConfig()
org.apache.xerces.xs.XSLoaderDOMConfiguration interface:
error-handler (DOMErrorHandler) and
resource-resolver (LSResourceResolver).
"validate"truefalsegetConfig in interface org.apache.xerces.xs.XSLoaderpublic org.apache.xerces.xs.XSModel load(org.w3c.dom.ls.LSInput is)
org.apache.xerces.xs.XSLoaderLSInput .load in interface org.apache.xerces.xs.XSLoaderis - The LSInput from which the source
document is to be read.public org.apache.xerces.xs.XSModel loadInputList(org.apache.xerces.xs.LSInputList is)
org.apache.xerces.xs.XSLoaderLSInputs.loadInputList in interface org.apache.xerces.xs.XSLoaderis - The list of LSInputs from which the XML
Schema documents are to be read.public org.apache.xerces.xs.XSModel loadURI(java.lang.String uri)
org.apache.xerces.xs.XSLoaderloadURI in interface org.apache.xerces.xs.XSLoaderuri - The location of the XML Schema document to be read.public org.apache.xerces.xs.XSModel loadURIList(org.apache.xerces.xs.StringList uriList)
org.apache.xerces.xs.XSLoaderloadURIList in interface org.apache.xerces.xs.XSLoaderuriList - The list of URI locations.public boolean canSetParameter(java.lang.String name,
java.lang.Object value)
org.w3c.dom.DOMConfigurationcanSetParameter in interface org.w3c.dom.DOMConfigurationname - The name of the parameter to check.value - An object. if null, the returned value is
true.true if the parameter could be successfully set
to the specified value, or false if the parameter is
not recognized or the requested value is not supported. This does
not change the current value of the parameter itself.public java.lang.Object getParameter(java.lang.String name)
throws org.w3c.dom.DOMException
org.w3c.dom.DOMConfigurationgetParameter in interface org.w3c.dom.DOMConfigurationname - The name of the parameter.null if no object has been associated or if the
parameter is not supported.org.w3c.dom.DOMException - NOT_FOUND_ERR: Raised when the parameter name is not recognized.public org.w3c.dom.DOMStringList getParameterNames()
org.w3c.dom.DOMConfigurationDOMConfiguration 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 org.w3c.dom.DOMConfigurationpublic void setParameter(java.lang.String name,
java.lang.Object value)
throws org.w3c.dom.DOMException
org.w3c.dom.DOMConfigurationsetParameter in interface org.w3c.dom.DOMConfigurationname - The name of the parameter to set.value - The new value or null if the user wishes to
unset the parameter. While the type of the value parameter is
defined as DOMUserData, the object type must match the
type defined by the definition of the parameter. For example, if
the parameter is "error-handler", the value must be of type
DOMErrorHandler.org.w3c.dom.DOMException - NOT_FOUND_ERR: Raised when the parameter name is not recognized.
public XSElementDecl getGlobalElementDecl(org.apache.xerces.xni.QName element)
getGlobalElementDecl in interface XSElementDeclHelperCopyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.