public interface XMLGrammarLoader
Modifier and Type | Method and Description |
---|---|
XMLEntityResolver |
getEntityResolver()
Returns the registered entity resolver.
|
XMLErrorHandler |
getErrorHandler()
Returns the registered error handler.
|
boolean |
getFeature(String featureId)
Returns the state of a feature.
|
Locale |
getLocale()
Return the Locale the XMLGrammarLoader is using.
|
Object |
getProperty(String propertyId)
Returns the state of a property.
|
String[] |
getRecognizedFeatures()
Returns a list of feature identifiers that are recognized by
this XMLGrammarLoader.
|
String[] |
getRecognizedProperties()
Returns a list of property identifiers that are recognized by
this XMLGrammarLoader.
|
Grammar |
loadGrammar(XMLInputSource source)
Returns a Grammar object by parsing the contents of the
entity pointed to by source.
|
void |
setEntityResolver(XMLEntityResolver entityResolver)
Sets the entity resolver.
|
void |
setErrorHandler(XMLErrorHandler errorHandler)
Sets the error handler.
|
void |
setFeature(String featureId,
boolean state)
Sets the state of a feature.
|
void |
setLocale(Locale locale)
Set the locale to use for messages.
|
void |
setProperty(String propertyId,
Object state)
Sets the state of a property.
|
String[] getRecognizedFeatures()
boolean getFeature(String featureId) throws XMLConfigurationException
featureId
- The feature identifier.XMLConfigurationException
- Thrown on configuration error.void setFeature(String featureId, boolean state) throws XMLConfigurationException
featureId
- The feature identifier.state
- The state of the feature.XMLConfigurationException
- Thrown when a feature is not
recognized or cannot be set.String[] getRecognizedProperties()
Object getProperty(String propertyId) throws XMLConfigurationException
propertyId
- The property identifier.XMLConfigurationException
- Thrown on configuration error.void setProperty(String propertyId, Object state) throws XMLConfigurationException
propertyId
- The property identifier.state
- The state of the property.XMLConfigurationException
- Thrown when a property is not
recognized or cannot be set.void setLocale(Locale locale)
locale
- The locale object to use for localization of messages.XNIException
- Thrown if the parser does not support the
specified locale.Locale getLocale()
void setErrorHandler(XMLErrorHandler errorHandler)
errorHandler
- The error handler.XMLErrorHandler getErrorHandler()
void setEntityResolver(XMLEntityResolver entityResolver)
entityResolver
- The new entity resolver.XMLEntityResolver getEntityResolver()
Grammar loadGrammar(XMLInputSource source) throws IOException, XNIException
source
- the location of the entity which forms
the starting point of the grammar to be constructed.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.XNIException
Copyright © 2017 JBoss by Red Hat. All rights reserved.