public class KeyIndex extends Object
Constructor and Description |
---|
KeyIndex(boolean isRangeKey) |
Modifier and Type | Method and Description |
---|---|
void |
buildIndex(KeyDefinitionSet keySet,
TreeInfo doc,
XPathContext context)
Build the index for a particular document for a named key
|
List<NodeInfo> |
get(AtomicValue soughtValue)
Get the nodes with a given key value
|
List<NodeInfo> |
getComposite(SequenceIterator soughtValue)
Get the nodes with a given composite key value
|
Map<AtomicMatchKey,List<NodeInfo>> |
getUnderlyingMap()
Get the underlying map
|
boolean |
isEmpty()
Ask whether the index is empty
|
void |
reindexUntypedValues(BuiltInAtomicType type)
Re-index untyped atomic values after conversion to a specific type.
|
public Map<AtomicMatchKey,List<NodeInfo>> getUnderlyingMap()
public void buildIndex(KeyDefinitionSet keySet, TreeInfo doc, XPathContext context) throws XPathException
keySet
- The set of key definitions with this namedoc
- The source document in questioncontext
- The dynamic contextXPathException
- if a dynamic error is encounteredpublic void reindexUntypedValues(BuiltInAtomicType type) throws XPathException
type
- the type to which untyped atomic values should be convertedXPathException
- if conversion of any untyped atomic value to the requested key type failspublic boolean isEmpty()
public List<NodeInfo> get(AtomicValue soughtValue) throws XPathException
soughtValue
- The required key valueXPathException
- if a dynamic error is encounteredpublic List<NodeInfo> getComposite(SequenceIterator soughtValue) throws XPathException
soughtValue
- The required composite key valueXPathException
- if a dynamic error is encounteredCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.