public abstract class GraphBase extends Object implements Graph
| Modifier and Type | Field and Description |
|---|---|
static String |
METADATA_DEFINE_PROPERTY_PREFIX |
protected static VertexiumLogger |
QUERY_LOGGER |
| Modifier | Constructor and Description |
|---|---|
protected |
GraphBase(boolean strictTyping) |
| 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.
|
protected void |
addToPropertyDefinitionCache(PropertyDefinition propertyDefinition) |
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.
|
Authorizations |
createAuthorizations(Authorizations auths,
Collection<String> additionalAuthorizations)
Creates an authorizations object combining auths and additionalAuthorizations.
|
Authorizations |
createAuthorizations(Authorizations auths,
String... additionalAuthorizations)
Creates an authorizations object combining auths and additionalAuthorizations.
|
Authorizations |
createAuthorizations(Collection<String> auths)
Creates an authorizations object.
|
abstract Authorizations |
createAuthorizations(String... auths)
Creates an authorizations object.
|
DefinePropertyBuilder |
defineProperty(String propertyName)
Creates a defines property builder.
|
abstract void |
deleteEdge(Edge edge,
Authorizations authorizations)
Permanently deletes an edge from the graph.
|
void |
deleteEdge(String edgeId,
Authorizations authorizations)
Permanently deletes an edge from the graph.
|
void |
deleteVertex(String vertexId,
Authorizations authorizations)
Permanently deletes a vertex from the graph.
|
abstract void |
deleteVertex(Vertex vertex,
Authorizations authorizations)
Permanently deletes a vertex from the graph.
|
Map<String,Boolean> |
doEdgesExist(Iterable<String> ids,
Authorizations authorizations)
Tests the existence of edges with the given authorizations.
|
Map<String,Boolean> |
doEdgesExist(Iterable<String> ids,
Long endTime,
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(Iterable<String> ids,
Authorizations authorizations)
Tests the existence of vertices with the given authorizations.
|
abstract void |
drop()
Drops all tables
|
void |
ensurePropertyDefined(String name,
Object value) |
Iterable<String> |
filterEdgeIdsByAuthorization(Iterable<String> edgeIds,
String authorizationToMatch,
EnumSet<ElementFilter> filters,
Authorizations authorizations)
Filters a collection of edge ids by the authorizations of that edge, properties, etc.
|
Iterable<String> |
filterVertexIdsByAuthorization(Iterable<String> vertexIds,
String authorizationToMatch,
EnumSet<ElementFilter> filters,
Authorizations authorizations)
Filters a collection of vertex ids by the authorizations of that vertex, properties, etc.
|
Iterable<Path> |
findPaths(FindPathOptions options,
Authorizations authorizations)
Finds all paths between two vertices.
|
Iterable<Path> |
findPaths(String sourceVertexId,
String destVertexId,
int maxHops,
Authorizations authorizations)
Deprecated.
|
Iterable<Path> |
findPaths(String sourceVertexId,
String destVertexId,
int maxHops,
ProgressCallback progressCallback,
Authorizations authorizations)
Deprecated.
|
Iterable<Path> |
findPaths(String sourceVertexId,
String destVertexId,
String[] labels,
int maxHops,
Authorizations authorizations)
Deprecated.
|
Iterable<Path> |
findPaths(String sourceVertexId,
String destVertexId,
String[] labels,
int maxHops,
ProgressCallback progressCallback,
Authorizations authorizations)
Deprecated.
|
protected void |
findPathsRecursive(FindPathOptions options,
List<Path> foundPaths,
Vertex sourceVertex,
Vertex destVertex,
int hops,
Set<String> seenVertices,
Path currentPath,
ProgressCallback progressCallback,
Authorizations authorizations) |
protected void |
findPathsSetIntersection(FindPathOptions options,
List<Path> foundPaths,
Vertex sourceVertex,
Vertex destVertex,
ProgressCallback progressCallback,
Authorizations authorizations) |
Iterable<String> |
findRelatedEdgeIds(Iterable<String> vertexIds,
Authorizations authorizations)
Given a list of vertex ids, find all the edge ids that connect them.
|
Iterable<String> |
findRelatedEdgeIds(Iterable<String> vertexIds,
Long endTime,
Authorizations authorizations)
Given a list of vertex ids, find all the edge ids that connect them.
|
Iterable<String> |
findRelatedEdgeIdsForVertices(Iterable<Vertex> verticesIterable,
Authorizations authorizations)
Given a list of vertices, find all the edge ids that connect them.
|
Iterable<String> |
findRelatedEdges(Iterable<String> vertexIds,
Authorizations authorizations)
Deprecated.
|
Iterable<String> |
findRelatedEdges(Iterable<String> vertexIds,
Long endTime,
Authorizations authorizations)
Deprecated.
|
Iterable<RelatedEdge> |
findRelatedEdgeSummary(Iterable<String> vertexIds,
Authorizations authorizations)
Given a list of vertex ids, find all the edges that connect them.
|
Iterable<RelatedEdge> |
findRelatedEdgeSummary(Iterable<String> vertexIds,
Long endTime,
Authorizations authorizations)
Given a list of vertex ids, find all the edges that connect them.
|
Iterable<RelatedEdge> |
findRelatedEdgeSummaryForVertices(Iterable<Vertex> verticesIterable,
Authorizations authorizations)
Given a list of vertices, find all the edges that connect them.
|
protected void |
fireGraphEvent(GraphEvent graphEvent) |
abstract 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.
|
Edge |
getEdge(String edgeId,
EnumSet<FetchHint> fetchHints,
Long endTime,
Authorizations authorizations)
Get an edge from the graph.
|
long |
getEdgeCount(Authorizations authorizations)
Gets a count of the number of edges in the system.
|
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.
|
abstract Iterable<Edge> |
getEdges(EnumSet<FetchHint> fetchHints,
Long endTime,
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.
|
Iterable<Edge> |
getEdges(Iterable<String> ids,
EnumSet<FetchHint> fetchHints,
Long endTime,
Authorizations authorizations)
Gets all edges on the graph matching the given ids.
|
Iterable<Edge> |
getEdgesInRange(Range idRange,
Authorizations authorizations)
Gets edges from the graph in the given range.
|
Iterable<Edge> |
getEdgesInRange(Range idRange,
EnumSet<FetchHint> fetchHints,
Authorizations authorizations)
Gets edges from the graph in the given range.
|
Iterable<Edge> |
getEdgesInRange(Range idRange,
EnumSet<FetchHint> fetchHints,
Long endTime,
Authorizations authorizations)
Gets edges from the graph in the given range.
|
protected abstract GraphMetadataStore |
getGraphMetadataStore() |
abstract 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.
|
Iterable<GraphMetadataEntry> |
getMetadataWithPrefix(String prefix)
Gets all metadata with the given prefix.
|
PropertyDefinition |
getPropertyDefinition(String propertyName)
Gets the property definition for the given name.
|
Collection<PropertyDefinition> |
getPropertyDefinitions()
Gets all property definitions.
|
abstract SearchIndexSecurityGranularity |
getSearchIndexSecurityGranularity()
Gets the granularity of the search index
SearchIndexSecurityGranularity |
List<InputStream> |
getStreamingPropertyValueInputStreams(List<StreamingPropertyValue> streamingPropertyValues)
Opens multiple StreamingPropertyValue input streams at once.
|
protected Class<?> |
getValueType(Object value) |
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.
|
Vertex |
getVertex(String vertexId,
EnumSet<FetchHint> fetchHints,
Long endTime,
Authorizations authorizations)
Get a vertex from the graph.
|
long |
getVertexCount(Authorizations authorizations)
Gets a count of the number of vertices in the system.
|
Map<Object,Long> |
getVertexPropertyCountByValue(String propertyName,
Authorizations authorizations)
Gets the number of times a property with a given value occurs on vertices
|
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.
|
abstract Iterable<Vertex> |
getVertices(EnumSet<FetchHint> fetchHints,
Long endTime,
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.
|
Iterable<Vertex> |
getVertices(Iterable<String> ids,
EnumSet<FetchHint> fetchHints,
Long endTime,
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.
|
Iterable<Vertex> |
getVerticesInRange(Range idRange,
Authorizations authorizations)
Gets vertices from the graph in the given range.
|
Iterable<Vertex> |
getVerticesInRange(Range idRange,
EnumSet<FetchHint> fetchHints,
Authorizations authorizations)
Gets vertices from the graph in the given range.
|
Iterable<Vertex> |
getVerticesInRange(Range idRange,
EnumSet<FetchHint> fetchHints,
Long endTime,
Authorizations authorizations)
Gets vertices from the graph in the given range.
|
Iterable<Vertex> |
getVerticesWithPrefix(String vertexIdPrefix,
Authorizations authorizations)
Gets vertices from the graph given the prefix.
|
Iterable<Vertex> |
getVerticesWithPrefix(String vertexIdPrefix,
EnumSet<FetchHint> fetchHints,
Authorizations authorizations)
Gets vertices from the graph given the prefix.
|
Iterable<Vertex> |
getVerticesWithPrefix(String vertexIdPrefix,
EnumSet<FetchHint> fetchHints,
Long endTime,
Authorizations authorizations)
Gets vertices from the graph given the prefix.
|
protected boolean |
hasEventListeners() |
abstract boolean |
isFieldBoostSupported()
Determine if field boost is support.
|
boolean |
isPropertyDefined(String propertyName)
Determine if a property is already defined
|
boolean |
isQuerySimilarToTextSupported()
Returns true if this graph supports similar to text queries.
|
abstract boolean |
isVisibilityValid(Visibility visibility,
Authorizations authorizations)
Given an authorization is the visibility object valid.
|
abstract void |
markEdgeHidden(Edge edge,
Visibility visibility,
Authorizations authorizations)
Marks an edge as hidden for a given visibility.
|
abstract void |
markEdgeVisible(Edge edge,
Visibility visibility,
Authorizations authorizations)
Marks an edge as visible for a given visibility, effectively undoing markEdgeHidden.
|
abstract void |
markVertexHidden(Vertex vertex,
Visibility visibility,
Authorizations authorizations)
Marks a vertex as hidden for a given visibility.
|
abstract void |
markVertexVisible(Vertex vertex,
Visibility visibility,
Authorizations authorizations)
Marks a vertex as visible for a given visibility, effectively undoing markVertexHidden.
|
abstract EdgeBuilderByVertexId |
prepareEdge(String edgeId,
String outVertexId,
String inVertexId,
String label,
Long timestamp,
Visibility visibility)
Prepare an edge to be added to the graph.
|
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.
|
abstract EdgeBuilder |
prepareEdge(String edgeId,
Vertex outVertex,
Vertex inVertex,
String label,
Long timestamp,
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(Long timestamp,
Visibility visibility)
Prepare a vertex to be added to the graph.
|
abstract VertexBuilder |
prepareVertex(String vertexId,
Long timestamp,
Visibility visibility)
Prepare a vertex 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.
|
abstract GraphQuery |
query(Authorizations authorizations)
Creates a query builder object used to query the graph.
|
abstract MultiVertexQuery |
query(String[] vertexIds,
Authorizations authorizations)
Creates a query builder object used to query a list of vertices.
|
abstract MultiVertexQuery |
query(String[] vertexIds,
String queryString,
Authorizations authorizations)
Creates a query builder object used to query a list of vertices.
|
abstract GraphQuery |
query(String queryString,
Authorizations authorizations)
Creates a query builder object used to query the graph.
|
SimilarToGraphQuery |
querySimilarTo(String[] fields,
String text,
Authorizations authorizations)
Creates a query builder object that finds all vertices similar to the given text for the specified fields.
|
abstract void |
reindex(Authorizations authorizations)
Reindex all vertices and edges.
|
Iterable<Element> |
saveElementMutations(Iterable<ElementMutation> mutations,
Authorizations authorizations)
Saves multiple mutations with a single call.
|
void |
savePropertyDefinition(PropertyDefinition propertyDefinition)
Save a pre-made property definition.
|
void |
setMetadata(String key,
Object value)
Sets metadata on the graph.
|
abstract void |
shutdown()
Cleans up or disconnects from the underlying storage.
|
void |
softDeleteEdge(Edge edge,
Authorizations authorizations)
Soft deletes an edge from the graph.
|
abstract void |
softDeleteEdge(Edge edge,
Long timestamp,
Authorizations authorizations)
Soft deletes an edge from the graph.
|
void |
softDeleteEdge(String edgeId,
Authorizations authorizations)
Soft deletes an edge from the graph.
|
void |
softDeleteEdge(String edgeId,
Long timestamp,
Authorizations authorizations)
Soft deletes an edge from the graph.
|
void |
softDeleteVertex(String vertexId,
Authorizations authorizations)
Soft deletes a vertex from the graph.
|
void |
softDeleteVertex(String vertexId,
Long timestamp,
Authorizations authorizations)
Soft deletes a vertex from the graph.
|
void |
softDeleteVertex(Vertex vertex,
Authorizations authorizations)
Soft deletes a vertex from the graph.
|
abstract void |
softDeleteVertex(Vertex vertex,
Long timestamp,
Authorizations authorizations)
Soft deletes a vertex from the graph.
|
abstract void |
truncate()
Clears all data from the graph.
|
protected static final VertexiumLogger QUERY_LOGGER
public static final String METADATA_DEFINE_PROPERTY_PREFIX
public Vertex addVertex(Visibility visibility, Authorizations authorizations)
Graphpublic Vertex addVertex(String vertexId, Visibility visibility, Authorizations authorizations)
Graphpublic Iterable<Vertex> addVertices(Iterable<ElementBuilder<Vertex>> vertices, Authorizations authorizations)
GraphaddVertices in interface Graphvertices - The vertices to add.authorizations - The authorizations required to add and retrieve the new vertex.public VertexBuilder prepareVertex(Visibility visibility)
GraphprepareVertex in interface Graphvisibility - The visibility to assign to the new vertex.public abstract VertexBuilder prepareVertex(String vertexId, Long timestamp, Visibility visibility)
GraphprepareVertex in interface GraphvertexId - The id to assign the new vertex.timestamp - The timestamp of the vertex.visibility - The visibility to assign to the new vertex.public VertexBuilder prepareVertex(Long timestamp, Visibility visibility)
GraphprepareVertex in interface Graphtimestamp - The timestamp of the vertex. null, to use the system generated time.visibility - The visibility to assign to the new vertex.public VertexBuilder prepareVertex(String vertexId, Visibility visibility)
GraphprepareVertex in interface GraphvertexId - The id to assign the new vertex.visibility - The visibility to assign to the new vertex.public boolean doesVertexExist(String vertexId, Authorizations authorizations)
GraphdoesVertexExist in interface GraphvertexId - The vertex id to check existence of.authorizations - The authorizations required to load the vertex.public Vertex getVertex(String vertexId, EnumSet<FetchHint> fetchHints, Authorizations authorizations)
GraphgetVertex in interface GraphvertexId - 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.public Vertex getVertex(String vertexId, EnumSet<FetchHint> fetchHints, Long endTime, Authorizations authorizations)
GraphgetVertex in interface GraphvertexId - The vertex id to retrieve from the graph.fetchHints - Hint at what parts of the vertex to fetch.endTime - Include all changes made up until the point in time.authorizations - The authorizations required to load the vertex.public Vertex getVertex(String vertexId, Authorizations authorizations) throws VertexiumException
GraphgetVertex in interface GraphvertexId - The vertex id to retrieve from the graph.authorizations - The authorizations required to load the vertex.VertexiumExceptionpublic Iterable<Vertex> getVerticesWithPrefix(String vertexIdPrefix, Authorizations authorizations)
GraphgetVerticesWithPrefix in interface GraphvertexIdPrefix - The prefix of the vertex ids to retrieve from the graph.authorizations - The authorizations required to load the vertex.public Iterable<Vertex> getVerticesWithPrefix(String vertexIdPrefix, EnumSet<FetchHint> fetchHints, Authorizations authorizations)
GraphgetVerticesWithPrefix in interface GraphvertexIdPrefix - The prefix of the vertex ids to retrieve from the graph.fetchHints - Hint at what parts of the vertex to fetch.authorizations - The authorizations required to load the vertex.public Iterable<Vertex> getVerticesWithPrefix(String vertexIdPrefix, EnumSet<FetchHint> fetchHints, Long endTime, Authorizations authorizations)
GraphgetVerticesWithPrefix in interface GraphvertexIdPrefix - The prefix of the vertex ids to retrieve from the graph.fetchHints - Hint at what parts of the vertex to fetch.endTime - Include all changes made up until the point in time.authorizations - The authorizations required to load the vertex.public Iterable<Vertex> getVerticesInRange(Range idRange, Authorizations authorizations)
GraphgetVerticesInRange in interface GraphidRange - The range of ids to get.authorizations - The authorizations required to load the vertex.public Iterable<Vertex> getVerticesInRange(Range idRange, EnumSet<FetchHint> fetchHints, Authorizations authorizations)
GraphgetVerticesInRange in interface GraphidRange - The range of ids to get.fetchHints - Hint at what parts of the vertex to fetch.authorizations - The authorizations required to load the vertex.public Iterable<Vertex> getVerticesInRange(Range idRange, EnumSet<FetchHint> fetchHints, Long endTime, Authorizations authorizations)
GraphgetVerticesInRange in interface GraphidRange - The range of ids to get.fetchHints - Hint at what parts of the vertex to fetch.endTime - Include all changes made up until the point in time.authorizations - The authorizations required to load the vertex.public Iterable<Vertex> getVertices(Iterable<String> ids, EnumSet<FetchHint> fetchHints, Authorizations authorizations)
GraphGraph.getVerticesInOrder(Iterable, Authorizations).
Vertices are not kept in memory during the iteration.getVertices in interface Graphids - 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.public Iterable<Vertex> getVertices(Iterable<String> ids, EnumSet<FetchHint> fetchHints, Long endTime, Authorizations authorizations)
GraphGraph.getVerticesInOrder(Iterable, Authorizations).
Vertices are not kept in memory during the iteration.getVertices in interface Graphids - The ids of the vertices to get.fetchHints - Hint at what parts of the vertex to fetch.endTime - Include all changes made up until the point in time.authorizations - The authorizations required to load the vertex.public Map<String,Boolean> doVerticesExist(Iterable<String> ids, Authorizations authorizations)
GraphdoVerticesExist in interface Graphids - The vertex ids to check existence of.authorizations - The authorizations required to load the vertices.public Iterable<Vertex> getVertices(Iterable<String> ids, Authorizations authorizations)
GraphGraph.getVerticesInOrder(Iterable, Authorizations).
Vertices are not kept in memory during the iteration.getVertices in interface Graphids - The ids of the vertices to get.authorizations - The authorizations required to load the vertex.public List<Vertex> getVerticesInOrder(Iterable<String> ids, EnumSet<FetchHint> fetchHints, Authorizations authorizations)
GraphGraph.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.getVerticesInOrder in interface Graphids - 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.public List<Vertex> getVerticesInOrder(Iterable<String> ids, Authorizations authorizations)
GraphGraph.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.getVerticesInOrder in interface Graphids - The ids of the vertices to get.authorizations - The authorizations required to load the vertex.public Iterable<Vertex> getVertices(Authorizations authorizations) throws VertexiumException
GraphgetVertices in interface Graphauthorizations - The authorizations required to load the vertex.VertexiumExceptionpublic Iterable<Vertex> getVertices(EnumSet<FetchHint> fetchHints, Authorizations authorizations)
GraphgetVertices in interface GraphfetchHints - Hint at what parts of the vertex to fetch.authorizations - The authorizations required to load the vertex.public abstract Iterable<Vertex> getVertices(EnumSet<FetchHint> fetchHints, Long endTime, Authorizations authorizations)
GraphgetVertices in interface GraphfetchHints - Hint at what parts of the vertex to fetch.endTime - Include all changes made up until the point in time.authorizations - The authorizations required to load the vertex.public Edge addEdge(Vertex outVertex, Vertex inVertex, String label, Visibility visibility, Authorizations authorizations)
GraphaddEdge in interface GraphoutVertex - 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.public Edge addEdge(String edgeId, Vertex outVertex, Vertex inVertex, String label, Visibility visibility, Authorizations authorizations)
GraphaddEdge in interface GraphedgeId - 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.public Edge addEdge(String outVertexId, String inVertexId, String label, Visibility visibility, Authorizations authorizations)
GraphaddEdge in interface GraphoutVertexId - 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.public Edge addEdge(String edgeId, String outVertexId, String inVertexId, String label, Visibility visibility, Authorizations authorizations)
GraphaddEdge in interface GraphedgeId - 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.public EdgeBuilderByVertexId prepareEdge(String outVertexId, String inVertexId, String label, Visibility visibility)
GraphprepareEdge in interface GraphoutVertexId - 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.public EdgeBuilder prepareEdge(Vertex outVertex, Vertex inVertex, String label, Visibility visibility)
GraphprepareEdge in interface GraphoutVertex - 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.public EdgeBuilder prepareEdge(String edgeId, Vertex outVertex, Vertex inVertex, String label, Visibility visibility)
GraphprepareEdge in interface GraphedgeId - 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.public abstract EdgeBuilder prepareEdge(String edgeId, Vertex outVertex, Vertex inVertex, String label, Long timestamp, Visibility visibility)
GraphprepareEdge in interface GraphedgeId - 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.timestamp - The timestamp of the edge.visibility - The visibility to assign to the new edge.public EdgeBuilderByVertexId prepareEdge(String edgeId, String outVertexId, String inVertexId, String label, Visibility visibility)
GraphprepareEdge in interface GraphedgeId - 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.public abstract EdgeBuilderByVertexId prepareEdge(String edgeId, String outVertexId, String inVertexId, String label, Long timestamp, Visibility visibility)
GraphprepareEdge in interface GraphedgeId - 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.timestamp - The timestamp of the edge.visibility - The visibility to assign to the new edge.public boolean doesEdgeExist(String edgeId, Authorizations authorizations)
GraphdoesEdgeExist in interface GraphedgeId - The edge id to check existence of.authorizations - The authorizations required to load the edge.public Edge getEdge(String edgeId, EnumSet<FetchHint> fetchHints, Authorizations authorizations)
GraphgetEdge in interface GraphedgeId - 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.public Edge getEdge(String edgeId, EnumSet<FetchHint> fetchHints, Long endTime, Authorizations authorizations)
GraphgetEdge in interface GraphedgeId - The edge id to retrieve from the graph.fetchHints - Hint at what parts of the edge to fetch.endTime - Include all changes made up until the point in time.authorizations - The authorizations required to load the edge.public Edge getEdge(String edgeId, Authorizations authorizations)
Graphpublic Map<String,Boolean> doEdgesExist(Iterable<String> ids, Authorizations authorizations)
GraphdoEdgesExist in interface Graphids - The edge ids to check existence of.authorizations - The authorizations required to load the edges.public Map<String,Boolean> doEdgesExist(Iterable<String> ids, Long endTime, Authorizations authorizations)
GraphdoEdgesExist in interface Graphids - The edge ids to check existence of.endTime - Include all changes made up until the point in time.authorizations - The authorizations required to load the edges.public void deleteVertex(String vertexId, Authorizations authorizations)
GraphdeleteVertex in interface GraphvertexId - The vertex id to delete.authorizations - The authorizations required to delete the vertex.public void deleteEdge(String edgeId, Authorizations authorizations)
GraphdeleteEdge in interface GraphedgeId - The edge id of the edge to delete from the graph.authorizations - The authorizations required to delete the edge.public void softDeleteVertex(String vertexId, Authorizations authorizations)
GraphsoftDeleteVertex in interface GraphvertexId - The vertex id to soft delete.authorizations - The authorizations required to soft delete the vertex.public void softDeleteVertex(String vertexId, Long timestamp, Authorizations authorizations)
GraphsoftDeleteVertex in interface GraphvertexId - The vertex id to soft delete.authorizations - The authorizations required to soft delete the vertex.public void softDeleteVertex(Vertex vertex, Authorizations authorizations)
GraphsoftDeleteVertex in interface Graphvertex - The vertex to soft delete.authorizations - The authorizations required to soft delete the vertex.public abstract void softDeleteVertex(Vertex vertex, Long timestamp, Authorizations authorizations)
GraphsoftDeleteVertex in interface Graphvertex - The vertex to soft delete.authorizations - The authorizations required to soft delete the vertex.public void softDeleteEdge(String edgeId, Authorizations authorizations)
GraphsoftDeleteEdge in interface GraphedgeId - The edge id of the vertex to soft delete from the graph.authorizations - The authorizations required to delete the edge.public void softDeleteEdge(String edgeId, Long timestamp, Authorizations authorizations)
GraphsoftDeleteEdge in interface GraphedgeId - The edge id of the vertex to soft delete from the graph.authorizations - The authorizations required to delete the edge.public void softDeleteEdge(Edge edge, Authorizations authorizations)
GraphsoftDeleteEdge in interface Graphedge - The edge to soft delete from the graph.authorizations - The authorizations required to delete the edge.public abstract void softDeleteEdge(Edge edge, Long timestamp, Authorizations authorizations)
GraphsoftDeleteEdge in interface Graphedge - The edge to soft delete from the graph.authorizations - The authorizations required to delete the edge.public Iterable<String> filterEdgeIdsByAuthorization(Iterable<String> edgeIds, String authorizationToMatch, EnumSet<ElementFilter> filters, Authorizations authorizations)
GraphfilterEdgeIdsByAuthorization in interface GraphedgeIds - The edge ids to filter on.authorizationToMatch - The authorization to look forfilters - The parts of the edge to filter onauthorizations - The authorization to find the edges withpublic Iterable<String> filterVertexIdsByAuthorization(Iterable<String> vertexIds, String authorizationToMatch, EnumSet<ElementFilter> filters, Authorizations authorizations)
GraphfilterVertexIdsByAuthorization in interface GraphvertexIds - The vertex ids to filter on.authorizationToMatch - The authorization to look forfilters - The parts of the edge to filter onauthorizations - The authorization to find the edges withpublic Iterable<Edge> getEdges(Iterable<String> ids, EnumSet<FetchHint> fetchHints, Authorizations authorizations)
Graphpublic Iterable<Edge> getEdges(Iterable<String> ids, EnumSet<FetchHint> fetchHints, Long endTime, Authorizations authorizations)
GraphgetEdges in interface Graphids - The ids of the edges to get.fetchHints - Hint at what parts of the edge to fetch.endTime - Include all changes made up until the point in time.authorizations - The authorizations required to load the edge.public Iterable<Edge> getEdges(Iterable<String> ids, Authorizations authorizations)
Graphpublic Iterable<Edge> getEdges(Authorizations authorizations)
Graphpublic Iterable<Edge> getEdges(EnumSet<FetchHint> fetchHints, Authorizations authorizations)
Graphpublic abstract Iterable<Edge> getEdges(EnumSet<FetchHint> fetchHints, Long endTime, Authorizations authorizations)
Graphpublic Iterable<Edge> getEdgesInRange(Range idRange, Authorizations authorizations)
GraphgetEdgesInRange in interface GraphidRange - The range of ids to get.authorizations - The authorizations required to load the vertex.public Iterable<Edge> getEdgesInRange(Range idRange, EnumSet<FetchHint> fetchHints, Authorizations authorizations)
GraphgetEdgesInRange in interface GraphidRange - The range of ids to get.fetchHints - Hint at what parts of the vertex to fetch.authorizations - The authorizations required to load the vertex.public Iterable<Edge> getEdgesInRange(Range idRange, EnumSet<FetchHint> fetchHints, Long endTime, Authorizations authorizations)
GraphgetEdgesInRange in interface GraphidRange - The range of ids to get.fetchHints - Hint at what parts of the vertex to fetch.endTime - Include all changes made up until the point in time.authorizations - The authorizations required to load the vertex.@Deprecated public Iterable<Path> findPaths(String sourceVertexId, String destVertexId, int maxHops, Authorizations authorizations)
GraphfindPaths in interface GraphsourceVertexId - 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.@Deprecated public Iterable<Path> findPaths(String sourceVertexId, String destVertexId, String[] labels, int maxHops, Authorizations authorizations)
GraphfindPaths in interface GraphsourceVertexId - The source vertex id to start the search from.destVertexId - The destination vertex id to get to.labels - Edge labelsmaxHops - The maximum number of hops to make before giving up.authorizations - The authorizations required to load all edges and vertices.@Deprecated public Iterable<Path> findPaths(String sourceVertexId, String destVertexId, int maxHops, ProgressCallback progressCallback, Authorizations authorizations)
GraphfindPaths in interface GraphsourceVertexId - 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.@Deprecated public Iterable<Path> findPaths(String sourceVertexId, String destVertexId, String[] labels, int maxHops, ProgressCallback progressCallback, Authorizations authorizations)
GraphfindPaths in interface GraphsourceVertexId - The source vertex id to start the search from.destVertexId - The destination vertex id to get to.labels - Edge labelsmaxHops - 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.public Iterable<Path> findPaths(FindPathOptions options, Authorizations authorizations)
Graphprotected void findPathsSetIntersection(FindPathOptions options, List<Path> foundPaths, Vertex sourceVertex, Vertex destVertex, ProgressCallback progressCallback, Authorizations authorizations)
protected void findPathsRecursive(FindPathOptions options, List<Path> foundPaths, Vertex sourceVertex, Vertex destVertex, int hops, Set<String> seenVertices, Path currentPath, ProgressCallback progressCallback, Authorizations authorizations)
@Deprecated public Iterable<String> findRelatedEdges(Iterable<String> vertexIds, Authorizations authorizations)
GraphfindRelatedEdges in interface Graph@Deprecated public Iterable<String> findRelatedEdges(Iterable<String> vertexIds, Long endTime, Authorizations authorizations)
GraphfindRelatedEdges in interface Graphpublic Iterable<String> findRelatedEdgeIds(Iterable<String> vertexIds, Authorizations authorizations)
GraphfindRelatedEdgeIds in interface GraphvertexIds - The list of vertex ids.authorizations - The authorizations required to load the edges.public Iterable<String> findRelatedEdgeIds(Iterable<String> vertexIds, Long endTime, Authorizations authorizations)
GraphfindRelatedEdgeIds in interface GraphvertexIds - The list of vertex ids.endTime - Include all changes made up until the point in time.authorizations - The authorizations required to load the edges.public Iterable<RelatedEdge> findRelatedEdgeSummary(Iterable<String> vertexIds, Authorizations authorizations)
GraphfindRelatedEdgeSummary in interface GraphvertexIds - The list of vertex ids.authorizations - The authorizations required to load the edges.public Iterable<RelatedEdge> findRelatedEdgeSummary(Iterable<String> vertexIds, Long endTime, Authorizations authorizations)
GraphfindRelatedEdgeSummary in interface GraphvertexIds - The list of vertex ids.endTime - Include all changes made up until the point in time.authorizations - The authorizations required to load the edges.public Iterable<RelatedEdge> findRelatedEdgeSummaryForVertices(Iterable<Vertex> verticesIterable, Authorizations authorizations)
GraphfindRelatedEdgeSummaryForVertices in interface GraphverticesIterable - The list of vertices.authorizations - The authorizations required to load the edges.public Iterable<String> findRelatedEdgeIdsForVertices(Iterable<Vertex> verticesIterable, Authorizations authorizations)
GraphfindRelatedEdgeIdsForVertices in interface GraphverticesIterable - The list of vertices.authorizations - The authorizations required to load the edges.protected abstract GraphMetadataStore getGraphMetadataStore()
public final Iterable<GraphMetadataEntry> getMetadata()
GraphgetMetadata in interface Graphpublic final void setMetadata(String key, Object value)
GraphsetMetadata in interface Graphkey - The key to the metadata.value - The value to set.public final Object getMetadata(String key)
GraphgetMetadata in interface Graphkey - The key to the metadata.public final Iterable<GraphMetadataEntry> getMetadataWithPrefix(String prefix)
GraphgetMetadataWithPrefix in interface Graphpublic abstract GraphQuery query(Authorizations authorizations)
Graphpublic abstract GraphQuery query(String queryString, Authorizations authorizations)
Graphpublic abstract void reindex(Authorizations authorizations)
Graphpublic abstract void flush()
Graphpublic abstract void shutdown()
Graphpublic abstract void drop()
Graphpublic abstract boolean isFieldBoostSupported()
GraphisFieldBoostSupported in interface Graphpublic abstract SearchIndexSecurityGranularity getSearchIndexSecurityGranularity()
GraphSearchIndexSecurityGranularitygetSearchIndexSecurityGranularity in interface Graphpublic void addGraphEventListener(GraphEventListener graphEventListener)
GraphaddGraphEventListener in interface Graphprotected boolean hasEventListeners()
protected void fireGraphEvent(GraphEvent graphEvent)
public boolean isQuerySimilarToTextSupported()
GraphisQuerySimilarToTextSupported in interface Graphpublic SimilarToGraphQuery querySimilarTo(String[] fields, String text, Authorizations authorizations)
GraphquerySimilarTo in interface Graphfields - The fields to match against.text - The text to find similar to.authorizations - The authorizations required to load the elements.public Authorizations createAuthorizations(Collection<String> auths)
GraphcreateAuthorizations in interface Graphauths - The authorizations granted.public Authorizations createAuthorizations(Authorizations auths, String... additionalAuthorizations)
GraphcreateAuthorizations in interface Graphauths - The authorizations granted.additionalAuthorizations - additional authorizationspublic Authorizations createAuthorizations(Authorizations auths, Collection<String> additionalAuthorizations)
GraphcreateAuthorizations in interface Graphauths - The authorizations granted.additionalAuthorizations - additional authorizationspublic Map<Object,Long> getVertexPropertyCountByValue(String propertyName, Authorizations authorizations)
GraphgetVertexPropertyCountByValue in interface GraphpropertyName - The name of the property to findauthorizations - The authorizations to use to find the propertypublic long getVertexCount(Authorizations authorizations)
GraphgetVertexCount in interface Graphpublic long getEdgeCount(Authorizations authorizations)
GraphgetEdgeCount in interface Graphpublic abstract void deleteVertex(Vertex vertex, Authorizations authorizations)
GraphdeleteVertex in interface Graphvertex - The vertex to delete.authorizations - The authorizations required to delete the vertex.public abstract void deleteEdge(Edge edge, Authorizations authorizations)
GraphdeleteEdge in interface Graphedge - The edge to delete from the graph.authorizations - The authorizations required to delete the edge.public abstract MultiVertexQuery query(String[] vertexIds, String queryString, Authorizations authorizations)
Graphquery in interface GraphvertexIds - The vertex ids to query.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.public abstract MultiVertexQuery query(String[] vertexIds, Authorizations authorizations)
Graphpublic abstract IdGenerator getIdGenerator()
GraphgetIdGenerator in interface Graphpublic abstract boolean isVisibilityValid(Visibility visibility, Authorizations authorizations)
GraphisVisibilityValid in interface Graphvisibility - The visibility you want to check.authorizations - The given authorizations.public abstract void truncate()
Graphpublic abstract void markVertexHidden(Vertex vertex, Visibility visibility, Authorizations authorizations)
GraphmarkVertexHidden in interface Graphvertex - 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.public abstract void markVertexVisible(Vertex vertex, Visibility visibility, Authorizations authorizations)
GraphmarkVertexVisible in interface Graphvertex - The vertex to mark visible.visibility - The visibility string under which this vertex is now visible.authorizations - The authorizations used.public abstract void markEdgeHidden(Edge edge, Visibility visibility, Authorizations authorizations)
GraphmarkEdgeHidden in interface Graphedge - 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.public abstract void markEdgeVisible(Edge edge, Visibility visibility, Authorizations authorizations)
GraphmarkEdgeVisible in interface Graphedge - The edge to mark visible.visibility - The visibility string under which this edge is now visible.authorizations - The authorizations used.public abstract Authorizations createAuthorizations(String... auths)
GraphcreateAuthorizations in interface Graphauths - The authorizations granted.public DefinePropertyBuilder defineProperty(String propertyName)
GraphdefineProperty in interface GraphpropertyName - The name of the property to define.protected void addToPropertyDefinitionCache(PropertyDefinition propertyDefinition)
public void savePropertyDefinition(PropertyDefinition propertyDefinition)
GraphsavePropertyDefinition in interface GraphpropertyDefinition - the property definition to save.public PropertyDefinition getPropertyDefinition(String propertyName)
GraphgetPropertyDefinition in interface GraphpropertyName - name of the propertypublic Collection<PropertyDefinition> getPropertyDefinitions()
GraphgetPropertyDefinitions in interface Graphpublic boolean isPropertyDefined(String propertyName)
GraphisPropertyDefined in interface Graphpublic Iterable<Element> saveElementMutations(Iterable<ElementMutation> mutations, Authorizations authorizations)
GraphsaveElementMutations in interface Graphmutations - the mutations to saveauthorizations - the authorizations used during savepublic List<InputStream> getStreamingPropertyValueInputStreams(List<StreamingPropertyValue> streamingPropertyValues)
GraphgetStreamingPropertyValueInputStreams in interface GraphstreamingPropertyValues - list of StreamingPropertyValues to get input streams forCopyright © 2014–2017. All rights reserved.