|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xerces.impl.validation.GrammarPool
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.
Field Summary | |
protected java.util.Hashtable |
fGrammars
Grammars associated with element root name. |
protected java.util.Hashtable |
fGrammarsNS
Grammars associated with namespaces. |
protected Grammar |
fNoNSGrammar
|
Constructor Summary | |
GrammarPool()
Default constructor. |
Method Summary | |
boolean |
containsGrammar(java.lang.String rootElement)
Returns true if the grammar pool contains a grammar associated to the specified root element name. |
boolean |
containsGrammarNS(java.lang.String namespace)
Returns true if the grammar pool contains a grammar associated to the specified target namespace. |
Grammar |
getGrammar(java.lang.String rootElement)
Returns the grammar associated to the specified root element name. |
Grammar |
getGrammarNS(java.lang.String namespace)
Returns the grammar associated to the specified target namespace. |
Grammar[] |
getGrammars()
|
Grammar[] |
getGrammarsNS()
Returns all grammars associated with namespaces. |
void |
putGrammar(java.lang.String rootElement,
Grammar grammar)
Puts the specified grammar into the grammar pool and associate it to a root element name. |
void |
putGrammarNS(java.lang.String namespace,
Grammar grammar)
Puts the specified grammar into the grammar pool and associate it to a target namespace. |
Grammar |
removeGrammar(java.lang.String rootElement)
Removes the grammar associated to the specified root elememt name from the grammar pool and returns the removed grammar. |
Grammar |
removeGrammarNS(java.lang.String namespace)
Removes the grammar associated to the specified namespace from the grammar pool and returns the removed grammar. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.util.Hashtable fGrammars
protected java.util.Hashtable fGrammarsNS
protected Grammar fNoNSGrammar
Constructor Detail |
public GrammarPool()
Method Detail |
public void putGrammar(java.lang.String rootElement, Grammar grammar)
rootElement
- Root element name.grammar
- The grammar.public void putGrammarNS(java.lang.String namespace, Grammar grammar)
namespace
- The grammar namespace.grammar
- The grammar.public Grammar getGrammar(java.lang.String rootElement)
rootElement
- Root element name.public Grammar getGrammarNS(java.lang.String namespace)
namespace
- Target namespace.public Grammar removeGrammar(java.lang.String rootElement)
rootElement
- Root element name.public Grammar removeGrammarNS(java.lang.String namespace)
namespace
- Target namespace.public boolean containsGrammar(java.lang.String rootElement)
rootElement
- Root element name.public boolean containsGrammarNS(java.lang.String namespace)
namespace
- Target namespace.public Grammar[] getGrammars()
public Grammar[] getGrammarsNS()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |