org.apache.xerces.parsers
Class CachingParserPool.ShadowedGrammarPool
- CachingParserPool
- org.apache.xerces.xni.grammars.XMLGrammarPool
public static final class CachingParserPool.ShadowedGrammarPool
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.
- Andy Clark, IBM
- Neil Graham, IBM
ShadowedGrammarPool(org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool) - Constructs a shadowed grammar pool.
|
void | cacheGrammars(String grammarType, org.apache.xerces.xni.grammars.Grammar[] grammars) - Give the grammarPool the option of caching these grammars.
|
boolean | containsGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription desc) - Returns true if the grammar pool contains a grammar associated
to the specified description.
|
org.apache.xerces.xni.grammars.Grammar | getGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription desc) - Returns the grammar associated to the specified description.
|
org.apache.xerces.xni.grammars.Grammar | retrieveGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription gDesc) - Retrieve a particular grammar.
|
org.apache.xerces.xni.grammars.Grammar[] | retrieveInitialGrammarSet(String grammarType) - Retrieve the initial set of grammars for the validator to work with.
|
cacheGrammars , clear , containsGrammar , equals , getGrammar , hashCode , lockPool , putGrammar , removeGrammar , retrieveGrammar , retrieveInitialGrammarSet , unlockPool |
ShadowedGrammarPool
public ShadowedGrammarPool(org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
Constructs a shadowed grammar pool.
cacheGrammars
public void cacheGrammars(String grammarType,
org.apache.xerces.xni.grammars.Grammar[] grammars)
Give the grammarPool the option of caching these grammars.
This certainly must be synchronized.
- cacheGrammars in interface org.apache.xerces.xni.grammars.XMLGrammarPool
- cacheGrammars in interface XMLGrammarPoolImpl
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).
containsGrammar
public boolean containsGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription desc)
Returns true if the grammar pool contains a grammar associated
to the specified description.
- containsGrammar in interface XMLGrammarPoolImpl
desc
- The description of the grammar.
getGrammar
public org.apache.xerces.xni.grammars.Grammar getGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription desc)
Returns the grammar associated to the specified description.
- getGrammar in interface XMLGrammarPoolImpl
desc
- The description of the grammar.
retrieveGrammar
public org.apache.xerces.xni.grammars.Grammar retrieveGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription gDesc)
Retrieve a particular grammar.
REVISIT: does this need to be synchronized since it's just reading?
- retrieveGrammar in interface org.apache.xerces.xni.grammars.XMLGrammarPool
- retrieveGrammar in interface XMLGrammarPoolImpl
gDesc
- Description of the grammar to be retrieved
- Grammar corresponding to gDesc, or null if none exists.
retrieveInitialGrammarSet
public org.apache.xerces.xni.grammars.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?
- retrieveInitialGrammarSet in interface org.apache.xerces.xni.grammars.XMLGrammarPool
- retrieveInitialGrammarSet in interface XMLGrammarPoolImpl
grammarType
- Type of the grammars to be retrieved.
- The initial grammar set the validator may place in its "bucket"
Copyright B) 1999-2005 Apache XML Project. All Rights Reserved.