|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xerces.impl.validation.XMLGrammarPoolImpl
Stores grammars in a pool associated to a specific key. This grammar pool implementation stores two types of grammars: those keyed by the root element name, and those keyed by the grammar's target namespace. This is the default implementation of the GrammarPool interface. As we move forward, this will become more function-rich and robust.
Inner Class Summary | |
protected static class |
XMLGrammarPoolImpl.Entry
This class is a grammar pool entry. |
Field Summary | |
protected XMLGrammarPoolImpl.Entry[] |
fGrammars
Grammars. |
protected static int |
TABLE_SIZE
Default size. |
Constructor Summary | |
XMLGrammarPoolImpl()
Constructs a grammar pool with a default number of buckets. |
|
XMLGrammarPoolImpl(int initialCapacity)
Constructs a grammar pool with a specified number of buckets. |
Method Summary | |
void |
cacheGrammars(java.lang.String grammarType,
org.apache.xerces.xni.grammars.Grammar[] grammars)
|
boolean |
containsGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription desc)
Returns true if the grammar pool contains a grammar associated to the specified grammar description. |
boolean |
equals(org.apache.xerces.xni.grammars.XMLGrammarDescription desc1,
org.apache.xerces.xni.grammars.XMLGrammarDescription desc2)
This method checks whether two grammars are the same. |
org.apache.xerces.xni.grammars.Grammar |
getGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription desc)
Returns the grammar associated to the specified grammar description. |
int |
hashCode(org.apache.xerces.xni.grammars.XMLGrammarDescription desc)
Returns the hash code value for the given grammar description. |
void |
print(org.apache.xerces.xni.grammars.XMLGrammarDescription description)
|
void |
putGrammar(org.apache.xerces.xni.grammars.Grammar grammar)
Puts the specified grammar into the grammar pool and associates it to its root element name or its target namespace. |
org.apache.xerces.xni.grammars.Grammar |
removeGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription desc)
Removes the grammar associated to the specified grammar description from the grammar pool and returns the removed grammar. |
org.apache.xerces.xni.grammars.Grammar |
retrieveGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription desc)
|
org.apache.xerces.xni.grammars.Grammar[] |
retrieveInitialGrammarSet(java.lang.String grammarType)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final int TABLE_SIZE
protected XMLGrammarPoolImpl.Entry[] fGrammars
Constructor Detail |
public XMLGrammarPoolImpl()
public XMLGrammarPoolImpl(int initialCapacity)
Method Detail |
public org.apache.xerces.xni.grammars.Grammar[] retrieveInitialGrammarSet(java.lang.String grammarType)
retrieveInitialGrammarSet
in interface org.apache.xerces.xni.grammars.XMLGrammarPool
public void cacheGrammars(java.lang.String grammarType, org.apache.xerces.xni.grammars.Grammar[] grammars)
cacheGrammars
in interface org.apache.xerces.xni.grammars.XMLGrammarPool
public org.apache.xerces.xni.grammars.Grammar retrieveGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription desc)
retrieveGrammar
in interface org.apache.xerces.xni.grammars.XMLGrammarPool
public void putGrammar(org.apache.xerces.xni.grammars.Grammar grammar)
grammar
- The Grammar.public org.apache.xerces.xni.grammars.Grammar getGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription desc)
desc
- The Grammar Description.public org.apache.xerces.xni.grammars.Grammar removeGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription desc)
desc
- The Grammar Description.public boolean containsGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription desc)
desc
- The Grammar Description.public boolean equals(org.apache.xerces.xni.grammars.XMLGrammarDescription desc1, org.apache.xerces.xni.grammars.XMLGrammarDescription desc2)
gDesc1
- The grammar descriptiongDesc2
- The grammar description of the grammar to be compared topublic int hashCode(org.apache.xerces.xni.grammars.XMLGrammarDescription desc)
desc
- The grammar descriptionpublic void print(org.apache.xerces.xni.grammars.XMLGrammarDescription description)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |