public class LazyKeyManager extends KeyManager
Modifier and Type | Field and Description |
---|---|
private int |
nKeysStored
Count of keys actually stored on disk
|
keyList
Constructor and Description |
---|
LazyKeyManager(Configuration config,
KeyManager prevMgr)
Construct and initialize the manager, grabbing existing key definitions
from the previous key manager.
|
Modifier and Type | Method and Description |
---|---|
Map |
buildIndex(int keyNameFingerprint,
BuiltInAtomicType itemType,
Set foundItemTypes,
DocumentInfo doc,
XPathContext context)
Build the index for a particular document for a named key
|
private String |
calcIndexName(NamePool pool,
String fingerName,
List definitions,
Configuration config)
Calculates a string name for a given set of xsl:key definitions.
|
protected void |
constructIndex(DocumentInfo doc,
Map index,
KeyDefinition keydef,
BuiltInAtomicType soughtItemType,
Set foundItemTypes,
XPathContext context,
boolean isFirst)
Optimized to use node test directly when possible, for speed.
|
int |
createAllKeys(LazyDocument doc,
XPathContext context)
Called after creation of a lazy tree during the index process.
|
static LazyDocument |
getDocumentImpl(DocumentInfo doc)
Retrieve the lazy document for the given doc, if possible.
|
boolean |
isEmpty()
Tells whether any keys have been registered.
|
addKeyDefinition, explainKeys, getKeyDefinitions, selectByKey
public LazyKeyManager(Configuration config, KeyManager prevMgr)
public Map buildIndex(int keyNameFingerprint, BuiltInAtomicType itemType, Set foundItemTypes, DocumentInfo doc, XPathContext context) throws XPathException
KeyManager
buildIndex
in class KeyManager
keyNameFingerprint
- The fingerprint of the name of the required keyitemType
- the type of the values to be indexed.doc
- The source document in questioncontext
- The dynamic contextXPathException
protected void constructIndex(DocumentInfo doc, Map index, KeyDefinition keydef, BuiltInAtomicType soughtItemType, Set foundItemTypes, XPathContext context, boolean isFirst) throws XPathException
constructIndex
in class KeyManager
XPathException
public boolean isEmpty()
public int createAllKeys(LazyDocument doc, XPathContext context) throws XPathException
doc
- The LazyTree to work on.context
- Context used for name pool, etc.XPathException
public static LazyDocument getDocumentImpl(DocumentInfo doc)
private String calcIndexName(NamePool pool, String fingerName, List definitions, Configuration config)
pool
- Name pool used to look up namesfingerName
- Fingerprint of the keydefinitions
- List of key definitionsconfig
- Associated Saxon configuration