public final class Neo4jGraphManager<T extends Neo4j2Graph> extends BlueprintsGraphManager<T>
Modifier and Type | Field and Description |
---|---|
static String |
BASE_LABEL |
graph, METADATA_PREFIX
Constructor and Description |
---|
Neo4jGraphManager(com.tinkerpop.frames.FramedGraph<T> graph) |
Modifier and Type | Method and Description |
---|---|
static void |
createIndicesAndConstraints(org.neo4j.graphdb.GraphDatabaseService graph)
Create
|
com.tinkerpop.blueprints.Vertex |
createVertex(String id,
EntityClass type,
Map<String,?> data)
Create a vertex with the given id, type, and data.
|
boolean |
exists(String id)
Check if a node with the given ID exists or not.
|
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(String key,
Object value,
EntityClass type)
Get a CloseableIterable of vertices with the given type, and the given
key/value property.
|
void |
initialize() |
com.tinkerpop.blueprints.Vertex |
setLabels(com.tinkerpop.blueprints.Vertex vertex)
Set labels on a Neo4j-based vertex.
|
com.tinkerpop.blueprints.Vertex |
updateVertex(String id,
EntityClass type,
Map<String,?> data)
Create a vertex with the given id, type, and data.
|
deleteVertex, deleteVertex, getEntities, getEntities, getEntity, getEntity, getEntityClass, getEntityClass, getGraph, getId, getProperties, getType, getVertices, renameVertex, setProperty
public static final String BASE_LABEL
public Neo4jGraphManager(com.tinkerpop.frames.FramedGraph<T> graph)
public boolean exists(String id)
GraphManager
exists
in interface GraphManager
exists
in class BlueprintsGraphManager<T extends Neo4j2Graph>
id
- A string idpublic com.tinkerpop.blueprints.Vertex getVertex(String id) throws ItemNotFound
GraphManager
getVertex
in interface GraphManager
getVertex
in class BlueprintsGraphManager<T extends Neo4j2Graph>
id
- The vertex's string IDItemNotFound
public com.tinkerpop.blueprints.CloseableIterable<com.tinkerpop.blueprints.Vertex> getVertices(String key, Object value, EntityClass type)
GraphManager
getVertices
in interface GraphManager
getVertices
in class BlueprintsGraphManager<T extends Neo4j2Graph>
key
- the property keyvalue
- property valuetype
- the entity typepublic com.tinkerpop.blueprints.Vertex createVertex(String id, EntityClass type, Map<String,?> data) throws IntegrityError
GraphManager
createVertex
in interface GraphManager
createVertex
in class BlueprintsGraphManager<T extends Neo4j2Graph>
id
- The vertex's string IDtype
- The entity typedata
- The data mapIntegrityError
- if an item with the given id already existspublic com.tinkerpop.blueprints.Vertex updateVertex(String id, EntityClass type, Map<String,?> data) throws ItemNotFound
GraphManager
updateVertex
in interface GraphManager
updateVertex
in class BlueprintsGraphManager<T extends Neo4j2Graph>
id
- The vertex's string IDtype
- The entity typedata
- The data mapItemNotFound
public void initialize()
initialize
in interface GraphManager
initialize
in class BlueprintsGraphManager<T extends Neo4j2Graph>
public com.tinkerpop.blueprints.CloseableIterable<com.tinkerpop.blueprints.Vertex> getVertices(EntityClass type)
GraphManager
getVertices
in interface GraphManager
getVertices
in class BlueprintsGraphManager<T extends Neo4j2Graph>
type
- The entity typepublic com.tinkerpop.blueprints.Vertex setLabels(com.tinkerpop.blueprints.Vertex vertex)
vertex
- the vertexpublic static void createIndicesAndConstraints(org.neo4j.graphdb.GraphDatabaseService graph)
Copyright © 2018 The European Holocaust Research Infrastructure (EHRI). All rights reserved.