public abstract class AbstractVertex extends AbstractElement implements InternalVertex
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractVertex(StandardTitanTx tx,
long id) |
| Modifier and Type | Method and Description |
|---|---|
TitanEdge |
addEdge(EdgeLabel label,
TitanVertex vertex)
Creates a new edge incident on this vertex.
|
TitanEdge |
addEdge(String label,
TitanVertex vertex)
Creates a new edge incident on this vertex.
|
com.tinkerpop.blueprints.Edge |
addEdge(String label,
com.tinkerpop.blueprints.Vertex vertex) |
TitanProperty |
addProperty(PropertyKey key,
Object attribute)
Creates a new property for this vertex and given key with the specified value.
|
TitanProperty |
addProperty(String key,
Object attribute)
Creates a new property for this vertex and given key with the specified value.
|
long |
getCompareId()
Long identifier used to compare elements.
|
long |
getEdgeCount()
Returns the number of edges incident on this vertex.
|
Iterable<TitanEdge> |
getEdges()
Returns an iterable over all edges incident on this vertex.
|
Iterable<com.tinkerpop.blueprints.Edge> |
getEdges(com.tinkerpop.blueprints.Direction dir,
String... labels)
Returns an iterable over all edges of the specified edge label in the given direction incident on this vertex.
|
Object |
getId()
Returns a unique identifier for this entity.
|
String |
getLabel()
Returns the name of the vertex label for this vertex.
|
Iterable<TitanProperty> |
getProperties()
Returns an iterable over all properties incident on this vertex.
|
Iterable<TitanProperty> |
getProperties(PropertyKey key)
Returns an iterable over all properties of the specified property key incident on this vertex.
|
Iterable<TitanProperty> |
getProperties(String key)
Returns an iterable over all properties of the specified property key incident on this vertex.
|
<O> O |
getProperty(PropertyKey key)
Retrieves the value associated with the given key on this vertex and casts it to the specified type.
|
<O> O |
getProperty(String key)
Retrieves the value associated with the given key on this vertex and casts it to the specified type.
|
long |
getPropertyCount()
Returns the number of properties incident on this vertex.
|
Set<String> |
getPropertyKeys() |
Iterable<TitanRelation> |
getRelations()
Returns an iterable over all relations incident on this vertex.
|
Iterable<TitanEdge> |
getTitanEdges(com.tinkerpop.blueprints.Direction dir,
EdgeLabel... labels)
Returns an iterable over all edges of the specified edge label in the given direction incident on this vertex.
|
VertexLabel |
getVertexLabel()
Returns the vertex label of this vertex.
|
protected com.tinkerpop.blueprints.Vertex |
getVertexLabelInternal() |
Iterable<com.tinkerpop.blueprints.Vertex> |
getVertices(com.tinkerpop.blueprints.Direction direction,
String... labels) |
boolean |
isConnected()
Checks whether this vertex has at least one incident edge.
|
boolean |
isModified()
Checks whether this entity has been loaded into the current transaction and modified.
|
InternalVertex |
it()
Returns this element in the context of the current transaction.
|
VertexCentricQueryBuilder |
query()
Starts a new
TitanVertexQuery for this vertex. |
void |
remove()
Deletes this entity and any incident edges or properties from the graph.
|
<O> O |
removeProperty(RelationType key)
Removes the value associated with the given key for this vertex (if exists).
|
<O> O |
removeProperty(String key)
Removes the value associated with the given key for this vertex (if exists).
|
void |
setProperty(PropertyKey key,
Object value)
Sets the value for the given key on this element.
|
void |
setProperty(String key,
Object value)
Sets the value for the given key on this element.
|
String |
toString() |
StandardTitanTx |
tx()
Returns the transaction to which the element is currently bound or should be refreshed into
|
clone, compareTo, equals, getID, hashCode, hasId, isHidden, isImplicitId, isLoaded, isNew, isRemoved, isTemporaryId, setIDfinalize, getClass, notify, notifyAll, wait, wait, waitaddRelation, getAddedRelations, hasAddedRelations, hasLoadedRelations, hasRemovedRelations, loadRelations, removeRelationgetLifeCycle, isHidden, setIDgetID, hasId, isLoaded, isNew, isRemovedcompareToprotected AbstractVertex(StandardTitanTx tx, long id)
public final InternalVertex it()
InternalElementit in interface InternalElementit in interface InternalVertexpublic final StandardTitanTx tx()
InternalElementtx in interface InternalElementpublic long getCompareId()
AbstractElementAbstractElement.getID()
but some instances of elements may be considered the same even if their ids differ. In that case,
this method should be overwritten to return an id that can be used for comparison.getCompareId in class AbstractElementpublic Object getId()
TitanElementgetId in interface TitanElementgetId in interface com.tinkerpop.blueprints.ElementTitanElement.hasId()public boolean isModified()
TitanVertexisModified in interface TitanVertexpublic void remove()
TitanElementremove in interface TitanElementremove in interface Removableremove in interface com.tinkerpop.blueprints.Elementpublic String getLabel()
TitanVertexgetLabel in interface TitanVertexprotected com.tinkerpop.blueprints.Vertex getVertexLabelInternal()
public VertexLabel getVertexLabel()
TitanVertexgetVertexLabel in interface TitanVertexpublic VertexCentricQueryBuilder query()
TitanVertexTitanVertexQuery for this vertex.
Initializes and returns a new TitanVertexQuery based on this vertex.query in interface TitanVertexquery in interface InternalVertexquery in interface com.tinkerpop.blueprints.VertexTitanVertexQuerypublic Set<String> getPropertyKeys()
getPropertyKeys in interface com.tinkerpop.blueprints.Elementpublic <O> O getProperty(PropertyKey key)
TitanElementgetProperty in interface TitanElementkey - keypublic <O> O getProperty(String key)
TitanElementgetProperty in interface TitanElementgetProperty in interface com.tinkerpop.blueprints.Elementkey - string identifying a keypublic Iterable<TitanProperty> getProperties()
TitanVertexgetProperties in interface TitanVertexIterable over all properties incident on this vertexpublic Iterable<TitanProperty> getProperties(PropertyKey key)
TitanVertexgetProperties in interface TitanVertexkey - PropertyKey of the returned propertiesIterable over all properties of the specified key incident on this vertexpublic Iterable<TitanProperty> getProperties(String key)
TitanVertexgetProperties in interface TitanVertexkey - key of the returned propertiesIterable over all properties of the specified key incident on this vertexpublic Iterable<TitanEdge> getEdges()
TitanVertexgetEdges in interface TitanVertexIterable over all edges incident on this vertexpublic Iterable<TitanEdge> getTitanEdges(com.tinkerpop.blueprints.Direction dir, EdgeLabel... labels)
TitanVertexgetTitanEdges in interface TitanVertexdir - Direction of the returned edges with respect to this vertexlabels - label of the returned edgesIterable over all edges with the given label and direction incident on this vertexpublic Iterable<com.tinkerpop.blueprints.Edge> getEdges(com.tinkerpop.blueprints.Direction dir, String... labels)
TitanVertexgetEdges in interface TitanVertexgetEdges in interface com.tinkerpop.blueprints.Vertexdir - Direction of the returned edges with respect to this vertexlabels - label of the returned edgesIterable over all edges with the given label and direction incident on this vertexpublic Iterable<TitanRelation> getRelations()
TitanVertexTitanEdge and TitanProperty.getRelations in interface TitanVertexIterable over all properties and edges incident on this vertex.public Iterable<com.tinkerpop.blueprints.Vertex> getVertices(com.tinkerpop.blueprints.Direction direction, String... labels)
getVertices in interface com.tinkerpop.blueprints.Vertexpublic long getPropertyCount()
TitanVertexgetPropertyCount in interface TitanVertexpublic long getEdgeCount()
TitanVertexgetEdgeCount in interface TitanVertexpublic boolean isConnected()
TitanVertexisConnected in interface TitanVertexpublic TitanProperty addProperty(PropertyKey key, Object attribute)
TitanVertexTitanProperty for the given key on this vertex with the specified
object being the value.addProperty in interface TitanVertexkey - key of the property to be createdattribute - value of the property to be createdpublic TitanProperty addProperty(String key, Object attribute)
TitanVertexTitanProperty for the given key on this vertex with the specified
object being the value.
IllegalArgumentException.addProperty in interface TitanVertexkey - key of the property to be createdattribute - value of the property to be createdpublic void setProperty(String key, Object value)
TitanElementCardinality.SINGLE, otherwise this method throws an exception.setProperty in interface TitanElementsetProperty in interface com.tinkerpop.blueprints.Elementkey - the string identifying the keyvalue - the object valuepublic void setProperty(PropertyKey key, Object value)
TitanElementCardinality.SINGLE, otherwise this method throws an exception.setProperty in interface TitanElementkey - the keyvalue - the object valuepublic TitanEdge addEdge(EdgeLabel label, TitanVertex vertex)
TitanVertexTitanEdge of the specified label with this vertex being the outgoing vertex
and the given vertex being the incoming vertex.addEdge in interface TitanVertexlabel - label of the edge to be createdvertex - incoming vertex of the edge to be createdpublic TitanEdge addEdge(String label, TitanVertex vertex)
TitanVertexTitanEdge of the specified label with this vertex being the outgoing vertex
and the given vertex being the incoming vertex.
IllegalArgumentException.addEdge in interface TitanVertexlabel - label of the edge to be createdvertex - incoming vertex of the edge to be createdpublic com.tinkerpop.blueprints.Edge addEdge(String label, com.tinkerpop.blueprints.Vertex vertex)
addEdge in interface com.tinkerpop.blueprints.Vertexpublic <O> O removeProperty(RelationType key)
TitanElementremoveProperty in interface TitanElementkey - the keypublic <O> O removeProperty(String key)
TitanElementremoveProperty in interface TitanElementremoveProperty in interface com.tinkerpop.blueprints.Elementkey - the string identifying the keyTitanElement.removeProperty(RelationType)Copyright © 2012–2014. All rights reserved.