de.pannenleiter.db.expr
Class Axis
java.lang.Object
|
+--de.pannenleiter.db.expr.Axis
- public class Axis
- extends java.lang.Object
An axis, that is a direction of navigation in the document structure.
|
Method Summary |
int |
getNodeType()
|
int |
getPrincipalNodeType()
Get the principal node type for the axis. |
static int |
lookup(java.lang.String name)
resolve an axis name into a symbolic constant representing the axis |
static Axis |
make(int axisNumber,
int nodeType,
NameTest nameTest)
Factory method to make an axis of the specified type. |
static Axis |
makeAxis(int axisNumber)
|
void |
setNameTest(NameTest test)
Set the name test required by the axis. |
void |
setNodeType(int type)
Set the node type required by the axis. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
ANCESTOR
public static final int ANCESTOR
ANCESTOR_OR_SELF
public static final int ANCESTOR_OR_SELF
ATTRIBUTE
public static final int ATTRIBUTE
CHILD
public static final int CHILD
DESCENDANT
public static final int DESCENDANT
DESCENDANT_OR_SELF
public static final int DESCENDANT_OR_SELF
FOLLOWING
public static final int FOLLOWING
FOLLOWING_SIBLING
public static final int FOLLOWING_SIBLING
NAMESPACE
public static final int NAMESPACE
PARENT
public static final int PARENT
PRECEDING
public static final int PRECEDING
PRECEDING_SIBLING
public static final int PRECEDING_SIBLING
SELF
public static final int SELF
nodeType
protected int nodeType
nodeName
protected NameTest nodeName
axisNumber
protected int axisNumber
names
public static java.lang.String[] names
lookup
public static int lookup(java.lang.String name)
throws java.lang.Exception
- resolve an axis name into a symbolic constant representing the axis
make
public static Axis make(int axisNumber,
int nodeType,
NameTest nameTest)
throws java.lang.Exception
- Factory method to make an axis of the specified type. The use of axisNumber is historic,
it would be better for the caller to say directly which Axis subclass it wants to create.
makeAxis
public static Axis makeAxis(int axisNumber)
throws java.lang.Exception
setNodeType
public void setNodeType(int type)
- Set the node type required by the axis.
- Parameters:
nodeType - e.g. NodeInfo.ELEMENT for an element, NodeInfo.NODE for any node type
getPrincipalNodeType
public int getPrincipalNodeType()
- Get the principal node type for the axis. This is the default node type, and is
Node.ELEMENT for all axes except the Attribute and Namespace axes
getNodeType
public int getNodeType()
setNameTest
public void setNameTest(NameTest test)
- Set the name test required by the axis.
- Parameters:
nodeType - e.g. NodeInfo.ELEMENT for an element, NodeInfo.NODE for any node type
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object