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 anEdgethat is disconnected from aGraph. "Disconnection" can mean detachment from aGraphin the sense that theEdgewas constructed from aGraphinstance and this reference was removed or it can mean that theDetachedEdgecould have been constructed independently of aGraphinstance in the first place. ADetachedEdgeonly 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 areDetachedVertexinstances 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 classDetachedEdge.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)protectedDetachedEdge(Edge edge, boolean withProperties)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DetachedEdge.Builderbuild()Provides a way to construct an immutableDetachedEdge.VertexinVertex()Get the incoming/head vertex of this edge.VertexoutVertex()Get the outgoing/tail vertex of this edge.<V> Iterator<Property<V>>properties(String... propertyKeys)Get anIteratorof properties where thepropertyKeysis meant to be a filter on the available keys.voidremove()Removes theElementfrom the graph.StringtoString()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:EdgeGet the incoming/head vertex of this edge.
-
outVertex
public Vertex outVertex()
Description copied from interface:EdgeGet the outgoing/tail vertex of this edge.
-
vertices
public Iterator<Vertex> vertices(Direction direction)
Description copied from interface:EdgeRetrieve the vertex (or vertices) associated with this edge as defined by the direction. If the direction isDirection.BOTHthen the iterator order is:Direction.OUTthenDirection.IN.
-
remove
public void remove()
Description copied from interface:ElementRemoves theElementfrom the graph.
-
properties
public <V> Iterator<Property<V>> properties(String... propertyKeys)
Description copied from interface:ElementGet anIteratorof properties where thepropertyKeysis meant to be a filter on the available keys. If no keys are provide then return all the properties.- Specified by:
propertiesin interfaceEdge- Specified by:
propertiesin interfaceElement- Overrides:
propertiesin classDetachedElement<Edge>
-
build
public static DetachedEdge.Builder build()
Provides a way to construct an immutableDetachedEdge.
-
-