public class LSPXMLGrammarPool extends Object implements org.apache.xerces.xni.grammars.XMLGrammarPool
This class is a copy/paste of
org.apache.xerces.util.XMLGrammarPoolImpl.XMLGrammarPoolImpl
from
Xerces adapated to use .lemminx cache.
Modifier and Type | Class and Description |
---|---|
protected static class |
LSPXMLGrammarPool.Entry
This class is a grammar pool entry.
|
Constructor and Description |
---|
LSPXMLGrammarPool() |
LSPXMLGrammarPool(int initialCapacity) |
Modifier and Type | Method and Description |
---|---|
void |
cacheGrammars(String grammarType,
org.apache.xerces.xni.grammars.Grammar[] grammars) |
void |
clear() |
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.
|
int |
hashCode(org.apache.xerces.xni.grammars.XMLGrammarDescription desc)
Returns the hash code value for the given grammar description.
|
void |
lockPool() |
void |
removeGrammar(String grammarURI) |
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(String grammarType) |
boolean |
setInternalSubset(org.apache.xerces.impl.dtd.XMLDTDDescription desc,
String internalSubset)
Update the DTD internal subset entry for the given XML DTD description and
return true if the cached DTD grammar internal subset is equal to the given
internal subset and false otherwise.
|
void |
unlockPool() |
public LSPXMLGrammarPool()
public LSPXMLGrammarPool(int initialCapacity)
public org.apache.xerces.xni.grammars.Grammar[] retrieveInitialGrammarSet(String grammarType)
retrieveInitialGrammarSet
in interface org.apache.xerces.xni.grammars.XMLGrammarPool
public void cacheGrammars(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 org.apache.xerces.xni.grammars.Grammar removeGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription desc)
desc
- The Grammar Description.public void removeGrammar(String grammarURI)
public void lockPool()
lockPool
in interface org.apache.xerces.xni.grammars.XMLGrammarPool
public void unlockPool()
unlockPool
in interface org.apache.xerces.xni.grammars.XMLGrammarPool
public void clear()
clear
in interface org.apache.xerces.xni.grammars.XMLGrammarPool
public boolean equals(org.apache.xerces.xni.grammars.XMLGrammarDescription desc1, org.apache.xerces.xni.grammars.XMLGrammarDescription desc2)
desc1
- The grammar descriptiondesc2
- The grammar description of the grammar to be compared topublic int hashCode(org.apache.xerces.xni.grammars.XMLGrammarDescription desc)
desc
- The grammar descriptionpublic boolean setInternalSubset(org.apache.xerces.impl.dtd.XMLDTDDescription desc, String internalSubset)
desc
- the XML DTD description.internalSubset
- the internal subset.Copyright © 2022. All rights reserved.