FileDocCategorySizeDatePackage
XMLGrammarLoader.javaAPI DocJava SE 5 API7106Fri Aug 26 14:55:58 BST 2005com.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.1 2002/05/23 16:46:01 neilg 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.