Package com.arcadedb.graph
Interface Vertex
-
- All Superinterfaces:
Document
,Identifiable
,Record
- All Known Subinterfaces:
VertexInternal
- All Known Implementing Classes:
ImmutableVertex
,MutableVertex
public interface Vertex extends Document
A Vertex represents the main information in a Property Graph. Vertices are connected with edges. Vertices can be Immutable (read-only) and Mutable.- Author:
- Luca Garulli ([email protected])
- See Also:
Edge
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Vertex.DIRECTION
-
Field Summary
Fields Modifier and Type Field Description static byte
RECORD_TYPE
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Vertex
asVertex()
Returns the vertex record.default Vertex
asVertex(boolean loadContent)
Returns the vertex record.long
countEdges(Vertex.DIRECTION direction, String edgeType)
Iterable<Edge>
getEdges()
Iterable<Edge>
getEdges(Vertex.DIRECTION direction, String... edgeTypes)
Iterable<Vertex>
getVertices()
Returns all the connected vertices, both directions, any edge type.Iterable<Vertex>
getVertices(Vertex.DIRECTION direction, String... edgeTypes)
Returns the connected vertices.boolean
isConnectedTo(Identifiable toVertex)
boolean
isConnectedTo(Identifiable toVertex, Vertex.DIRECTION direction)
MutableVertex
modify()
MutableEdge
newEdge(String edgeType, Identifiable toVertex, boolean bidirectional, Object... properties)
ImmutableLightEdge
newLightEdge(String edgeType, Identifiable toVertex, boolean bidirectional)
-
Methods inherited from interface com.arcadedb.database.Document
asDocument, asDocument, detach, get, getBoolean, getByte, getDate, getDecimal, getDouble, getEmbedded, getFloat, getInteger, getLong, getPropertyNames, getShort, getString, getType, getTypeName, has, toJSON, toMap
-
Methods inherited from interface com.arcadedb.database.Identifiable
asEdge, asEdge, getRecord, getRecord
-
Methods inherited from interface com.arcadedb.database.Record
delete, getDatabase, getIdentity, getRecordType, reload
-
-
-
-
Field Detail
-
RECORD_TYPE
static final byte RECORD_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
modify
MutableVertex modify()
-
newEdge
MutableEdge newEdge(String edgeType, Identifiable toVertex, boolean bidirectional, Object... properties)
-
newLightEdge
ImmutableLightEdge newLightEdge(String edgeType, Identifiable toVertex, boolean bidirectional)
-
countEdges
long countEdges(Vertex.DIRECTION direction, String edgeType)
-
getEdges
Iterable<Edge> getEdges(Vertex.DIRECTION direction, String... edgeTypes)
-
getVertices
Iterable<Vertex> getVertices()
Returns all the connected vertices, both directions, any edge type.- Returns:
- An iterator of PIndexCursorEntry entries
-
getVertices
Iterable<Vertex> getVertices(Vertex.DIRECTION direction, String... edgeTypes)
Returns the connected vertices.- Parameters:
direction
- Direction between OUT, IN or BOTH- Returns:
- An iterator of PIndexCursorEntry entries
-
isConnectedTo
boolean isConnectedTo(Identifiable toVertex)
-
isConnectedTo
boolean isConnectedTo(Identifiable toVertex, Vertex.DIRECTION direction)
-
asVertex
default Vertex asVertex()
Description copied from interface:Identifiable
Returns the vertex record. If the record is not a vertex, a UnsupportedOperationException exception is thrown.- Specified by:
asVertex
in interfaceIdentifiable
- Returns:
- the
Vertex
-
asVertex
default Vertex asVertex(boolean loadContent)
Description copied from interface:Identifiable
Returns the vertex record. If the record is not a vertex, a UnsupportedOperationException exception is thrown.- Specified by:
asVertex
in interfaceIdentifiable
- Parameters:
loadContent
- specifies if pre-load the record content- Returns:
- the
Vertex
-
-