public interface TitanRelation extends TitanElement
TitanVertex
which means it is an entity in its own right. This means, a TitanRelation
can have properties and unidirectional edges connecting it to other vertices.
TitanProperty
or a TitanEdge
.
A TitanRelation has a type which is either a label or key depending on the implementation.
TitanEdge
,
TitanProperty
Type | Property and Description |
---|---|
boolean |
is
Checks whether this relation is a property.
|
Modifier and Type | Method and Description |
---|---|
com.tinkerpop.blueprints.Direction |
getDirection(TitanVertex vertex)
Returns the direction of this relation from the perspective of the specified vertex.
|
TitanVertex |
getProperty(TitanLabel label)
Returns the vertex associated to this relation by a unidirected edge of the given label or NULL if such does not exist.
|
TitanType |
getType()
Returns the type of this relation.
|
boolean |
isEdge()
Checks whether this relation is an edge.
|
boolean |
isIncidentOn(TitanVertex vertex)
Checks whether this relation is incident on the specified vertex.
|
boolean |
isLoop()
Checks whether this relation is a loop.
|
boolean |
isModifiable()
Checks whether this relation can be modified in the context of this transaction.
|
boolean |
isProperty()
Checks whether this relation is a property.
|
void |
setProperty(TitanLabel label,
TitanVertex vertex)
Establishes a unidirectional edge between this relation and the given vertex for the specified label.
|
getId, getID, getProperty, getProperty, hasId, isLoaded, isNew, isRemoved, remove, removeProperty, removeProperty, setProperty, setProperty
compareTo
TitanProperty
void setProperty(TitanLabel label, TitanVertex vertex)
TitanLabel.isUnidirected()
.label
- vertex
- TitanVertex getProperty(TitanLabel label)
label
- TitanType getType()
TitanLabel
if this relation is an edge or a key (TitanKey
) if this
relation is a property.com.tinkerpop.blueprints.Direction getDirection(TitanVertex vertex)
vertex
- vertex on which the relation is incidentInvalidElementException
- if this relation is not incident on the vertexboolean isIncidentOn(TitanVertex vertex)
vertex
- vertex to check incidence forboolean isModifiable()
boolean isLoop()
boolean isProperty()
TitanProperty
boolean isEdge()
TitanEdge
Copyright © 2012-2013. All Rights Reserved.