public class VertexElement extends AbstractElement<org.apache.tinkerpop.gremlin.structure.Vertex,Schema.VertexProperty>
Represent a Vertex in a GraknTx
Wraps a tinkerpop Vertex constraining it to the Grakn Object Model.
This is used to wrap common functionality between exposed Concept and unexposed
internal vertices.
| Constructor and Description |
|---|
VertexElement(EmbeddedGraknTx graknTx,
org.apache.tinkerpop.gremlin.structure.Vertex element) |
| Modifier and Type | Method and Description |
|---|---|
EdgeElement |
addEdge(VertexElement to,
Schema.EdgeLabel type) |
void |
deleteEdge(org.apache.tinkerpop.gremlin.structure.Direction direction,
Schema.EdgeLabel label,
VertexElement... targets)
Deletes all the edges of a specific
Schema.EdgeLabel to or from a specific set of targets. |
java.util.stream.Stream<EdgeElement> |
getEdgesOfType(org.apache.tinkerpop.gremlin.structure.Direction direction,
Schema.EdgeLabel label) |
EdgeElement |
putEdge(VertexElement to,
Schema.EdgeLabel type) |
String |
toString() |
delete, element, equals, hashCode, id, isDeleted, label, property, property, propertyBoolean, propertyImmutable, propertyImmutable, propertyUnique, txpublic VertexElement(EmbeddedGraknTx graknTx, org.apache.tinkerpop.gremlin.structure.Vertex element)
public java.util.stream.Stream<EdgeElement> getEdgesOfType(org.apache.tinkerpop.gremlin.structure.Direction direction, Schema.EdgeLabel label)
direction - The direction of the edges to retrievelabel - The type of the edges to retrievepublic EdgeElement addEdge(VertexElement to, Schema.EdgeLabel type)
to - the target VertexElementtype - the type of the edge to createpublic EdgeElement putEdge(VertexElement to, Schema.EdgeLabel type)
to - the target VertexElementtype - the type of the edge to createpublic void deleteEdge(org.apache.tinkerpop.gremlin.structure.Direction direction,
Schema.EdgeLabel label,
VertexElement... targets)
Schema.EdgeLabel to or from a specific set of targets.
If no targets are provided then all the edges of the specified type are deleteddirection - The direction of the edges to deletelabel - The edge label to deletetargets - An optional set of targets to delete edges fromCopyright © 2018 Grakn Labs Ltd. All rights reserved.