public interface TitanGraph
extends com.tinkerpop.blueprints.Graph, com.tinkerpop.blueprints.KeyIndexableGraph, com.tinkerpop.blueprints.ThreadedTransactionalGraph
TitanFactory to open and configure TitanGraph instances.TitanFactory,
TitanTransaction| Modifier and Type | Method and Description |
|---|---|
TitanVertex |
addVertex(VertexLabel vertexLabel)
Creates a new vertex in the graph with the given vertex label.
|
TransactionBuilder |
buildTransaction()
Returns a
TransactionBuilder to construct a new thread-independent TitanTransaction. |
boolean |
containsVertexLabel(String name)
Whether a vertex label with the given name exists in the graph.
|
TitanManagement |
getManagementSystem()
Returns the management system for this graph instance.
|
RelationType |
getRelationType(String name)
Returns the
RelationType uniquely identified by the given name, or NULL if such does not exist. |
VertexLabel |
getVertexLabel(String name)
Returns the vertex label with the given name.
|
TitanIndexQuery |
indexQuery(String indexName,
String query)
Returns a
TitanIndexQuery to query for vertices or edges against the specified indexing backend using
the given query string. |
boolean |
isOpen()
Checks whether the graph is still open.
|
EdgeLabelMaker |
makeEdgeLabel(String name)
Returns a
EdgeLabelMaker instance to define a new EdgeLabel with the given name. |
PropertyKeyMaker |
makePropertyKey(String name)
Returns a
PropertyKeyMaker instance to define a new PropertyKey with the given name. |
VertexLabelMaker |
makeVertexLabel(String name)
Returns a
VertexLabelMaker to define a new vertex label with the given name. |
TitanMultiVertexQuery |
multiQuery(Collection<TitanVertex> vertices)
Returns a
TitanMultiVertexQuery to query for vertices or edges on multiple vertices simultaneously. |
TitanMultiVertexQuery |
multiQuery(TitanVertex... vertices)
Returns a
TitanMultiVertexQuery to query for vertices or edges on multiple vertices simultaneously. |
TitanTransaction |
newTransaction()
Opens a new thread-independent
TitanTransaction. |
TitanGraphQuery<? extends TitanGraphQuery> |
query()
Returns a
TitanGraphQuery to query for vertices or edges in the graph by their properties. |
void |
shutdown()
Closes the graph database.
|
createKeyIndex, dropKeyIndex, getIndexedKeysTitanTransaction newTransaction()
TitanTransaction.
The transaction is open when it is returned but MUST be explicitly closed by calling TitanTransaction.commit()
or TitanTransaction.rollback() when it is no longer needed.
Note, that this returns a thread independent transaction object. It is not necessary to call this method
to use Blueprint's standard transaction framework which will automatically start a transaction with the first
operation on the graph.newTransaction in interface com.tinkerpop.blueprints.ThreadedTransactionalGraphTransactionBuilder buildTransaction()
TransactionBuilder to construct a new thread-independent TitanTransaction.TransactionBuilder,
newTransaction()TitanManagement getManagementSystem()
boolean isOpen()
shutdown()void shutdown()
throws TitanException
shutdown in interface com.tinkerpop.blueprints.Graphshutdown in interface com.tinkerpop.blueprints.TransactionalGraphTitanException - if closing the graph database caused errors in the storage backendPropertyKeyMaker makePropertyKey(String name)
PropertyKeyMaker instance to define a new PropertyKey with the given name.
By defining types explicitly (rather than implicitly through usage) one can control various
aspects of the key and associated consistency constraints.
PropertyKeyMaker instancePropertyKeyMaker,
PropertyKeyEdgeLabelMaker makeEdgeLabel(String name)
EdgeLabelMaker instance to define a new EdgeLabel with the given name.
By defining types explicitly (rather than implicitly through usage) one can control various
aspects of the label and associated consistency constraints.
EdgeLabelMaker instanceEdgeLabelMaker,
EdgeLabelRelationType getRelationType(String name)
RelationType uniquely identified by the given name, or NULL if such does not exist.name - boolean containsVertexLabel(String name)
name - VertexLabel getVertexLabel(String name)
DefaultSchemaMaker.
Attempting to automatically create a vertex label might cause an exception depending on the configuration.name - VertexLabelMaker makeVertexLabel(String name)
VertexLabelMaker to define a new vertex label with the given name. Note, that the name must
be unique.name - TitanVertex addVertex(VertexLabel vertexLabel)
TitanGraphQuery<? extends TitanGraphQuery> query()
TitanGraphQuery to query for vertices or edges in the graph by their properties.query in interface com.tinkerpop.blueprints.GraphTitanIndexQuery indexQuery(String indexName, String query)
TitanIndexQuery to query for vertices or edges against the specified indexing backend using
the given query string. The query string is analyzed and answered by the underlying storage backend.
Note, that using indexQuery may ignore modifications in the current transaction, i.e. the query is not transactionally
bound.indexName - Name of the indexing backend to query as configuredquery - Query stringTitanMultiVertexQuery multiQuery(TitanVertex... vertices)
TitanMultiVertexQuery to query for vertices or edges on multiple vertices simultaneously.
This is similar to TitanVertex.query() but for multiple vertices at once. Hence, this query method is often
significantly faster when executing identical TitanVertexQuery on multiple vertices.vertices - TitanMultiVertexQuery multiQuery(Collection<TitanVertex> vertices)
TitanMultiVertexQuery to query for vertices or edges on multiple vertices simultaneously.
This is similar to TitanVertex.query() but for multiple vertices at once. Hence, this query method is often
significantly faster when executing identical TitanVertexQuery on multiple vertices.vertices - Copyright © 2012–2014. All rights reserved.