Class Step

java.lang.Object
com.orchestranetworks.schema.Step

public abstract class Step extends Object
A path is a sequence of steps.

A step instance is immutable.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract String
    Returns the string representation of this step.
    abstract int
    Returns Step index.
    abstract boolean
    Returns true if this Step identifies a node child by its position.
    final boolean
    Returns true if this instance is either self or parent step ('.' or '..').
    final boolean
    Returns true if this instance is the parent step ('..').
    final boolean
    Returns true if this instance is the self step (.).
    static Step
    parse(String aString)
    Returns the step corresponding to the String specified.
    Returns the absolute path whose unique step is this instance.
    Returns the relative path whose first step is '..' (parent step) and the second step is this instance.
    Returns the relative path whose first step is '.' (self step) and the second step is this instance.
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • parse

      public static Step parse(String aString) throws IllegalArgumentException
      Returns the step corresponding to the String specified.
      Throws:
      IllegalArgumentException - If step syntax is not correct.
      See Also:
    • format

      public abstract String format()
      Returns the string representation of this step.
      See Also:
    • isIndexed

      public abstract boolean isIndexed()
      Returns true if this Step identifies a node child by its position. The first position is 0 (in XPath, the first position is 1). For example, in the path para/item[0]/label, item[0] is an indexed step identifying position 0.

      Regarding JavaBeans, an instance of this class corresponds to an indexed property.

      See Also:
    • getIndex

      public abstract int getIndex()
      Returns Step index.

      Index starts at 0.

      Throws:
      IllegalStateException - If Step is not indexed.
      See Also:
    • toStepWithoutIndex

      public Step toStepWithoutIndex()
      Throws:
      IllegalStateException - If Step is not indexed.
      See Also:
    • toAbsolutePath

      public Path toAbsolutePath()
      Returns the absolute path whose unique step is this instance.
    • toSelfPath

      public Path toSelfPath()
      Returns the relative path whose first step is '.' (self step) and the second step is this instance.
    • toParentPath

      public Path toParentPath()
      Returns the relative path whose first step is '..' (parent step) and the second step is this instance.
    • isRelative

      public final boolean isRelative()
      Returns true if this instance is either self or parent step ('.' or '..').
    • isRelativeSelf

      public final boolean isRelativeSelf()
      Returns true if this instance is the self step (.).
      See Also:
    • isRelativeParent

      public final boolean isRelativeParent()
      Returns true if this instance is the parent step ('..').
      See Also: