FileDocCategorySizeDatePackage
XMLGrammarLoader.javaAPI DocApache Xerces 3.0.15255Fri Sep 14 20:33:52 BST 2007org.apache.xerces.xni.grammars

XMLGrammarLoader

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.
author
Neil Graham, IBM
version
$Id: XMLGrammarLoader.java 447245 2006-09-18 05:22:10Z mrglavas $

Fields Summary
Constructors Summary
Methods Summary
public org.apache.xerces.xni.parser.XMLEntityResolvergetEntityResolver()
Returns the registered entity resolver.

public org.apache.xerces.xni.parser.XMLErrorHandlergetErrorHandler()
Returns the registered error handler.

public booleangetFeature(java.lang.String featureId)
Returns the state of a feature.

param
featureId The feature identifier.
throws
XMLConfigurationException Thrown on configuration error.

public java.util.LocalegetLocale()
Return the Locale the XMLGrammarLoader is using.

public java.lang.ObjectgetProperty(java.lang.String propertyId)
Returns the state of a property.

param
propertyId The property identifier.
throws
XMLConfigurationException Thrown on configuration error.

public java.lang.String[]getRecognizedFeatures()
Returns a list of feature identifiers that are recognized by this XMLGrammarLoader. This method may return null if no features are recognized.

public java.lang.String[]getRecognizedProperties()
Returns a list of property identifiers that are recognized by this XMLGrammarLoader. This method may return null if no properties are recognized.

public GrammarloadGrammar(org.apache.xerces.xni.parser.XMLInputSource source)
Returns a Grammar object by parsing the contents of the entity pointed to by source.

param
source the location of the entity which forms the starting point of the grammar to be constructed.
throws
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.

public voidsetEntityResolver(org.apache.xerces.xni.parser.XMLEntityResolver entityResolver)
Sets the entity resolver.

param
entityResolver The new entity resolver.

public voidsetErrorHandler(org.apache.xerces.xni.parser.XMLErrorHandler errorHandler)
Sets the error handler.

param
errorHandler The error handler.

public voidsetFeature(java.lang.String featureId, boolean state)
Sets the state of a feature.

param
featureId The feature identifier.
param
state The state of the feature.
throws
XMLConfigurationException Thrown when a feature is not recognized or cannot be set.

public voidsetLocale(java.util.Locale locale)
Set the locale to use for messages.

param
locale The locale object to use for localization of messages.
exception
XNIException Thrown if the parser does not support the specified locale.

public voidsetProperty(java.lang.String propertyId, java.lang.Object state)
Sets the state of a property.

param
propertyId The property identifier.
param
state The state of the property.
throws
XMLConfigurationException Thrown when a property is not recognized or cannot be set.