This class provides an easy way for a user to preparse grammars of various types. By default, it knows how to preparse external DTD's and schemas; it provides an easy way for user applications to register classes that know how to parse additional grammar types. By default, it does no grammar caching; but it provides ways for user applications to do so.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | XMLGrammarPreparser.XMLGrammarLoaderContainer
Container for an XMLGrammarLoader. |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| protected static final String | ENTITY_RESOLVER
Property identifier: entity resolver. |
| protected static final String | ERROR_HANDLER
Property identifier: error handler. |
| protected static final String | ERROR_REPORTER
Property identifier: error reporter. |
| protected XMLEntityResolver | |
| protected final XMLErrorReporter | |
| protected XMLGrammarPool | |
| private final Hashtable | |
| protected Locale | |
| private int | |
| protected final SymbolTable | |
| protected static final String | GRAMMAR_POOL
Property identifier: grammar pool . |
| private static final Hashtable | |
| private static final String[] | RECOGNIZED_PROPERTIES
Recognized properties. |
| protected static final String | SYMBOL_TABLE
Property identifier: symbol table. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | XMLGrammarPreparser(SymbolTable
The symbol table to use. symbolTable)Constructs a preparser using the specified symbol table. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public XMLEntityResolver | |
| public XMLErrorHandler | |
| public boolean | |
| public XMLGrammarPool | |
| public XMLGrammarLoader | |
| public Locale | |
| public Object | |
| public Grammar | Returns: The newly createdGrammar.The type of the grammar to be constructed type, XMLInputSource The XMLInputSource containing this grammar's
information
If a URI is included in the systemId field, the parser will not expand this URI or make it
available to the EntityResolver is)Parse a grammar from a location identified by an XMLInputSource. |
| public boolean | |
| public void | setEntityResolver(XMLEntityResolver
The new entity resolver. entityResolver)Sets the entity resolver. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void |
| CONTINUE_AFTER_FATAL_ERROR | back to summary |
|---|---|
| private static final String CONTINUE_AFTER_FATAL_ERROR | |
| ENTITY_RESOLVER | back to summary |
|---|---|
| protected static final String ENTITY_RESOLVER Property identifier: entity resolver. | |
| ERROR_HANDLER | back to summary |
|---|---|
| protected static final String ERROR_HANDLER Property identifier: error handler. | |
| ERROR_REPORTER | back to summary |
|---|---|
| protected static final String ERROR_REPORTER Property identifier: error reporter. | |
| fEntityResolver | back to summary |
|---|---|
| protected XMLEntityResolver fEntityResolver | |
| fErrorReporter | back to summary |
|---|---|
| protected final XMLErrorReporter fErrorReporter | |
| fGrammarPool | back to summary |
|---|---|
| protected XMLGrammarPool fGrammarPool | |
| fLoaders | back to summary |
|---|---|
| private final Hashtable<K, V> fLoaders | |
| fLocale | back to summary |
|---|---|
| protected Locale fLocale | |
| fModCount | back to summary |
|---|---|
| private int fModCount | |
| fSymbolTable | back to summary |
|---|---|
| protected final SymbolTable fSymbolTable | |
| GRAMMAR_POOL | back to summary |
|---|---|
| protected static final String GRAMMAR_POOL Property identifier: grammar pool . | |
| KNOWN_LOADERS | back to summary |
|---|---|
| private static final Hashtable<K, V> KNOWN_LOADERS | |
| RECOGNIZED_PROPERTIES | back to summary |
|---|---|
| private static final String[] RECOGNIZED_PROPERTIES Recognized properties. | |
| SYMBOL_TABLE | back to summary |
|---|---|
| protected static final String SYMBOL_TABLE Property identifier: symbol table. | |
| XMLGrammarPreparser | back to summary |
|---|---|
| public XMLGrammarPreparser() Default constructor. | |
| XMLGrammarPreparser | back to summary |
|---|---|
| public XMLGrammarPreparser(SymbolTable symbolTable) Constructs a preparser using the specified symbol table.
| |
| clearModCounts | back to summary |
|---|---|
| private void clearModCounts() | |
| getEntityResolver | back to summary |
|---|---|
| public XMLEntityResolver getEntityResolver() Returns the registered entity resolver. | |
| getErrorHandler | back to summary |
|---|---|
| public XMLErrorHandler getErrorHandler() Returns the registered error handler. | |
| getFeature | back to summary |
|---|---|
| public boolean getFeature(String type, String featureId) | |
| getGrammarPool | back to summary |
|---|---|
| public XMLGrammarPool getGrammarPool() Returns the registered grammar pool. | |
| getLoader | back to summary |
|---|---|
| public XMLGrammarLoader getLoader(String type) | |
| getLocale | back to summary |
|---|---|
| public Locale getLocale() Return the Locale the XMLGrammarLoader is using. | |
| getProperty | back to summary |
|---|---|
| public Object getProperty(String type, String propertyId) | |
| preparseGrammar | back to summary |
|---|---|
| public Grammar preparseGrammar(String type, XMLInputSource is) throws XNIException, IOException Parse a grammar from a location identified by an XMLInputSource. This method also adds this grammar to the XMLGrammarPool
| |
| registerPreparser | back to summary |
|---|---|
| public boolean registerPreparser(String grammarType, XMLGrammarLoader loader) | |
| setEntityResolver | back to summary |
|---|---|
| public void setEntityResolver(XMLEntityResolver entityResolver) Sets the entity resolver.
| |
| setErrorHandler | back to summary |
|---|---|
| public void setErrorHandler(XMLErrorHandler errorHandler) Sets the error handler.
| |
| setFeature | back to summary |
|---|---|
| public void setFeature(String featureId, boolean value) | |
| setGrammarPool | back to summary |
|---|---|
| public void setGrammarPool(XMLGrammarPool grammarPool) Sets the grammar pool.
| |
| setLocale | back to summary |
|---|---|
| public void setLocale(Locale locale) Set the locale to use for messages.
| |
| setProperty | back to summary |
|---|---|
| public void setProperty(String propId, Object value) | |
| Modifier and Type | Field and Description |
|---|---|
| public final XMLGrammarLoader | |
| public int |
| Access | Constructor and Description |
|---|---|
| public |
| loader | back to summary |
|---|---|
| public final XMLGrammarLoader loader | |
| modCount | back to summary |
|---|---|
| public int modCount | |
| XMLGrammarLoaderContainer | back to summary |
|---|---|
| public XMLGrammarLoaderContainer(XMLGrammarLoader loader) | |