public interface GraphNode extends Node
Type | Property and Description |
---|---|
Property |
as
Returns this node as a
Property . |
VertexProperty |
asVertex
Returns this node as a
VertexProperty . |
Modifier and Type | Method and Description |
---|---|
Edge |
asEdge()
Returns this node as an
Edge . |
Path |
asPath()
Returns this node as a
Path . |
Property |
asProperty()
Returns this node as a
Property . |
Vertex |
asVertex()
Returns this node as a
Vertex . |
VertexProperty |
asVertexProperty()
Returns this node as a
VertexProperty . |
GraphNode |
get(int index)
Returns the element node at the specified
index of an array node. |
GraphNode |
get(String fieldName)
Returns the value of the specified field of an object node.
|
boolean |
isEdge()
Returns
true if this node is an edge. |
boolean |
isVertex()
Returns
true if this node is a vertex. |
VertexProperty asVertexProperty
VertexProperty
.GraphNode get(String fieldName)
Node
If this node is not an object (or it does not have a value for the specified field name), or
if there is no field with such name, null
is returned.
If the property value has been explicitly set to null
, implementors may return a
special "null node" instead of null
.
GraphNode get(int index)
Node
index
of an array node.
For all other node types, null
is returned.
If index
is out of bounds, (i.e. less than zero or >= size()
, null
is returned; no exception will be thrown.
If the requested element has been explicitly set to null
, implementors may return a
special "null node" instead of null
.
boolean isVertex()
true
if this node is a vertex.
If this node is a vertex, then asVertex()
can be safely called.
true
if this node is a vertex, false
otherwise.boolean isEdge()
true
if this node is an edge.
If this node is an edge, then asEdge()
can be safely called.
true
if this node is an edge, false
otherwise.Vertex asVertex()
Vertex
.Vertex
representation of this node.DriverException
- if this node cannot be converted to a Vertex
.Edge asEdge()
Edge
.Edge
representation of this node.DriverException
- if this node cannot be converted to a Edge
.Path asPath()
Path
.Path
representation of this node.DriverException
- if this node cannot be converted to a Path
.VertexProperty asVertexProperty()
VertexProperty
.Copyright © 2012–2018. All rights reserved.