lux.index
Class XPathValueMapper
java.lang.Object
lux.index.XmlPathMapper
lux.index.XPathValueMapper
- All Implemented Interfaces:
- StAXHandler
public class XPathValueMapper
- extends XmlPathMapper
Each path-value is a string of path components, as defined in XmlPathMapper, followed by
a value token. Element and attribute string values are represented by 8-character hashes of their first N characters.
If the value fits in 8 characters, it is padded with nulls (unicode 0). The hash algorithm is analogous to that used by
java.lang.String, but arithmetic is done with shorts rather than ints, and we keep more of them so that
the likelihood of collisions is very small.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HASH_SIZE
public static final int HASH_SIZE
- See Also:
- Constant Field Values
XPathValueMapper
public XPathValueMapper()
getPathValues
public ArrayList<char[]> getPathValues()
reset
public void reset()
- Description copied from interface:
StAXHandler
- reinitialize any internal state and prepare the handler for re-use
- Specified by:
reset in interface StAXHandler- Overrides:
reset in class XmlPathMapper
handleEvent
public void handleEvent(XMLStreamReader reader,
int eventType)
- Description copied from interface:
StAXHandler
- This method receives StAX events. It should never call XMLStreamReader.next()
since if it does, its caller will miss the event.
- Specified by:
handleEvent in interface StAXHandler- Overrides:
handleEvent in class XmlPathMapper
- Parameters:
reader - the reader from which events are being readeventType - the XML stream event type
hashString
public static char[] hashString(char[] value,
char[] buf)
Copyright © 2013. All Rights Reserved.