public static final class

CachingParserPool.ShadowedGrammarPool

extends XMLGrammarPoolImpl
java.lang.Object
   ↳ org.apache.xerces.util.XMLGrammarPoolImpl
     ↳ org.apache.xerces.parsers.CachingParserPool.ShadowedGrammarPool

Class Overview

Shadowed grammar pool. This class is predicated on the existence of a concrete implementation; so using our own doesn't seem to bad an idea.

Summary

[Expand]
Inherited Constants
From class org.apache.xerces.util.XMLGrammarPoolImpl
[Expand]
Inherited Fields
From class org.apache.xerces.util.XMLGrammarPoolImpl
Public Constructors
CachingParserPool.ShadowedGrammarPool(XMLGrammarPool grammarPool)
Constructs a shadowed grammar pool.
Public Methods
void cacheGrammars(String grammarType, Grammar[] grammars)
Give the grammarPool the option of caching these grammars.
boolean containsGrammar(XMLGrammarDescription desc)
Returns true if the grammar pool contains a grammar associated to the specified description.
Grammar getGrammar(XMLGrammarDescription desc)
Returns the grammar associated to the specified description.
Grammar retrieveGrammar(XMLGrammarDescription gDesc)
Retrieve a particular grammar.
Grammar[] retrieveInitialGrammarSet(String grammarType)
Retrieve the initial set of grammars for the validator to work with.
[Expand]
Inherited Methods
From class org.apache.xerces.util.XMLGrammarPoolImpl
From class java.lang.Object
From interface org.apache.xerces.xni.grammars.XMLGrammarPool

Public Constructors

public CachingParserPool.ShadowedGrammarPool (XMLGrammarPool grammarPool)

Constructs a shadowed grammar pool.

Public Methods

public void cacheGrammars (String grammarType, Grammar[] grammars)

Give the grammarPool the option of caching these grammars. This certainly must be synchronized.

Parameters
grammarType The type of the grammars to be cached.
grammars The Grammars that may be cached (unordered, Grammars previously given to the validator may be included).

public boolean containsGrammar (XMLGrammarDescription desc)

Returns true if the grammar pool contains a grammar associated to the specified description.

Parameters
desc The description of the grammar.

public Grammar getGrammar (XMLGrammarDescription desc)

Returns the grammar associated to the specified description.

Parameters
desc The description of the grammar.

public Grammar retrieveGrammar (XMLGrammarDescription gDesc)

Retrieve a particular grammar. REVISIT: does this need to be synchronized since it's just reading?

Parameters
gDesc Description of the grammar to be retrieved
Returns
  • Grammar corresponding to gDesc, or null if none exists.

public Grammar[] retrieveInitialGrammarSet (String grammarType)

Retrieve the initial set of grammars for the validator to work with. REVISIT: does this need to be synchronized since it's just reading?

Parameters
grammarType Type of the grammars to be retrieved.
Returns
  • The initial grammar set the validator may place in its "bucket"