FileDocCategorySizeDatePackage
XMLGrammarLoader.javaAPI DocJava SE 6 API5041Tue Jun 10 00:22:54 BST 2008com.sun.org.apache.xerces.internal.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,v 1.2.6.1 2005/09/06 08:56:55 neerajbj Exp $

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

public com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.xni.grammars.GrammarloadGrammar(com.sun.org.apache.xerces.internal.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(com.sun.org.apache.xerces.internal.xni.parser.XMLEntityResolver entityResolver)
Sets the entity resolver.

param
entityResolver The new entity resolver.

public voidsetErrorHandler(com.sun.org.apache.xerces.internal.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.