public interface JanusGraphRelation extends JanusGraphElement
JanusGraphElement
which means it is an entity in its own right. This means, a JanusGraphRelation
can have properties and unidirectional edges connecting it to other vertices.
JanusGraphVertexProperty
or a JanusGraphEdge
.
A JanusGraphRelation has a type which is either a label or key depending on the implementation.
JanusGraphEdge
,
JanusGraphVertexProperty
Modifier and Type | Method and Description |
---|---|
org.apache.tinkerpop.gremlin.structure.Direction |
direction(org.apache.tinkerpop.gremlin.structure.Vertex vertex)
Returns the direction of this relation from the perspective of the specified vertex.
|
RelationType |
getType()
Returns the type of this relation.
|
boolean |
isEdge()
Checks whether this relation is an edge.
|
boolean |
isIncidentOn(org.apache.tinkerpop.gremlin.structure.Vertex vertex)
Checks whether this relation is incident on the specified vertex.
|
boolean |
isLoop()
Checks whether this relation is a loop.
|
boolean |
isProperty()
Checks whether this relation is a property.
|
<V> V |
value(String key)
Retrieves the value associated with the given key on this vertex and casts it to the specified type.
|
<V> V value(String key)
value
in interface org.apache.tinkerpop.gremlin.structure.Element
key
- string identifying a keyRelationType getType()
The type is either a label (EdgeLabel
if this relation is an edge or a key (PropertyKey
) if this
relation is a property.
org.apache.tinkerpop.gremlin.structure.Direction direction(org.apache.tinkerpop.gremlin.structure.Vertex vertex)
vertex
- vertex on which the relation is incidentInvalidElementException
- if this relation is not incident on the vertexboolean isIncidentOn(org.apache.tinkerpop.gremlin.structure.Vertex vertex)
vertex
- vertex to check incidence forboolean isLoop()
boolean isProperty()
JanusGraphVertexProperty
boolean isEdge()
JanusGraphEdge
Copyright © 2012–2023. All rights reserved.