|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectKeyManager
LazyKeyManager
public class LazyKeyManager
LazyKeyManager wraps a Saxon KeyManager, but stores keys on disk instead of keeping them in RAM. If the same index is accessed later, it need not be recomputed.
Field Summary | |
---|---|
private int |
nKeysStored
Count of keys actually stored on disk |
Fields inherited from class KeyManager |
---|
keyList |
Constructor Summary | |
---|---|
LazyKeyManager(Configuration config,
KeyManager prevMgr)
Construct and initialize the manager, grabbing existing key definitions from the previous key manager. |
Method Summary | |
---|---|
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. |
Methods inherited from class KeyManager |
---|
addKeyDefinition, explainKeys, getKeyDefinitions, selectByKey |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int nKeysStored
Constructor Detail |
---|
public LazyKeyManager(Configuration config, KeyManager prevMgr)
Method Detail |
---|
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 context
XPathException
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |