public class VerbPathContext
extends java.lang.Object
VerbPath, such as the starting node of a path. It also
provides APIs that traverse a graph of Javabean-like objects. The current
supported traverse is linear and top-down. That is, each VerbPathStep
represents one and only one node in a graph, and VerbPath
can not
back-track.
Each node in the graph that is to be traversed should have getters and setters.
only the attributes that have getters will be retrieved while a path is being
evaluated.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_NAME
Name of this class
|
static java.lang.String |
COPYRIGHT
IBM Copyright
|
Modifier and Type | Method and Description |
---|---|
boolean |
endsWith(VerbPath path,
java.lang.Object lastElement,
java.lang.String attribute)
Checks if a given verb path ends with a given node that has the given
attribute
|
java.lang.Object |
getValue(VerbPath path)
Gets the value based on the given verb path within this context
|
static VerbPathContext |
newContext(java.lang.Object aContextBean)
Instantiates a VerbPathContext instance
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASS_NAME
public static VerbPathContext newContext(java.lang.Object aContextBean)
aContextBean
- the starting point of a verb path. This object should
have getters and setters that are conform to JavaBean standardspublic java.lang.Object getValue(VerbPath path)
path
- the path on which the traversal of graph is performedpublic boolean endsWith(VerbPath path, java.lang.Object lastElement, java.lang.String attribute)
path
- lastElement
- attribute
-