Package org.jaxen.saxpath
Class Axis
- java.lang.Object
-
- org.jaxen.saxpath.Axis
-
public class Axis extends java.lang.Object
Internal SAXPath class that contains constants representing XPath operators to avoid a lot of string comparisons.
-
-
Field Summary
Fields Modifier and Type Field Description static int
ANCESTOR
Theancestor
axisstatic int
ANCESTOR_OR_SELF
Theancestor-or-self
axisstatic int
ATTRIBUTE
Theattribute
axisstatic int
CHILD
Thechild
axisstatic int
DESCENDANT
Thedescendant
axisstatic int
DESCENDANT_OR_SELF
Thedescendant-or-self
axisstatic int
FOLLOWING
Thefollowing
axisstatic int
FOLLOWING_SIBLING
Thefollowing-sibling
axisstatic int
INVALID_AXIS
Marker for an invalid axisstatic int
NAMESPACE
Thenamespace
axisstatic int
PARENT
Theparent
axisstatic int
PRECEDING
Thepreceding
axisstatic int
PRECEDING_SIBLING
Thepreceding-sibling
axisstatic int
SELF
Theself
axis
-
Constructor Summary
Constructors Modifier Constructor Description private
Axis()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
lookup(int axisNum)
Returns the name of the axis.static int
lookup(java.lang.String axisName)
Returns the code for an axis given its name.
-
-
-
Field Detail
-
INVALID_AXIS
public static final int INVALID_AXIS
Marker for an invalid axis- See Also:
- Constant Field Values
-
CHILD
public static final int CHILD
Thechild
axis- See Also:
- Constant Field Values
-
DESCENDANT
public static final int DESCENDANT
Thedescendant
axis- See Also:
- Constant Field Values
-
PARENT
public static final int PARENT
Theparent
axis- See Also:
- Constant Field Values
-
ANCESTOR
public static final int ANCESTOR
Theancestor
axis- See Also:
- Constant Field Values
-
FOLLOWING_SIBLING
public static final int FOLLOWING_SIBLING
Thefollowing-sibling
axis- See Also:
- Constant Field Values
-
PRECEDING_SIBLING
public static final int PRECEDING_SIBLING
Thepreceding-sibling
axis- See Also:
- Constant Field Values
-
FOLLOWING
public static final int FOLLOWING
Thefollowing
axis- See Also:
- Constant Field Values
-
PRECEDING
public static final int PRECEDING
Thepreceding
axis- See Also:
- Constant Field Values
-
ATTRIBUTE
public static final int ATTRIBUTE
Theattribute
axis- See Also:
- Constant Field Values
-
NAMESPACE
public static final int NAMESPACE
Thenamespace
axis- See Also:
- Constant Field Values
-
SELF
public static final int SELF
Theself
axis- See Also:
- Constant Field Values
-
DESCENDANT_OR_SELF
public static final int DESCENDANT_OR_SELF
Thedescendant-or-self
axis- See Also:
- Constant Field Values
-
ANCESTOR_OR_SELF
public static final int ANCESTOR_OR_SELF
Theancestor-or-self
axis- See Also:
- Constant Field Values
-
-
Method Detail
-
lookup
public static java.lang.String lookup(int axisNum)
Returns the name of the axis.
- Parameters:
axisNum
- the axis code- Returns:
- the name of the axis such as might be used in an XPath expression
- Throws:
JaxenRuntimeException
- if the number does not represent one of the 13 XPath axes
-
lookup
public static int lookup(java.lang.String axisName)
Returns the code for an axis given its name.
- Parameters:
axisName
- the name of the axis: child, parent, descendant, descendant-or-self, etc.- Returns:
- the axis code
-
-