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 grammarType, Grammar[] grammars)
Implements com. return the final set of grammars that the validator ended up with. |
| public void | clear()
Implements com. Removes all grammars from the pool. |
| public void | lockPool()
Implements com. Causes the XMLGrammarPool not to store any grammars when the cacheGrammars(String, Grammar[[]) method is called. |
| public Grammar | retrieveGrammar(XMLGrammarDescription desc)
Implements com. This method requests that the application retrieve a grammar corresponding to the given GrammarIdentifier from its cache. |
| public Grammar[] | retrieveInitialGrammarSet(String grammarType)
Implements com. retrieve the initial known set of grammars. |
| public void | unlockPool()
Implements com. Allows the XMLGrammarPool to store grammars when its cacheGrammars(String, Grammar[]) method is called. |
| 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 com. Doc from com. 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 com. Doc from com. Removes all grammars from the pool. | |
| lockPool | back to summary |
|---|---|
| public void lockPool() Implements com. Doc from com. 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 com. Doc from com. 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 com. Doc from com. 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 com. Doc from com. Allows the XMLGrammarPool to store grammars when its cacheGrammars(String, Grammar[]) method is called. This is the default state of the object. | |