Package com.orchestranetworks.schema
Class Step
java.lang.Object
com.orchestranetworks.schema.Step
A path is a sequence of steps.
A step instance is immutable.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionabstract String
format()
Returns the string representation of this step.abstract int
getIndex()
ReturnsStep
index.abstract boolean
Returnstrue
if thisStep
identifies a node child by its position.final boolean
Returnstrue
if this instance is either self or parent step ('.' or '..').final boolean
Returnstrue
if this instance is the parent step ('..').final boolean
Returnstrue
if this instance is the self step (.
).static Step
Returns the step corresponding to theString
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.
-
Method Details
-
parse
Returns the step corresponding to theString
specified.- Throws:
IllegalArgumentException
- If step syntax is not correct.- See Also:
-
format
Returns the string representation of this step.- See Also:
-
isIndexed
public abstract boolean isIndexed()Returnstrue
if thisStep
identifies a node child by its position. The first position is 0 (in XPath, the first position is 1). For example, in the pathpara/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()ReturnsStep
index.Index starts at 0.
- Throws:
IllegalStateException
- IfStep
is not indexed.- See Also:
-
toStepWithoutIndex
- Throws:
IllegalStateException
- IfStep
is not indexed.- See Also:
-
toAbsolutePath
Returns the absolute path whose unique step is this instance. -
toSelfPath
Returns the relative path whose first step is '.' (self step) and the second step is this instance. -
toParentPath
Returns the relative path whose first step is '..' (parent step) and the second step is this instance. -
isRelative
public final boolean isRelative()Returnstrue
if this instance is either self or parent step ('.' or '..'). -
isRelativeSelf
public final boolean isRelativeSelf()Returnstrue
if this instance is the self step (.
).- See Also:
-
isRelativeParent
public final boolean isRelativeParent()Returnstrue
if this instance is the parent step ('..').- See Also:
-