Class DetachedEdge
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.structure.util.detached.DetachedElement<Edge>
-
- org.apache.tinkerpop.gremlin.structure.util.detached.DetachedEdge
-
- All Implemented Interfaces:
Serializable
,Edge
,Element
,Attachable<Edge>
public class DetachedEdge extends DetachedElement<Edge> implements Edge
Represents anEdge
that is disconnected from aGraph
. "Disconnection" can mean detachment from aGraph
in the sense that theEdge
was constructed from aGraph
instance and this reference was removed or it can mean that theDetachedEdge
could have been constructed independently of aGraph
instance in the first place. ADetachedEdge
only has reference to the properties and in/out vertices that are associated with it at the time of detachment (or construction) and is not traversable or mutable. Note that the references to the in/out vertices areDetachedVertex
instances that only have reference to theElement.id()
andElement.label()
.- Author:
- Stephen Mallette (http://stephen.genoprime.com), Marko A. Rodriguez (http://markorodriguez.com)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DetachedEdge.Builder
-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.util.Attachable
Attachable.Exceptions, Attachable.Method
-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.Edge
Edge.Exceptions
-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.Element
Element.Exceptions
-
-
Field Summary
-
Fields inherited from class org.apache.tinkerpop.gremlin.structure.util.detached.DetachedElement
id, label, properties
-
Fields inherited from interface org.apache.tinkerpop.gremlin.structure.util.Attachable
logger
-
Fields inherited from interface org.apache.tinkerpop.gremlin.structure.Edge
DEFAULT_LABEL
-
-
Constructor Summary
Constructors Modifier Constructor Description DetachedEdge(Object id, String label, List<Property> properties, Object outVId, String outVLabel, Object inVId, String inVLabel)
DetachedEdge(Object id, String label, Map<String,Object> properties, Object outVId, String outVLabel, Object inVId, String inVLabel)
protected
DetachedEdge(Edge edge, boolean withProperties)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DetachedEdge.Builder
build()
Provides a way to construct an immutableDetachedEdge
.Vertex
inVertex()
Get the incoming/head vertex of this edge.Vertex
outVertex()
Get the outgoing/tail vertex of this edge.<V> Iterator<Property<V>>
properties(String... propertyKeys)
Get anIterator
of properties where thepropertyKeys
is meant to be a filter on the available keys.void
remove()
Removes theElement
from the graph.String
toString()
Iterator<Vertex>
vertices(Direction direction)
Retrieve the vertex (or vertices) associated with this edge as defined by the direction.-
Methods inherited from class org.apache.tinkerpop.gremlin.structure.util.detached.DetachedElement
equals, get, graph, hashCode, id, label, property, property
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.tinkerpop.gremlin.structure.util.Attachable
attach
-
Methods inherited from interface org.apache.tinkerpop.gremlin.structure.Edge
bothVertices
-
-
-
-
Method Detail
-
inVertex
public Vertex inVertex()
Description copied from interface:Edge
Get the incoming/head vertex of this edge.
-
outVertex
public Vertex outVertex()
Description copied from interface:Edge
Get the outgoing/tail vertex of this edge.
-
vertices
public Iterator<Vertex> vertices(Direction direction)
Description copied from interface:Edge
Retrieve the vertex (or vertices) associated with this edge as defined by the direction. If the direction isDirection.BOTH
then the iterator order is:Direction.OUT
thenDirection.IN
.
-
remove
public void remove()
Description copied from interface:Element
Removes theElement
from the graph.
-
properties
public <V> Iterator<Property<V>> properties(String... propertyKeys)
Description copied from interface:Element
Get anIterator
of properties where thepropertyKeys
is meant to be a filter on the available keys. If no keys are provide then return all the properties.- Specified by:
properties
in interfaceEdge
- Specified by:
properties
in interfaceElement
- Overrides:
properties
in classDetachedElement<Edge>
-
build
public static DetachedEdge.Builder build()
Provides a way to construct an immutableDetachedEdge
.
-
-