Filter XMLGrammarPool that exposes a
read-only view of the underlying pool.
| Modifier and Type | Field and Description |
|---|---|
| private final XMLGrammarPool |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | cacheGrammars(String
the type of the grammars being returned; grammarType, Grammar[] an array containing the set of grammars being
returned; order is not significant. grammars)Implements org. return the final set of grammars that the validator ended up with. |
| public void | clear()
Implements org. |
| public void | lockPool()
Implements org. |
| public Grammar | retrieveGrammar(XMLGrammarDescription
The description of the Grammar being requested. desc)Implements org. This method requests that the application retrieve a grammar corresponding to the given GrammarIdentifier from its cache. |
| public Grammar[] | retrieveInitialGrammarSet(String
the type of the grammar, from the
grammarType)org.apache.xerces.xni.grammars.Grammar interface.Implements org. retrieve the initial known set of grammars. |
| public void | unlockPool()
Implements org. |
| core | back to summary |
|---|---|
| private final XMLGrammarPool core | |
| ReadOnlyGrammarPool | back to summary |
|---|---|
| public ReadOnlyGrammarPool(XMLGrammarPool pool) | |
| cacheGrammars | back to summary |
|---|---|
| public void cacheGrammars(String grammarType, Grammar[] grammars) Implements org. Doc from org. return the final set of grammars that the validator ended up with. This method is called after the validation finishes. The application may then choose to cache some of the returned grammars. | |
| clear | back to summary |
|---|---|
| public void clear() Implements org. Doc from org. Removes all grammars from the pool. | |
| lockPool | back to summary |
|---|---|
| public void lockPool() Implements org. Doc from org. Causes the XMLGrammarPool not to store any grammars when the cacheGrammars(String, Grammar[[]) method is called. | |
| retrieveGrammar | back to summary |
|---|---|
| public Grammar retrieveGrammar(XMLGrammarDescription desc) Implements org. Doc from org. This method requests that the application retrieve a grammar corresponding to the given GrammarIdentifier from its cache. If it cannot do so it must return null; the parser will then call the EntityResolver. An application must not call its EntityResolver itself from this method; this may result in infinite recursions.
| |
| retrieveInitialGrammarSet | back to summary |
|---|---|
| public Grammar[] retrieveInitialGrammarSet(String grammarType) Implements org. Doc from org. retrieve the initial known set of grammars. this method is called by a validator before the validation starts. the application can provide an initial set of grammars available to the current validation attempt. | |
| unlockPool | back to summary |
|---|---|
| public void unlockPool() Implements org. Doc from org. Allows the XMLGrammarPool to store grammars when its cacheGrammars(String, Grammar[]) method is called. This is the default state of the object. | |