public class EmptyVertex extends Object implements InternalVertex
Constructor and Description |
---|
EmptyVertex() |
Modifier and Type | Method and Description |
---|---|
JanusGraphEdge |
addEdge(String s,
org.apache.tinkerpop.gremlin.structure.Vertex vertex,
Object... keyValues)
Creates a new edge incident on this vertex.
|
boolean |
addRelation(InternalRelation e)
Add a new relation to the vertex
|
Iterator<org.apache.tinkerpop.gremlin.structure.Edge> |
edges(org.apache.tinkerpop.gremlin.structure.Direction direction,
String... edgeLabels) |
Iterable<InternalRelation> |
getAddedRelations(com.google.common.base.Predicate<InternalRelation> query)
Returns an iterable over all newly added relations incident on this vertex that match the given predicate
|
byte |
getLifeCycle() |
boolean |
hasAddedRelations()
Whether this vertex has added relations
|
boolean |
hasId()
Checks whether this entity has a unique identifier.
|
boolean |
hasLoadedRelations(SliceQuery query)
Returns true if the results for the given query have already been loaded for this vertex and are locally cached.
|
boolean |
hasRemovedRelations()
Whether this vertex has removed relations
|
Object |
id()
Returns a unique identifier for this entity.
|
boolean |
isInvisible()
Whether this element is invisible and should only be returned to queries that explicitly ask for invisible elements.
|
boolean |
isLoaded()
Checks whether this entity has been loaded into the current transaction and not yet modified.
|
boolean |
isModified()
Checks whether this entity has been loaded into the current transaction and modified.
|
boolean |
isNew()
Checks whether this entity has been newly created in the current transaction.
|
boolean |
isRemoved()
Checks whether this entity has been deleted into the current transaction.
|
InternalVertex |
it()
Returns this element in the context of the current transaction.
|
String |
label()
Returns the name of the vertex label for this vertex.
|
EntryList |
loadRelations(SliceQuery query,
Retriever<SliceQuery,EntryList> lookup)
Returns all relations that match the given query.
|
<V> Iterator<org.apache.tinkerpop.gremlin.structure.VertexProperty<V>> |
properties(String... propertyKeys) |
<V> JanusGraphVertexProperty<V> |
property(String key,
V value,
Object... keyValues) |
<V> JanusGraphVertexProperty<V> |
property(org.apache.tinkerpop.gremlin.structure.VertexProperty.Cardinality cardinality,
String key,
V value,
Object... keyValues) |
VertexCentricQueryBuilder |
query()
Starts a new
JanusGraphVertexQuery for this vertex. |
void |
remove()
Deletes this entity and any incident edges or properties from the graph.
|
void |
removeRelation(InternalRelation e)
Deleted relation e from the adjacency list of this vertex and updates the state of the vertex to reflect
the modification.
|
void |
setId(Object id) |
StandardJanusGraphTx |
tx()
Returns the transaction to which the element is currently bound or should be refreshed into
|
<O> O |
value(String key) |
<O> O |
valueOrNull(PropertyKey key)
Retrieves the value associated with the given key on this element and casts it to the specified type.
|
VertexLabel |
vertexLabel()
Returns the vertex label of this vertex.
|
Iterator<org.apache.tinkerpop.gremlin.structure.Vertex> |
vertices(org.apache.tinkerpop.gremlin.structure.Direction direction,
String... edgeLabels) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
property
graph
public VertexCentricQueryBuilder query()
JanusGraphVertex
JanusGraphVertexQuery
for this vertex.
Initializes and returns a new JanusGraphVertexQuery
based on this vertex.
query
in interface JanusGraphVertex
query
in interface InternalVertex
JanusGraphVertexQuery
public Iterable<InternalRelation> getAddedRelations(com.google.common.base.Predicate<InternalRelation> query)
InternalVertex
getAddedRelations
in interface InternalVertex
public EntryList loadRelations(SliceQuery query, Retriever<SliceQuery,EntryList> lookup)
InternalVertex
Retriever
to retrieve the edges from backend storage.loadRelations
in interface InternalVertex
public boolean hasLoadedRelations(SliceQuery query)
InternalVertex
hasLoadedRelations
in interface InternalVertex
public boolean hasRemovedRelations()
InternalVertex
hasRemovedRelations
in interface InternalVertex
public boolean hasAddedRelations()
InternalVertex
hasAddedRelations
in interface InternalVertex
public String label()
JanusGraphVertex
label
in interface org.apache.tinkerpop.gremlin.structure.Element
label
in interface JanusGraphVertex
public VertexLabel vertexLabel()
JanusGraphVertex
vertexLabel
in interface JanusGraphVertex
public <O> O valueOrNull(PropertyKey key)
JanusGraphElement
valueOrNull
in interface JanusGraphElement
key
- keypublic <O> O value(String key)
value
in interface org.apache.tinkerpop.gremlin.structure.Element
public <V> JanusGraphVertexProperty<V> property(String key, V value, Object... keyValues)
property
in interface org.apache.tinkerpop.gremlin.structure.Vertex
property
in interface JanusGraphVertex
public <V> JanusGraphVertexProperty<V> property(org.apache.tinkerpop.gremlin.structure.VertexProperty.Cardinality cardinality, String key, V value, Object... keyValues)
property
in interface org.apache.tinkerpop.gremlin.structure.Vertex
property
in interface JanusGraphVertex
public Iterator<org.apache.tinkerpop.gremlin.structure.Edge> edges(org.apache.tinkerpop.gremlin.structure.Direction direction, String... edgeLabels)
edges
in interface org.apache.tinkerpop.gremlin.structure.Vertex
public Iterator<org.apache.tinkerpop.gremlin.structure.Vertex> vertices(org.apache.tinkerpop.gremlin.structure.Direction direction, String... edgeLabels)
vertices
in interface org.apache.tinkerpop.gremlin.structure.Vertex
public boolean addRelation(InternalRelation e)
InternalVertex
addRelation
in interface InternalVertex
public void removeRelation(InternalRelation e)
InternalVertex
removeRelation
in interface InternalVertex
e
- JanusGraphRelation to be removedpublic JanusGraphEdge addEdge(String s, org.apache.tinkerpop.gremlin.structure.Vertex vertex, Object... keyValues)
JanusGraphVertex
Creates and returns a new JanusGraphEdge
of the specified label with this vertex being the outgoing vertex
and the given vertex being the incoming vertex.
Automatically creates the edge label if it does not exist and automatic creation of types is enabled. Otherwise,
this method with throw an IllegalArgumentException
.
addEdge
in interface org.apache.tinkerpop.gremlin.structure.Vertex
addEdge
in interface JanusGraphVertex
s
- label of the edge to be createdvertex
- incoming vertex of the edge to be createdpublic Object id()
JanusGraphElement
The unique identifier may only be set when the transaction in which entity is created commits. Some entities are never assigned a unique identifier if they depend on a parent entity.
JanusGraph allocates blocks of identifiers and automatically assigns identifiers to elements
automatically be default. This behavior can be partially overridden by setting
GraphDatabaseConfiguration.ALLOW_SETTING_VERTEX_ID
id
in interface org.apache.tinkerpop.gremlin.structure.Element
id
in interface Idfiable
id
in interface JanusGraphElement
JanusGraphElement.hasId()
public boolean hasId()
JanusGraphElement
Note that some entities may never be assigned an identifier and others will only be assigned an identifier at the end of a transaction.
hasId
in interface JanusGraphElement
public void remove()
JanusGraphElement
remove
in interface org.apache.tinkerpop.gremlin.structure.Element
remove
in interface JanusGraphElement
remove
in interface Removable
public <V> Iterator<org.apache.tinkerpop.gremlin.structure.VertexProperty<V>> properties(String... propertyKeys)
properties
in interface org.apache.tinkerpop.gremlin.structure.Element
properties
in interface org.apache.tinkerpop.gremlin.structure.Vertex
public void setId(Object id)
setId
in interface InternalElement
public byte getLifeCycle()
getLifeCycle
in interface InternalElement
ElementLifeCycle
public boolean isInvisible()
InternalElement
isInvisible
in interface InternalElement
public boolean isRemoved()
JanusGraphElement
isRemoved
in interface JanusGraphElement
public boolean isLoaded()
JanusGraphElement
isLoaded
in interface JanusGraphElement
public boolean isModified()
JanusGraphVertex
isModified
in interface JanusGraphVertex
public boolean isNew()
JanusGraphElement
isNew
in interface JanusGraphElement
public InternalVertex it()
InternalElement
it
in interface InternalElement
it
in interface InternalVertex
public StandardJanusGraphTx tx()
InternalElement
tx
in interface InternalElement
Copyright © 2012–2024. All rights reserved.