public interface Graph
| Modifier and Type | Method and Description |
|---|---|
Edge |
addEdge(String edgeId,
String outVertexId,
String inVertexId,
String label,
Visibility visibility,
Authorizations authorizations)
Adds an edge between two vertices.
|
Edge |
addEdge(String outVertexId,
String inVertexId,
String label,
Visibility visibility,
Authorizations authorizations)
Adds an edge between two vertices.
|
Edge |
addEdge(String edgeId,
Vertex outVertex,
Vertex inVertex,
String label,
Visibility visibility,
Authorizations authorizations)
Adds an edge between two vertices.
|
Edge |
addEdge(Vertex outVertex,
Vertex inVertex,
String label,
Visibility visibility,
Authorizations authorizations)
Adds an edge between two vertices.
|
void |
addGraphEventListener(GraphEventListener graphEventListener)
Adds a graph event listener that will be called when graph events occur.
|
Vertex |
addVertex(String vertexId,
Visibility visibility,
Authorizations authorizations)
Adds a vertex to the graph.
|
Vertex |
addVertex(Visibility visibility,
Authorizations authorizations)
Adds a vertex to the graph.
|
Iterable<Vertex> |
addVertices(Iterable<ElementBuilder<Vertex>> vertices,
Authorizations authorizations)
Adds the vertices to the graph.
|
void |
clearData()
Clears all data from the graph.
|
Authorizations |
createAuthorizations(String... auths)
Creates an authorizations object.
|
DefinePropertyBuilder |
defineProperty(String propertyName)
Creates a defines property builder.
|
Map<String,Boolean> |
doEdgesExist(List<String> ids,
Authorizations authorizations)
Tests the existence of edges with the given authorizations.
|
boolean |
doesEdgeExist(String edgeId,
Authorizations authorizations)
Tests the existence of a edge with the given authorizations.
|
boolean |
doesVertexExist(String vertexId,
Authorizations authorizations)
Tests the existence of a vertex with the given authorizations.
|
Map<String,Boolean> |
doVerticesExist(List<String> ids,
Authorizations authorizations)
Tests the existence of vertices with the given authorizations.
|
Iterable<Path> |
findPaths(String sourceVertexId,
String destVertexId,
int maxHops,
Authorizations authorizations)
Finds all paths between two vertices.
|
Iterable<Path> |
findPaths(String sourceVertexId,
String destVertexId,
int maxHops,
ProgressCallback progressCallback,
Authorizations authorizations)
Finds all paths between two vertices.
|
Iterable<Path> |
findPaths(Vertex sourceVertex,
Vertex destVertex,
int maxHops,
Authorizations authorizations)
Finds all paths between two vertices.
|
Iterable<Path> |
findPaths(Vertex sourceVertex,
Vertex destVertex,
int maxHops,
ProgressCallback progressCallback,
Authorizations authorizations)
Finds all paths between two vertices.
|
Iterable<String> |
findRelatedEdges(Iterable<String> vertexIds,
Authorizations authorizations)
Given a list of vertex ids, find all the edge ids that connect them.
|
void |
flush()
Flushes any pending mutations to the graph.
|
Edge |
getEdge(String edgeId,
Authorizations authorizations)
Get an edge from the graph.
|
Edge |
getEdge(String edgeId,
EnumSet<FetchHint> fetchHints,
Authorizations authorizations)
Get an edge from the graph.
|
Iterable<Edge> |
getEdges(Authorizations authorizations)
Gets all edges on the graph.
|
Iterable<Edge> |
getEdges(EnumSet<FetchHint> fetchHints,
Authorizations authorizations)
Gets all edges on the graph.
|
Iterable<Edge> |
getEdges(Iterable<String> ids,
Authorizations authorizations)
Gets all edges on the graph matching the given ids.
|
Iterable<Edge> |
getEdges(Iterable<String> ids,
EnumSet<FetchHint> fetchHints,
Authorizations authorizations)
Gets all edges on the graph matching the given ids.
|
IdGenerator |
getIdGenerator()
Gets the id generator used by this graph to create ids.
|
Iterable<GraphMetadataEntry> |
getMetadata()
Gets all metadata.
|
Object |
getMetadata(String key)
Gets metadata from the graph.
|
SearchIndexSecurityGranularity |
getSearchIndexSecurityGranularity()
Gets the granularity of the search index
SearchIndexSecurityGranularity |
Vertex |
getVertex(String vertexId,
Authorizations authorizations)
Get a vertex from the graph.
|
Vertex |
getVertex(String vertexId,
EnumSet<FetchHint> fetchHints,
Authorizations authorizations)
Get a vertex from the graph.
|
Iterable<Vertex> |
getVertices(Authorizations authorizations)
Gets all vertices on the graph.
|
Iterable<Vertex> |
getVertices(EnumSet<FetchHint> fetchHints,
Authorizations authorizations)
Gets all vertices on the graph.
|
Iterable<Vertex> |
getVertices(Iterable<String> ids,
Authorizations authorizations)
Gets all vertices matching the given ids on the graph.
|
Iterable<Vertex> |
getVertices(Iterable<String> ids,
EnumSet<FetchHint> fetchHints,
Authorizations authorizations)
Gets all vertices matching the given ids on the graph.
|
List<Vertex> |
getVerticesInOrder(Iterable<String> ids,
Authorizations authorizations)
Gets all vertices matching the given ids on the graph.
|
List<Vertex> |
getVerticesInOrder(Iterable<String> ids,
EnumSet<FetchHint> fetchHints,
Authorizations authorizations)
Gets all vertices matching the given ids on the graph.
|
boolean |
isFieldBoostSupported()
Determine if field boost is support.
|
boolean |
isQuerySimilarToTextSupported() |
boolean |
isVisibilityValid(Visibility visibility,
Authorizations authorizations)
Given an authorization is the visibility object valid.
|
void |
markEdgeHidden(Edge edge,
Visibility visibility,
Authorizations authorizations)
Marks an edge as hidden for a given visibility.
|
void |
markEdgeVisible(Edge edge,
Visibility visibility,
Authorizations authorizations)
Marks an edge as visible for a given visibility, effectively undoing markEdgeHidden.
|
void |
markVertexHidden(Vertex vertex,
Visibility visibility,
Authorizations authorizations)
Marks a vertex as hidden for a given visibility.
|
void |
markVertexVisible(Vertex vertex,
Visibility visibility,
Authorizations authorizations)
Marks a vertex as visible for a given visibility, effectively undoing markVertexHidden.
|
EdgeBuilderByVertexId |
prepareEdge(String edgeId,
String outVertexId,
String inVertexId,
String label,
Visibility visibility)
Prepare an edge to be added to the graph.
|
EdgeBuilderByVertexId |
prepareEdge(String outVertexId,
String inVertexId,
String label,
Visibility visibility)
Prepare an edge to be added to the graph.
|
EdgeBuilder |
prepareEdge(String edgeId,
Vertex outVertex,
Vertex inVertex,
String label,
Visibility visibility)
Prepare an edge to be added to the graph.
|
EdgeBuilder |
prepareEdge(Vertex outVertex,
Vertex inVertex,
String label,
Visibility visibility)
Prepare an edge to be added to the graph.
|
VertexBuilder |
prepareVertex(String vertexId,
Visibility visibility)
Prepare a vertex to be added to the graph.
|
VertexBuilder |
prepareVertex(Visibility visibility)
Prepare a vertex to be added to the graph.
|
GraphQuery |
query(Authorizations authorizations)
Creates a query builder object used to query the graph.
|
GraphQuery |
query(String queryString,
Authorizations authorizations)
Creates a query builder object used to query the graph.
|
SimilarToGraphQuery |
querySimilarTo(String[] fields,
String text,
Authorizations authorizations) |
void |
reindex(Authorizations authorizations)
Reindex all vertices and edges.
|
void |
removeEdge(Edge edge,
Authorizations authorizations)
Removes an edge from the graph.
|
void |
removeEdge(String edgeId,
Authorizations authorizations)
Removes an edge from the graph.
|
void |
removeVertex(Vertex vertex,
Authorizations authorizations)
Removes a vertex from the graph.
|
void |
setMetadata(String key,
Object value)
Sets metadata on the graph.
|
void |
shutdown()
Cleans up or disconnects from the underlying storage.
|
Vertex addVertex(Visibility visibility, Authorizations authorizations)
visibility - The visibility to assign to the new vertex.authorizations - The authorizations required to add and retrieve the new vertex.Vertex addVertex(String vertexId, Visibility visibility, Authorizations authorizations)
vertexId - The id to assign the new vertex.visibility - The visibility to assign to the new vertex.authorizations - The authorizations required to add and retrieve the new vertex.Iterable<Vertex> addVertices(Iterable<ElementBuilder<Vertex>> vertices, Authorizations authorizations)
vertices - The vertices to add.authorizations - The authorizations required to add and retrieve the new vertex.VertexBuilder prepareVertex(Visibility visibility)
visibility - The visibility to assign to the new vertex.VertexBuilder prepareVertex(String vertexId, Visibility visibility)
vertexId - The id to assign the new vertex.visibility - The visibility to assign to the new vertex.boolean doesVertexExist(String vertexId, Authorizations authorizations)
vertexId - The vertex id to check existence of.authorizations - The authorizations required to load the vertex.Vertex getVertex(String vertexId, Authorizations authorizations)
vertexId - The vertex id to retrieve from the graph.authorizations - The authorizations required to load the vertex.Vertex getVertex(String vertexId, EnumSet<FetchHint> fetchHints, Authorizations authorizations)
vertexId - The vertex id to retrieve from the graph.fetchHints - Hint at what parts of the vertex to fetch.authorizations - The authorizations required to load the vertex.Iterable<Vertex> getVertices(Authorizations authorizations)
authorizations - The authorizations required to load the vertex.Iterable<Vertex> getVertices(EnumSet<FetchHint> fetchHints, Authorizations authorizations)
fetchHints - Hint at what parts of the vertex to fetch.authorizations - The authorizations required to load the vertex.Map<String,Boolean> doVerticesExist(List<String> ids, Authorizations authorizations)
ids - The vertex ids to check existence of.authorizations - The authorizations required to load the vertices.Iterable<Vertex> getVertices(Iterable<String> ids, Authorizations authorizations)
getVerticesInOrder(Iterable, Authorizations).
Vertices are not kept in memory during the iteration.ids - The ids of the vertices to get.authorizations - The authorizations required to load the vertex.Iterable<Vertex> getVertices(Iterable<String> ids, EnumSet<FetchHint> fetchHints, Authorizations authorizations)
getVerticesInOrder(Iterable, Authorizations).
Vertices are not kept in memory during the iteration.ids - The ids of the vertices to get.fetchHints - Hint at what parts of the vertex to fetch.authorizations - The authorizations required to load the vertex.List<Vertex> getVerticesInOrder(Iterable<String> ids, Authorizations authorizations)
getVertices(Iterable, Authorizations)
but returns the vertices in the order that you passed in the ids. This requires loading
all the vertices in memory to sort them.ids - The ids of the vertices to get.authorizations - The authorizations required to load the vertex.List<Vertex> getVerticesInOrder(Iterable<String> ids, EnumSet<FetchHint> fetchHints, Authorizations authorizations)
getVertices(Iterable, Authorizations)
but returns the vertices in the order that you passed in the ids. This requires loading
all the vertices in memory to sort them.ids - The ids of the vertices to get.fetchHints - Hint at what parts of the vertex to fetch.authorizations - The authorizations required to load the vertex.void removeVertex(Vertex vertex, Authorizations authorizations)
vertex - The vertex to remove.authorizations - The authorizations required to remove the vertex.Edge addEdge(Vertex outVertex, Vertex inVertex, String label, Visibility visibility, Authorizations authorizations)
outVertex - The source vertex. The "out" side of the edge.inVertex - The destination vertex. The "in" side of the edge.label - The label to assign to the edge. eg knows, works at, etc.visibility - The visibility to assign to the new edge.authorizations - The authorizations required to add and retrieve the new edge.Edge addEdge(String edgeId, Vertex outVertex, Vertex inVertex, String label, Visibility visibility, Authorizations authorizations)
edgeId - The id to assign the new edge.outVertex - The source vertex. The "out" side of the edge.inVertex - The destination vertex. The "in" side of the edge.label - The label to assign to the edge. eg knows, works at, etc.visibility - The visibility to assign to the new edge.authorizations - The authorizations required to add and retrieve the new edge.Edge addEdge(String outVertexId, String inVertexId, String label, Visibility visibility, Authorizations authorizations)
outVertexId - The source vertex id. The "out" side of the edge.inVertexId - The destination vertex id. The "in" side of the edge.label - The label to assign to the edge. eg knows, works at, etc.visibility - The visibility to assign to the new edge.authorizations - The authorizations required to add and retrieve the new edge.Edge addEdge(String edgeId, String outVertexId, String inVertexId, String label, Visibility visibility, Authorizations authorizations)
edgeId - The id to assign the new edge.outVertexId - The source vertex id. The "out" side of the edge.inVertexId - The destination vertex id. The "in" side of the edge.label - The label to assign to the edge. eg knows, works at, etc.visibility - The visibility to assign to the new edge.authorizations - The authorizations required to add and retrieve the new edge.EdgeBuilder prepareEdge(Vertex outVertex, Vertex inVertex, String label, Visibility visibility)
outVertex - The source vertex. The "out" side of the edge.inVertex - The destination vertex. The "in" side of the edge.label - The label to assign to the edge. eg knows, works at, etc.visibility - The visibility to assign to the new edge.EdgeBuilder prepareEdge(String edgeId, Vertex outVertex, Vertex inVertex, String label, Visibility visibility)
edgeId - The id to assign the new edge.outVertex - The source vertex. The "out" side of the edge.inVertex - The destination vertex. The "in" side of the edge.label - The label to assign to the edge. eg knows, works at, etc.visibility - The visibility to assign to the new edge.EdgeBuilderByVertexId prepareEdge(String outVertexId, String inVertexId, String label, Visibility visibility)
outVertexId - The source vertex id. The "out" side of the edge.inVertexId - The destination vertex id. The "in" side of the edge.label - The label to assign to the edge. eg knows, works at, etc.visibility - The visibility to assign to the new edge.EdgeBuilderByVertexId prepareEdge(String edgeId, String outVertexId, String inVertexId, String label, Visibility visibility)
edgeId - The id to assign the new edge.outVertexId - The source vertex id. The "out" side of the edge.inVertexId - The destination vertex id. The "in" side of the edge.label - The label to assign to the edge. eg knows, works at, etc.visibility - The visibility to assign to the new edge.boolean doesEdgeExist(String edgeId, Authorizations authorizations)
edgeId - The edge id to check existence of.authorizations - The authorizations required to load the edge.Edge getEdge(String edgeId, Authorizations authorizations)
edgeId - The edge id to retrieve from the graph.authorizations - The authorizations required to load the edge.Edge getEdge(String edgeId, EnumSet<FetchHint> fetchHints, Authorizations authorizations)
edgeId - The edge id to retrieve from the graph.fetchHints - Hint at what parts of the edge to fetch.authorizations - The authorizations required to load the edge.Iterable<Edge> getEdges(Authorizations authorizations)
authorizations - The authorizations required to load the edge.Iterable<Edge> getEdges(EnumSet<FetchHint> fetchHints, Authorizations authorizations)
fetchHints - Hint at what parts of the edge to fetch.authorizations - The authorizations required to load the edge.Map<String,Boolean> doEdgesExist(List<String> ids, Authorizations authorizations)
ids - The edge ids to check existence of.authorizations - The authorizations required to load the edges.Iterable<Edge> getEdges(Iterable<String> ids, Authorizations authorizations)
ids - The ids of the edges to get.authorizations - The authorizations required to load the edge.Iterable<Edge> getEdges(Iterable<String> ids, EnumSet<FetchHint> fetchHints, Authorizations authorizations)
ids - The ids of the edges to get.fetchHints - Hint at what parts of the edge to fetch.authorizations - The authorizations required to load the edge.Iterable<String> findRelatedEdges(Iterable<String> vertexIds, Authorizations authorizations)
vertexIds - The list of vertex ids.authorizations - The authorizations required to load the edges.void removeEdge(Edge edge, Authorizations authorizations)
edge - The edge to remove.authorizations - The authorizations required to remove the edge.void removeEdge(String edgeId, Authorizations authorizations)
edgeId - The edge id of the vertex to remove from the graph.authorizations - The authorizations required to remove the edge.GraphQuery query(String queryString, Authorizations authorizations)
queryString - The string to search for in the text of an element. This will search all fields for the given text.authorizations - The authorizations required to load the elements.GraphQuery query(Authorizations authorizations)
authorizations - The authorizations required to load the elements.boolean isQuerySimilarToTextSupported()
SimilarToGraphQuery querySimilarTo(String[] fields, String text, Authorizations authorizations)
void flush()
void shutdown()
Iterable<Path> findPaths(Vertex sourceVertex, Vertex destVertex, int maxHops, Authorizations authorizations)
sourceVertex - The source vertex to start the search from.destVertex - The destination vertex to get to.maxHops - The maximum number of hops to make before giving up.authorizations - The authorizations required to load all edges and vertices.Iterable<Path> findPaths(String sourceVertexId, String destVertexId, int maxHops, Authorizations authorizations)
sourceVertexId - The source vertex id to start the search from.destVertexId - The destination vertex id to get to.maxHops - The maximum number of hops to make before giving up.authorizations - The authorizations required to load all edges and vertices.Iterable<Path> findPaths(Vertex sourceVertex, Vertex destVertex, int maxHops, ProgressCallback progressCallback, Authorizations authorizations)
sourceVertex - The source vertex to start the search from.destVertex - The destination vertex to get to.maxHops - The maximum number of hops to make before giving up.progressCallback - Callback used to report progress.authorizations - The authorizations required to load all edges and vertices.Iterable<Path> findPaths(String sourceVertexId, String destVertexId, int maxHops, ProgressCallback progressCallback, Authorizations authorizations)
sourceVertexId - The source vertex id to start the search from.destVertexId - The destination vertex id to get to.maxHops - The maximum number of hops to make before giving up.progressCallback - Callback used to report progress.authorizations - The authorizations required to load all edges and vertices.IdGenerator getIdGenerator()
boolean isVisibilityValid(Visibility visibility, Authorizations authorizations)
visibility - The visibility you want to check.authorizations - The given authorizations.void reindex(Authorizations authorizations)
authorizations - authorizations used to query for the data to reindex.DefinePropertyBuilder defineProperty(String propertyName)
propertyName - The name of the property to define.void setMetadata(String key, Object value)
key - The key to the metadata.value - The value to set.Object getMetadata(String key)
key - The key to the metadata.Iterable<GraphMetadataEntry> getMetadata()
boolean isFieldBoostSupported()
void clearData()
SearchIndexSecurityGranularity getSearchIndexSecurityGranularity()
SearchIndexSecurityGranularityvoid addGraphEventListener(GraphEventListener graphEventListener)
void markVertexHidden(Vertex vertex, Visibility visibility, Authorizations authorizations)
vertex - The vertex to mark hidden.visibility - The visibility string under which this vertex is hidden.
This visibility can be a superset of the vertex visibility to mark
it as hidden for only a subset of authorizations.authorizations - The authorizations used.void markVertexVisible(Vertex vertex, Visibility visibility, Authorizations authorizations)
vertex - The vertex to mark visible.visibility - The visibility string under which this vertex is now visible.authorizations - The authorizations used.void markEdgeHidden(Edge edge, Visibility visibility, Authorizations authorizations)
edge - The edge to mark hidden.visibility - The visibility string under which this edge is hidden.
This visibility can be a superset of the edge visibility to mark
it as hidden for only a subset of authorizations.authorizations - The authorizations used.void markEdgeVisible(Edge edge, Visibility visibility, Authorizations authorizations)
edge - The edge to mark visible.visibility - The visibility string under which this edge is now visible.authorizations - The authorizations used.Authorizations createAuthorizations(String... auths)
auths - The authorizations granted.Copyright © 2014–2015. All rights reserved.