public static final class CachingParserPool.SynchronizedGrammarPool
extends java.lang.Object
implements org.apache.xerces.xni.grammars.XMLGrammarPool
| Constructor and Description |
|---|
SynchronizedGrammarPool(org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
Constructs a synchronized grammar pool.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cacheGrammars(java.lang.String grammarType,
org.apache.xerces.xni.grammars.Grammar[] grammars)
return the final set of grammars that the validator ended up
with.
|
void |
clear()
clear the grammar pool
|
void |
lockPool()
lock the grammar pool
|
org.apache.xerces.xni.grammars.Grammar |
retrieveGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription gDesc)
This method requests that the application retrieve a grammar
corresponding to the given GrammarIdentifier from its cache.
|
org.apache.xerces.xni.grammars.Grammar[] |
retrieveInitialGrammarSet(java.lang.String grammarType)
retrieve the initial known set of grammars.
|
void |
unlockPool()
unlock the grammar pool
|
public SynchronizedGrammarPool(org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
public org.apache.xerces.xni.grammars.Grammar[] retrieveInitialGrammarSet(java.lang.String grammarType)
org.apache.xerces.xni.grammars.XMLGrammarPoolretrieve 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.
retrieveInitialGrammarSet in interface org.apache.xerces.xni.grammars.XMLGrammarPoolgrammarType - the type of the grammar, from the
org.apache.xerces.xni.grammars.Grammar interface.public org.apache.xerces.xni.grammars.Grammar retrieveGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription gDesc)
org.apache.xerces.xni.grammars.XMLGrammarPoolThis 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.
retrieveGrammar in interface org.apache.xerces.xni.grammars.XMLGrammarPoolgDesc - The description of the Grammar being requested.public void cacheGrammars(java.lang.String grammarType,
org.apache.xerces.xni.grammars.Grammar[] grammars)
org.apache.xerces.xni.grammars.XMLGrammarPoolreturn 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.
cacheGrammars in interface org.apache.xerces.xni.grammars.XMLGrammarPoolgrammarType - the type of the grammars being returned;grammars - an array containing the set of grammars being
returned; order is not significant.public void lockPool()
lockPool in interface org.apache.xerces.xni.grammars.XMLGrammarPoolpublic void clear()
clear in interface org.apache.xerces.xni.grammars.XMLGrammarPoolpublic void unlockPool()
unlockPool in interface org.apache.xerces.xni.grammars.XMLGrammarPoolCopyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.