java.lang.Object | |
↳ | org.apache.xerces.util.XMLGrammarPoolImpl |
Known Direct Subclasses |
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 Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
XMLGrammarPoolImpl.Entry | This class is a grammar pool entry. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | TABLE_SIZE | Default size. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
fGrammarCount | |||||||||||
fGrammars | Grammars. | ||||||||||
fPoolIsLocked |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a grammar pool with a default number of buckets.
| |||||||||||
Constructs a grammar pool with a specified number of buckets.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
return the final set of grammars that the validator ended up with. | |||||||||||
Removes all grammars from the pool.
| |||||||||||
Returns true if the grammar pool contains a grammar associated
to the specified grammar description.
| |||||||||||
This method checks whether two grammars are the same.
| |||||||||||
Returns the grammar associated to the specified grammar description.
| |||||||||||
Returns the hash code value for the given grammar description.
| |||||||||||
Causes the XMLGrammarPool not to store any grammars when
the cacheGrammars(String, Grammar[[]) method is called.
| |||||||||||
Puts the specified grammar into the grammar pool and associates it to
its root element name or its target namespace.
| |||||||||||
Removes the grammar associated to the specified grammar description from the
grammar pool and returns the removed grammar.
| |||||||||||
This method requests that the application retrieve a grammar corresponding to the given GrammarIdentifier from its cache. | |||||||||||
retrieve the initial known set of grammars. | |||||||||||
Allows the XMLGrammarPool to store grammars when its cacheGrammars(String, Grammar[])
method is called.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.apache.xerces.xni.grammars.XMLGrammarPool
|
Default size.
Constructs a grammar pool with a default number of buckets.
Constructs a grammar pool with a specified number of buckets.
return 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.
grammarType | the type of the grammars being returned; |
---|---|
grammars | an array containing the set of grammars being returned; order is not significant. |
Removes all grammars from the pool.
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.
desc | The Grammar Description. |
---|
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.
desc1 | The grammar description |
---|---|
desc2 | The grammar description of the grammar to be compared to |
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.
desc | The Grammar Description. |
---|
Returns the hash code value for the given grammar description.
desc | The grammar description |
---|
Causes the XMLGrammarPool not to store any grammars when the cacheGrammars(String, Grammar[[]) method is called.
Puts the specified grammar into the grammar pool and associates it to its root element name or its target namespace.
grammar | The Grammar. |
---|
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.
desc | The Grammar Description. |
---|
This 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.
desc | The description of the Grammar being requested. |
---|
retrieve 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.
grammarType | the type of the grammar, from the
org.apache.xerces.xni.grammars.Grammar interface. |
---|
Allows the XMLGrammarPool to store grammars when its cacheGrammars(String, Grammar[]) method is called. This is the default state of the object.