public final class Neo4jEdge extends Neo4jElement implements Edge, WrappedEdge<Neo4jRelationship>
Edge.Exceptions
baseElement, graph
DEFAULT_LABEL
Constructor and Description |
---|
Neo4jEdge(Neo4jRelationship relationship,
Neo4jGraph graph) |
Modifier and Type | Method and Description |
---|---|
Neo4jRelationship |
getBaseEdge() |
Vertex |
inVertex()
Get the incoming/head vertex of this edge.
|
String |
label()
Gets the label for the graph
Element which helps categorize it. |
Vertex |
outVertex()
Get the outgoing/tail vertex of this edge.
|
<V> Iterator<Property<V>> |
properties(String... propertyKeys)
Get an
Iterator of properties where the propertyKeys is meant to be a filter on the available
keys. |
<V> Property<V> |
property(String key)
Get a
Property for the Element given its key. |
<V> Property<V> |
property(String key,
V value)
Add or set a property value for the
Element given its key. |
void |
remove()
Removes the
Element from the graph. |
String |
toString() |
Iterator<Vertex> |
vertices(Direction direction)
Retrieve the vertex (or vertices) associated with this edge as defined by the direction.
|
equals, getBaseElement, graph, hashCode, id, keys
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
bothVertices
public Neo4jEdge(Neo4jRelationship relationship, Neo4jGraph graph)
public Vertex outVertex()
Edge
public Vertex inVertex()
Edge
public Iterator<Vertex> vertices(Direction direction)
Edge
Direction.BOTH
then the iterator order is: Direction.OUT
then Direction.IN
.public void remove()
Element
Element
from the graph.public String label()
Element
Element
which helps categorize it.public Neo4jRelationship getBaseEdge()
getBaseEdge
in interface WrappedEdge<Neo4jRelationship>
public <V> Iterator<Property<V>> properties(String... propertyKeys)
Edge
Iterator
of properties where the propertyKeys
is meant to be a filter on the available
keys. If no keys are provide then return all the properties.properties
in interface Edge
properties
in interface Element
public <V> Property<V> property(String key)
Element
Property
for the Element
given its key.
The default implementation calls the raw Element.properties(java.lang.String...)
.Copyright © 2013–2020 Apache Software Foundation. All rights reserved.