public interface GraphManager
FramedGraph
class
that provides unified CRUD semantics for low-level
graph operations.Modifier and Type | Method and Description |
---|---|
com.tinkerpop.blueprints.Vertex |
createVertex(String id,
EntityClass type,
Map<String,?> data)
Create a vertex with the given id, type, and data.
|
void |
deleteVertex(String id)
Delete a vertex with the given ID.
|
void |
deleteVertex(com.tinkerpop.blueprints.Vertex vertex)
Delete the given vertex.
|
boolean |
exists(String id)
Check if a node with the given ID exists or not.
|
<T> com.tinkerpop.blueprints.CloseableIterable<T> |
getEntities(EntityClass type,
Class<T> cls)
Get an Iterable of vertices of the given type, frames with the given
interface class.
|
<T> com.tinkerpop.blueprints.CloseableIterable<T> |
getEntities(String key,
Object value,
EntityClass type,
Class<T> cls)
Get a CloseableIterable of entities with the given type, and the given
key/value property.
|
<T> T |
getEntity(String id,
Class<T> cls)
Get a node with the given ID, and frame it with the given interface
class.
|
<T> T |
getEntity(String id,
EntityClass type,
Class<T> cls)
Get a node with the given ID and type, framing it with the given
interface class.
|
EntityClass |
getEntityClass(Entity entity)
Get the type of an arbitrary framed vertex.
|
EntityClass |
getEntityClass(com.tinkerpop.blueprints.Vertex vertex)
Get the type of an arbitrary vertex.
|
com.tinkerpop.frames.FramedGraph<?> |
getGraph()
Get a pointer to the underlying graph.
|
String |
getId(com.tinkerpop.blueprints.Vertex vertex)
Get the id of a given vertex.
|
Map<String,Object> |
getProperties(com.tinkerpop.blueprints.Vertex vertex)
Get a vertex's properties.
|
String |
getType(com.tinkerpop.blueprints.Vertex vertex)
Get the id of a given vertex.
|
com.tinkerpop.blueprints.Vertex |
getVertex(String id)
Get a node with the given ID.
|
com.tinkerpop.blueprints.CloseableIterable<com.tinkerpop.blueprints.Vertex> |
getVertices(EntityClass type)
Get a CloseableIterable of vertices with the given entity class.
|
com.tinkerpop.blueprints.CloseableIterable<com.tinkerpop.blueprints.Vertex> |
getVertices(Iterable<String> ids)
Get a CloseableIterable of vertices with the given ids.
|
com.tinkerpop.blueprints.CloseableIterable<com.tinkerpop.blueprints.Vertex> |
getVertices(String key,
Object value,
EntityClass type)
Get a CloseableIterable of vertices with the given type, and the given
key/value property.
|
void |
initialize() |
void |
renameVertex(com.tinkerpop.blueprints.Vertex vertex,
String oldId,
String newId)
Rename an existing vertex, changing its ID.
|
void |
setProperty(com.tinkerpop.blueprints.Vertex vertex,
String key,
Object value)
Set a property on a vertex.
|
com.tinkerpop.blueprints.Vertex |
updateVertex(String id,
EntityClass type,
Map<String,?> data)
Create a vertex with the given id, type, and data.
|
com.tinkerpop.frames.FramedGraph<?> getGraph()
String getId(com.tinkerpop.blueprints.Vertex vertex)
vertex
- A vertexString getType(com.tinkerpop.blueprints.Vertex vertex)
vertex
- A vertexMap<String,Object> getProperties(com.tinkerpop.blueprints.Vertex vertex)
EntityClass getEntityClass(com.tinkerpop.blueprints.Vertex vertex)
vertex
- A vertexEntityClass getEntityClass(Entity entity)
entity
- A framed vertexboolean exists(String id)
id
- A string idcom.tinkerpop.blueprints.Vertex getVertex(String id) throws ItemNotFound
id
- The vertex's string IDItemNotFound
<T> T getEntity(String id, Class<T> cls) throws ItemNotFound
id
- The vertex's string IDcls
- The desired frame classItemNotFound
<T> T getEntity(String id, EntityClass type, Class<T> cls) throws ItemNotFound
id
- The vertex's string IDtype
- The entity typecls
- The desired frame classItemNotFound
com.tinkerpop.blueprints.CloseableIterable<com.tinkerpop.blueprints.Vertex> getVertices(EntityClass type)
type
- The entity typecom.tinkerpop.blueprints.CloseableIterable<com.tinkerpop.blueprints.Vertex> getVertices(Iterable<String> ids)
ids
- An iterable of String IDscom.tinkerpop.blueprints.CloseableIterable<com.tinkerpop.blueprints.Vertex> getVertices(String key, Object value, EntityClass type)
key
- the property keyvalue
- property valuetype
- the entity type<T> com.tinkerpop.blueprints.CloseableIterable<T> getEntities(EntityClass type, Class<T> cls)
type
- The entity type<T> com.tinkerpop.blueprints.CloseableIterable<T> getEntities(String key, Object value, EntityClass type, Class<T> cls)
key
- the property keyvalue
- property valuetype
- the entity typecom.tinkerpop.blueprints.Vertex createVertex(String id, EntityClass type, Map<String,?> data) throws IntegrityError
id
- The vertex's string IDtype
- The entity typedata
- The data mapIntegrityError
- if an item with the given id already existscom.tinkerpop.blueprints.Vertex updateVertex(String id, EntityClass type, Map<String,?> data) throws ItemNotFound
id
- The vertex's string IDtype
- The entity typedata
- The data mapItemNotFound
void setProperty(com.tinkerpop.blueprints.Vertex vertex, String key, Object value)
vertex
- The vertexkey
- The property keyvalue
- The property valuevoid renameVertex(com.tinkerpop.blueprints.Vertex vertex, String oldId, String newId)
vertex
- the vertexoldId
- the old IDnewId
- the new IDvoid deleteVertex(String id) throws ItemNotFound
id
- The vertex's string IDItemNotFound
void deleteVertex(com.tinkerpop.blueprints.Vertex vertex)
vertex
- The vertex to deletevoid initialize()
Copyright © 2018 The European Holocaust Research Infrastructure (EHRI). All rights reserved.