Package org.javarosa.xpath.expr
Class XPathStep
java.lang.Object
org.javarosa.xpath.expr.XPathStep
- All Implemented Interfaces:
Externalizable
public class XPathStep extends Object implements Externalizable
-
Field Summary
Fields Modifier and Type Field Description intaxisstatic intAXIS_ANCESTORstatic intAXIS_ANCESTOR_OR_SELFstatic intAXIS_ATTRIBUTEstatic intAXIS_CHILDstatic intAXIS_DESCENDANTstatic intAXIS_DESCENDANT_OR_SELFstatic intAXIS_FOLLOWINGstatic intAXIS_FOLLOWING_SIBLINGstatic intAXIS_NAMESPACEstatic intAXIS_PARENTstatic intAXIS_PRECEDINGstatic intAXIS_PRECEDING_SIBLINGstatic intAXIS_SELFStringliteralXPathQNamenameStringnamespaceXPathExpression[]predicatesintteststatic intTEST_NAMEstatic intTEST_NAME_WILDCARDstatic intTEST_NAMESPACE_WILDCARDstatic intTEST_TYPE_COMMENTstatic intTEST_TYPE_NODEstatic intTEST_TYPE_PROCESSING_INSTRUCTIONstatic intTEST_TYPE_TEXTstatic booleanXPathStepInterningEnabled -
Constructor Summary
-
Method Summary
Modifier and Type Method Description static XPathStepABBR_DESCENDANTS()static XPathStepABBR_PARENT()static XPathStepABBR_SELF()static voidattachCacheTable(CacheTable<XPathStep> refs)static StringaxisStr(int axis)booleanequals(Object o)inthashCode()XPathStepintern()protected booleanmatches(XPathStep o)"matches" follows roughly the same process as equals(), in that it for a step it will check whether two steps share the same properties (multiplicity, test, axis, etc).voidreadExternal(DataInputStream in, PrototypeFactory pf)StringtestStr()StringtoString()voidwriteExternal(DataOutputStream out)
-
Field Details
-
AXIS_CHILD
public static final int AXIS_CHILD- See Also:
- Constant Field Values
-
AXIS_DESCENDANT
public static final int AXIS_DESCENDANT- See Also:
- Constant Field Values
-
AXIS_PARENT
public static final int AXIS_PARENT- See Also:
- Constant Field Values
-
AXIS_ANCESTOR
public static final int AXIS_ANCESTOR- See Also:
- Constant Field Values
-
AXIS_FOLLOWING_SIBLING
public static final int AXIS_FOLLOWING_SIBLING- See Also:
- Constant Field Values
-
AXIS_PRECEDING_SIBLING
public static final int AXIS_PRECEDING_SIBLING- See Also:
- Constant Field Values
-
AXIS_FOLLOWING
public static final int AXIS_FOLLOWING- See Also:
- Constant Field Values
-
AXIS_PRECEDING
public static final int AXIS_PRECEDING- See Also:
- Constant Field Values
-
AXIS_ATTRIBUTE
public static final int AXIS_ATTRIBUTE- See Also:
- Constant Field Values
-
AXIS_NAMESPACE
public static final int AXIS_NAMESPACE- See Also:
- Constant Field Values
-
AXIS_SELF
public static final int AXIS_SELF- See Also:
- Constant Field Values
-
AXIS_DESCENDANT_OR_SELF
public static final int AXIS_DESCENDANT_OR_SELF- See Also:
- Constant Field Values
-
AXIS_ANCESTOR_OR_SELF
public static final int AXIS_ANCESTOR_OR_SELF- See Also:
- Constant Field Values
-
TEST_NAME
public static final int TEST_NAME- See Also:
- Constant Field Values
-
TEST_NAME_WILDCARD
public static final int TEST_NAME_WILDCARD- See Also:
- Constant Field Values
-
TEST_NAMESPACE_WILDCARD
public static final int TEST_NAMESPACE_WILDCARD- See Also:
- Constant Field Values
-
TEST_TYPE_NODE
public static final int TEST_TYPE_NODE- See Also:
- Constant Field Values
-
TEST_TYPE_TEXT
public static final int TEST_TYPE_TEXT- See Also:
- Constant Field Values
-
TEST_TYPE_COMMENT
public static final int TEST_TYPE_COMMENT- See Also:
- Constant Field Values
-
TEST_TYPE_PROCESSING_INSTRUCTION
public static final int TEST_TYPE_PROCESSING_INSTRUCTION- See Also:
- Constant Field Values
-
axis
public int axis -
test
public int test -
predicates
-
name
-
namespace
-
literal
-
XPathStepInterningEnabled
public static boolean XPathStepInterningEnabled
-
-
Constructor Details
-
Method Details
-
attachCacheTable
-
ABBR_SELF
-
ABBR_PARENT
-
ABBR_DESCENDANTS
-
toString
-
axisStr
-
testStr
-
equals
-
matches
"matches" follows roughly the same process as equals(), in that it for a step it will check whether two steps share the same properties (multiplicity, test, axis, etc). The only difference is that match() will allow for a named step to match a step who's name is a wildcard. So \/path\/ will "match" \/*\/ even though they are not equal. Matching is reflexive, consistent, and symmetric, but _not_ transitive.- Parameters:
xPathStep-- Returns:
-
hashCode
public int hashCode() -
readExternal
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionDeserializationException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
intern
-