com.novell.xml.xpath
Class AxisNameToken

java.lang.Object
  extended bycom.novell.xml.xpath.Token
      extended bycom.novell.xml.xpath.AxisNameToken

public class AxisNameToken
extends Token

Class to represent XPath LocationPath axis name tokens. e.g., ancestors-or-self, etc.


Field Summary
static int ANCESTOR
          Represents "ancestor" axis
static int ANCESTOR_OR_SELF
          Represents "ancestor-or-self" axis
static String ANCESTOR_OR_SELF_STRING
           
static String ANCESTOR_STRING
           
static int ATTRIBUTE
          Represents "attribute" axis
static String ATTRIBUTE_STRING
           
static int CHILD
          Represents "child" axis
static String CHILD_STRING
           
static int DESCENDANT
          Represents "descendant" axis
static int DESCENDANT_OR_SELF
          Represents "descendant-or-self" axis
static String DESCENDANT_OR_SELF_STRING
           
static String DESCENDANT_STRING
           
static int FOLLOWING
          Represents "following" axis
static int FOLLOWING_SIBLING
          Represents "following-sibling" axis
static String FOLLOWING_SIBLING_STRING
           
static String FOLLOWING_STRING
           
static int NAMESPACE
          Represents "namespace" axis
static String NAMESPACE_STRING
           
static int NOT_AXIS
          Special value, represents "not an axis name"
static int PARENT
          Represents "parent" axis
static String PARENT_STRING
           
static int PRECEDING
          Represents "preceding" axis
static int PRECEDING_SIBLING
          Represents "preceding-sibling" axis
static String PRECEDING_SIBLING_STRING
           
static String PRECEDING_STRING
           
static int SELF
          Represents "self" axis
static String SELF_STRING
           
 
Fields inherited from class com.novell.xml.xpath.Token
AT, AXIS_NAME, COLON_COLON, COMMA, DOT, DOT_DOT, FUNCTION_NAME, LEFT_BRACKET, LEFT_PAREN, LITERAL, MAX_TYPE, NODE_TYPE, NOT_A_TOKEN, NUMBER, OPERATOR, RIGHT_BRACKET, RIGHT_PAREN, VARIABLE_REF, WILDCARD_NAME
 
Constructor Summary
AxisNameToken(int axisId)
          Construct an AxisNameToken representing specified axis
AxisNameToken(String axisName)
          Construct an AxisNameToken representing specified axis
 
Method Summary
 boolean equals(Token rhs)
          Compare this Token to another
static int getAxisIdentifier(String candidate)
          Return numeric representation of axis based on axis name
static String getAxisName(int id)
          Return axis name based on numeric id
 int getId()
          Return numeric id of this AxisNameToken
 String toString()
          Return a text representation of this token
 
Methods inherited from class com.novell.xml.xpath.Token
dump, getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NOT_AXIS

public static final int NOT_AXIS
Special value, represents "not an axis name"

See Also:
Constant Field Values

ANCESTOR

public static final int ANCESTOR
Represents "ancestor" axis

See Also:
Constant Field Values

ANCESTOR_OR_SELF

public static final int ANCESTOR_OR_SELF
Represents "ancestor-or-self" axis

See Also:
Constant Field Values

ATTRIBUTE

public static final int ATTRIBUTE
Represents "attribute" axis

See Also:
Constant Field Values

CHILD

public static final int CHILD
Represents "child" axis

See Also:
Constant Field Values

DESCENDANT

public static final int DESCENDANT
Represents "descendant" axis

See Also:
Constant Field Values

DESCENDANT_OR_SELF

public static final int DESCENDANT_OR_SELF
Represents "descendant-or-self" axis

See Also:
Constant Field Values

FOLLOWING

public static final int FOLLOWING
Represents "following" axis

See Also:
Constant Field Values

FOLLOWING_SIBLING

public static final int FOLLOWING_SIBLING
Represents "following-sibling" axis

See Also:
Constant Field Values

NAMESPACE

public static final int NAMESPACE
Represents "namespace" axis

See Also:
Constant Field Values

PARENT

public static final int PARENT
Represents "parent" axis

See Also:
Constant Field Values

PRECEDING

public static final int PRECEDING
Represents "preceding" axis

See Also:
Constant Field Values

PRECEDING_SIBLING

public static final int PRECEDING_SIBLING
Represents "preceding-sibling" axis

See Also:
Constant Field Values

SELF

public static final int SELF
Represents "self" axis

See Also:
Constant Field Values

ANCESTOR_STRING

public static final String ANCESTOR_STRING
See Also:
Constant Field Values

ANCESTOR_OR_SELF_STRING

public static final String ANCESTOR_OR_SELF_STRING
See Also:
Constant Field Values

ATTRIBUTE_STRING

public static final String ATTRIBUTE_STRING
See Also:
Constant Field Values

CHILD_STRING

public static final String CHILD_STRING
See Also:
Constant Field Values

DESCENDANT_STRING

public static final String DESCENDANT_STRING
See Also:
Constant Field Values

DESCENDANT_OR_SELF_STRING

public static final String DESCENDANT_OR_SELF_STRING
See Also:
Constant Field Values

FOLLOWING_STRING

public static final String FOLLOWING_STRING
See Also:
Constant Field Values

FOLLOWING_SIBLING_STRING

public static final String FOLLOWING_SIBLING_STRING
See Also:
Constant Field Values

NAMESPACE_STRING

public static final String NAMESPACE_STRING
See Also:
Constant Field Values

PARENT_STRING

public static final String PARENT_STRING
See Also:
Constant Field Values

PRECEDING_STRING

public static final String PRECEDING_STRING
See Also:
Constant Field Values

PRECEDING_SIBLING_STRING

public static final String PRECEDING_SIBLING_STRING
See Also:
Constant Field Values

SELF_STRING

public static final String SELF_STRING
See Also:
Constant Field Values
Constructor Detail

AxisNameToken

public AxisNameToken(int axisId)
Construct an AxisNameToken representing specified axis

Parameters:
axisId - numeric representation of axis

AxisNameToken

public AxisNameToken(String axisName)
Construct an AxisNameToken representing specified axis

Parameters:
axisName - textual representation of axis
Method Detail

equals

public boolean equals(Token rhs)
Compare this Token to another

Overrides:
equals in class Token
Parameters:
rhs - Token to compare to
Returns:
true if this Token matches rhs Token

getAxisIdentifier

public static int getAxisIdentifier(String candidate)
Return numeric representation of axis based on axis name

Parameters:
candidate - axis name
Returns:
integer value representing axis if passed name is valid, NOT_AXIS otherwise

getAxisName

public static String getAxisName(int id)
Return axis name based on numeric id

Parameters:
id - id value (AxisNameToken.ANCESTOR, AxisNameToken.SELF, etc.)
Returns:
text of axis name if passed id is valid, "" otherwise.

getId

public int getId()
Return numeric id of this AxisNameToken

Returns:
id value

toString

public String toString()
Return a text representation of this token

Overrides:
toString in class Token
Returns:
String representing this AxisNameToken