|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface XMLGrammarLoader
The intention of this interface is to provide a generic means by which Grammar objects may be created without parsing instance documents. Implementations of this interface will know how to load specific types of grammars (e.g., DTD's or schemas); a wrapper will be provided for user applications to interact with these implementations.
| Method Summary | |
|---|---|
XMLEntityResolver |
getEntityResolver()
Returns the registered entity resolver. |
XMLErrorHandler |
getErrorHandler()
Returns the registered error handler. |
boolean |
getFeature(java.lang.String featureId)
Returns the state of a feature. |
java.util.Locale |
getLocale()
Return the Locale the XMLGrammarLoader is using. |
java.lang.Object |
getProperty(java.lang.String propertyId)
Returns the state of a 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. |
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(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 |
setProperty(java.lang.String propertyId,
java.lang.Object state)
Sets the state of a property. |
| Method Detail |
|---|
java.lang.String[] getRecognizedFeatures()
boolean getFeature(java.lang.String featureId)
throws XMLConfigurationException
featureId - The feature identifier.
XMLConfigurationException - Thrown on configuration error.
void setFeature(java.lang.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.java.lang.String[] getRecognizedProperties()
java.lang.Object getProperty(java.lang.String propertyId)
throws XMLConfigurationException
propertyId - The property identifier.
XMLConfigurationException - Thrown on configuration error.
void setProperty(java.lang.String propertyId,
java.lang.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(java.util.Locale locale)
locale - The locale object to use for localization of messages.
XNIException - Thrown if the parser does not support the
specified locale.java.util.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 java.io.IOException,
XNIException
source - 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.
XNIException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||