Save This Page
Home » Xerces-J-src.2.9.1 » org.apache.xerces » util » [javadoc | source]
org.apache.xerces.util
public class: XMLGrammarPoolImpl [javadoc | source]
java.lang.Object
   org.apache.xerces.util.XMLGrammarPoolImpl

All Implemented Interfaces:
    XMLGrammarPool

Direct Known Subclasses:
    XSGrammarMerger, ShadowedGrammarPool, XMLGrammarPoolImplExtension, XSGrammarPool

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.
Nested Class Summary:
protected static final class  XMLGrammarPoolImpl.Entry  This class is a grammar pool entry. Each entry acts as a node in a linked list. 
Field Summary
protected static final  int TABLE_SIZE    Default size. 
protected  XMLGrammarPoolImpl.Entry[] fGrammars    Grammars. 
protected  boolean fPoolIsLocked     
protected  int fGrammarCount     
Constructor:
 public XMLGrammarPoolImpl() 
 public XMLGrammarPoolImpl(int initialCapacity) 
Method from org.apache.xerces.util.XMLGrammarPoolImpl Summary:
cacheGrammars,   clear,   containsGrammar,   equals,   getGrammar,   hashCode,   lockPool,   putGrammar,   removeGrammar,   retrieveGrammar,   retrieveInitialGrammarSet,   unlockPool
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.xerces.util.XMLGrammarPoolImpl Detail:
 public  void cacheGrammars(String grammarType,
    Grammar[] grammars) 
 public  void clear() 
 public boolean containsGrammar(XMLGrammarDescription desc) 
    Returns true if the grammar pool contains a grammar associated to the specified grammar description. Currently, the root element name is used as the key for DTD grammars and the target namespace is used as the key for Schema grammars.
 public boolean equals(XMLGrammarDescription desc1,
    XMLGrammarDescription desc2) 
    This method checks whether two grammars are the same. Currently, we compare the root element names for DTD grammars and the target namespaces for Schema grammars. The application can override this behaviour and add its own logic.
 public Grammar getGrammar(XMLGrammarDescription desc) 
    Returns the grammar associated to the specified grammar description. Currently, the root element name is used as the key for DTD grammars and the target namespace is used as the key for Schema grammars.
 public int hashCode(XMLGrammarDescription desc) 
    Returns the hash code value for the given grammar description.
 public  void lockPool() 
 public  void putGrammar(Grammar grammar) 
    Puts the specified grammar into the grammar pool and associates it to its root element name or its target namespace.
 public Grammar removeGrammar(XMLGrammarDescription desc) 
    Removes the grammar associated to the specified grammar description from the grammar pool and returns the removed grammar. Currently, the root element name is used as the key for DTD grammars and the target namespace is used as the key for Schema grammars.
 public Grammar retrieveGrammar(XMLGrammarDescription desc) 
 public Grammar[] retrieveInitialGrammarSet(String grammarType) 
 public  void unlockPool()