public abstract class GraphBaseWithSearchIndex extends GraphBase implements Graph, GraphWithSearchIndex
| Modifier and Type | Field and Description |
|---|---|
static String |
METADATA_ID_GENERATOR_CLASSNAME |
flushStackTraceTracker, flushTimer, METADATA_DEFINE_PROPERTY_PREFIX, QUERY_LOGGER| Modifier | Constructor and Description |
|---|---|
protected |
GraphBaseWithSearchIndex(GraphConfiguration configuration) |
protected |
GraphBaseWithSearchIndex(GraphConfiguration configuration,
IdGenerator idGenerator,
SearchIndex searchIndex) |
| Modifier and Type | Method and Description |
|---|---|
abstract Authorizations |
createAuthorizations(String... auths)
Creates an authorizations object.
|
abstract void |
deleteEdge(Edge edge,
Authorizations authorizations)
Permanently deletes an edge from the graph.
|
abstract void |
deleteVertex(Vertex vertex,
Authorizations authorizations)
Permanently deletes a vertex from the graph.
|
abstract void |
drop()
Drops all tables.
|
void |
flush()
Flushes any pending mutations to the graph.
|
String |
getBackupDir() |
GraphBackup |
getBackupTool(String outputFile) |
GraphConfiguration |
getConfiguration() |
FetchHints |
getDefaultFetchHints()
The default fetch hints to use if none are provided
|
abstract Iterable<Edge> |
getEdges(FetchHints fetchHints,
Long endTime,
Authorizations authorizations)
Gets all edges on the graph.
|
protected abstract GraphMetadataStore |
getGraphMetadataStore() |
IdGenerator |
getIdGenerator()
Gets the id generator used by this graph to create ids.
|
GraphRestore |
getRestoreTool() |
SearchIndex |
getSearchIndex() |
SearchIndexSecurityGranularity |
getSearchIndexSecurityGranularity()
Gets the granularity of the search index
SearchIndexSecurityGranularity |
Map<Object,Long> |
getVertexPropertyCountByValue(String propertyName,
Authorizations authorizations)
Gets the number of times a property with a given value occurs on vertices
|
abstract Iterable<Vertex> |
getVertices(FetchHints fetchHints,
Long endTime,
Authorizations authorizations)
Gets all vertices on the graph.
|
boolean |
isFieldBoostSupported()
Determine if field boost is support.
|
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.
|
abstract EdgeBuilder |
prepareEdge(String edgeId,
Vertex outVertex,
Vertex inVertex,
String label,
Long timestamp,
Visibility visibility)
Prepare an edge to be added to the graph.
|
VertexBuilder |
prepareVertex(Long timestamp,
Visibility visibility,
String conceptType)
Prepare a vertex to be added to the graph.
|
abstract VertexBuilder |
prepareVertex(String vertexId,
Long timestamp,
Visibility visibility,
String conceptType)
Prepare a vertex to be added to the graph.
|
GraphQuery |
query(Authorizations authorizations)
Creates a query builder object used to query the graph.
|
MultiVertexQuery |
query(String[] vertexIds,
Authorizations authorizations)
Creates a query builder object used to query a list of vertices.
|
MultiVertexQuery |
query(String[] vertexIds,
String queryString,
Authorizations authorizations)
Creates a query builder object used to query a list of vertices.
|
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.
|
void |
reindex(Authorizations authorizations)
Reindex all vertices and edges.
|
protected void |
reindexVertices(Authorizations authorizations) |
Iterable<Element> |
saveElementMutations(Iterable<ElementMutation<? extends Element>> mutations,
Authorizations authorizations)
Saves multiple mutations with a single call.
|
protected void |
setup() |
protected void |
setupGraphMetadata() |
protected void |
setupGraphMetadata(GraphMetadataEntry graphMetadataEntry) |
void |
shutdown()
Cleans up or disconnects from the underlying storage.
|
abstract void |
softDeleteEdge(Edge edge,
Long timestamp,
Authorizations authorizations)
Soft deletes an edge 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.
|
addGraphEventListener, addToPropertyDefinitionCache, clearPropertyDefinitionCache, createAuthorizations, deleteAllExtendedDataForElement, dumpGraph, ensurePropertyDefined, filterEdgeIdsByAuthorization, filterVertexIdsByAuthorization, findPaths, findPathsRecursive, findPathsSetIntersection, fireGraphEvent, getAllExtendedData, getExtendedData, getExtendedDataForElements, getExtendedDataInRange, getMetadata, getMetadata, getMetadataWithPrefix, getMetricsRegistry, getPropertyDefinition, getPropertyDefinitions, getValueType, hasEventListeners, invalidatePropertyDefinition, isPropertyDefined, orderMutations, reloadMetadata, removeGraphEventListener, removeMetadata, removePropertyDefinition, savePropertyDefinition, setMetadataclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitflushGraphaddEdge, addEdge, addEdge, addEdge, addGraphEventListener, addVertex, addVertex, addVertices, createAuthorizations, createAuthorizations, createAuthorizations, defineProperty, deleteEdge, deleteElement, deleteElements, deleteExtendedDataRow, deleteVertex, doEdgesExist, doEdgesExist, doesEdgeExist, doesVertexExist, doVerticesExist, dumpGraph, ensurePropertyDefined, filterEdgeIdsByAuthorization, filterVertexIdsByAuthorization, findPaths, findPaths, findPaths, findPaths, findPaths, findRelatedEdgeIds, findRelatedEdgeIds, findRelatedEdgeIdsForVertices, findRelatedEdges, findRelatedEdges, findRelatedEdgeSummary, findRelatedEdgeSummary, findRelatedEdgeSummaryForVertices, getEdge, getEdge, getEdge, getEdgeCount, getEdges, getEdges, getEdges, getEdges, getEdges, getEdgesInRange, getEdgesInRange, getEdgesInRange, getElement, getElement, getExtendedData, getExtendedData, getExtendedData, getExtendedData, getExtendedData, getExtendedData, getExtendedData, getExtendedDataForElements, getExtendedDataForElements, getExtendedDataForElements, getExtendedDataForElements, getExtendedDataInRange, getMetadata, getMetadata, getMetadataWithPrefix, getMetricsRegistry, getNameSubstitutionStrategy, getPropertyDefinition, getPropertyDefinitions, getStreamingPropertyValueInputStreams, getVertex, getVertex, getVertex, getVertexCount, getVertexIds, getVertices, getVertices, getVertices, getVertices, getVertices, getVerticesInOrder, getVerticesInOrder, getVerticesInRange, getVerticesInRange, getVerticesInRange, getVerticesWithPrefix, getVerticesWithPrefix, getVerticesWithPrefix, isPropertyDefined, prepareEdge, prepareEdge, prepareEdge, prepareEdge, prepareVertex, prepareVertex, reloadMetadata, removeGraphEventListener, removeMetadata, removePropertyDefinition, savePropertyDefinition, setMetadata, softDeleteEdge, softDeleteEdge, softDeleteEdge, softDeleteVertex, softDeleteVertex, softDeleteVertex, visit, visitEdges, visitElements, visitVerticespublic static final String METADATA_ID_GENERATOR_CLASSNAME
protected GraphBaseWithSearchIndex(GraphConfiguration configuration)
protected GraphBaseWithSearchIndex(GraphConfiguration configuration, IdGenerator idGenerator, SearchIndex searchIndex)
protected void setup()
protected void setupGraphMetadata()
protected void setupGraphMetadata(GraphMetadataEntry graphMetadataEntry)
public GraphQuery query(Authorizations authorizations)
Graphpublic GraphQuery query(String queryString, Authorizations authorizations)
Graphquery in interface Graphquery in class GraphBasequeryString - 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 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 MultiVertexQuery query(String[] vertexIds, Authorizations authorizations)
Graphpublic boolean isQuerySimilarToTextSupported()
GraphisQuerySimilarToTextSupported in interface GraphisQuerySimilarToTextSupported in class GraphBasepublic SimilarToGraphQuery querySimilarTo(String[] fields, String text, Authorizations authorizations)
GraphquerySimilarTo in interface GraphquerySimilarTo in class GraphBasefields - The fields to match against.text - The text to find similar to.authorizations - The authorizations required to load the elements.public IdGenerator getIdGenerator()
GraphgetIdGenerator in interface Graphpublic GraphConfiguration getConfiguration()
public SearchIndex getSearchIndex()
getSearchIndex in interface GraphWithSearchIndexpublic void reindex(Authorizations authorizations)
Graphprotected void reindexVertices(Authorizations authorizations)
public void flush()
Graphpublic void shutdown()
Graphpublic abstract void drop()
Graphpublic boolean isFieldBoostSupported()
GraphisFieldBoostSupported in interface GraphisFieldBoostSupported in class GraphBasepublic SearchIndexSecurityGranularity getSearchIndexSecurityGranularity()
GraphSearchIndexSecurityGranularitygetSearchIndexSecurityGranularity in interface GraphgetSearchIndexSecurityGranularity in class GraphBasepublic 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 Iterable<Element> saveElementMutations(Iterable<ElementMutation<? extends Element>> mutations, Authorizations authorizations)
GraphsaveElementMutations in interface GraphsaveElementMutations in class GraphBasemutations - the mutations to saveauthorizations - the authorizations used during savepublic abstract VertexBuilder prepareVertex(String vertexId, Long timestamp, Visibility visibility, String conceptType)
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.conceptType - The concept to assign the new vertex.public abstract Iterable<Vertex> getVertices(FetchHints 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 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 VertexBuilder prepareVertex(Long timestamp, Visibility visibility, String conceptType)
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 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 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 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 abstract Iterable<Edge> getEdges(FetchHints fetchHints, Long endTime, Authorizations authorizations)
Graphprotected abstract GraphMetadataStore getGraphMetadataStore()
getGraphMetadataStore in class GraphBasepublic 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 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 FetchHints getDefaultFetchHints()
GraphgetDefaultFetchHints in interface Graphpublic String getBackupDir()
public GraphBackup getBackupTool(String outputFile)
public GraphRestore getRestoreTool()
Copyright © 2016–2021 MWARE SOLUTIONS. All rights reserved.