org.basex.query.xpath.locpath
Class Step

java.lang.Object
  extended by org.basex.query.ExprInfo
      extended by org.basex.query.xpath.locpath.Step
Direct Known Subclasses:
StepAnc, StepAncOrSelf, StepAttr, StepDesc, StepDescOrSelf, StepFoll, StepFollSibl, StepParent, StepPrec, StepPrecSibl, StepSelf

public abstract class Step
extends ExprInfo

Single Location Step.

Author:
Workgroup DBIS, University of Konstanz 2005-08, ISC License, Tim Petrowsky, Christian Gruen

Field Summary
 Axis axis
          Axis.
 Preds preds
          Predicate array.
 Test test
          Node test.
 
Constructor Summary
Step()
           
 
Method Summary
 java.lang.String color()
          Returns a string description of the expression.
 void plan(Serializer ser)
          Recursively sends the abstract syntax of this expression to the specified serializer.
 boolean sameAs(Step step)
          Checks location steps for equality.
 boolean simple(Axis ax)
          Checks if this is a simple axis (node test, no predicates).
 int simpleName(Axis ax, boolean name)
          Checks if this is a simple name axis (no predicates).
 java.lang.String toString()
           
 
Methods inherited from class org.basex.query.ExprInfo
info, name
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

axis

public Axis axis
Axis.


test

public Test test
Node test.


preds

public Preds preds
Predicate array.

Constructor Detail

Step

public Step()
Method Detail

simple

public final boolean simple(Axis ax)
Checks if this is a simple axis (node test, no predicates).

Parameters:
ax - axis to be checked
Returns:
result of check

simpleName

public final int simpleName(Axis ax,
                            boolean name)
Checks if this is a simple name axis (no predicates).

Parameters:
ax - axis to be checked
name - name reference needed
Returns:
name id or Integer.MIN_VALUE if test was negative

sameAs

public final boolean sameAs(Step step)
Checks location steps for equality.

Parameters:
step - location step
Returns:
false if no Position predicate

toString

public final java.lang.String toString()
Specified by:
toString in class ExprInfo

plan

public final void plan(Serializer ser)
                throws java.io.IOException
Description copied from class: ExprInfo
Recursively sends the abstract syntax of this expression to the specified serializer.

Specified by:
plan in class ExprInfo
Parameters:
ser - serializer
Throws:
java.io.IOException - exception

color

public final java.lang.String color()
Description copied from class: ExprInfo
Returns a string description of the expression. Contrary to the ExprInfo.toString() method, the current expressions aren't included in the output.

Overrides:
color in class ExprInfo
Returns:
result of check