com.thinkaurelius.titan.core

## Interface TitanGraph

- All Superinterfaces:
    com.tinkerpop.blueprints.Graph, com.tinkerpop.blueprints.KeyIndexableGraph, com.tinkerpop.blueprints.ThreadedTransactionalGraph, com.tinkerpop.blueprints.TransactionalGraph
  All Known Implementing Classes:
    StandardTitanGraph, TitanBlueprintsGraph

      public interface TitanGraph
      extends com.tinkerpop.blueprints.Graph, com.tinkerpop.blueprints.KeyIndexableGraph, com.tinkerpop.blueprints.ThreadedTransactionalGraph

  Titan graph database implementation of the Blueprint's interface. Use `TitanFactory` to open and configure TitanGraph instances.
  Author:
    Matthias Bröcheler (http://www.matthiasb.com)
  See Also:
    `TitanFactory`, `TitanTransaction`

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.tinkerpop.blueprints.TransactionalGraph

      `com.tinkerpop.blueprints.TransactionalGraph.Conclusion`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `TitanVertex` | `addVertexWithLabel(String vertexLabel)` Creates a new vertex in the graph with the vertex label named by the argument.
    `TitanVertex` | `addVertexWithLabel(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` | `containsRelationType(String name)` Checks whether a type with the specified name exists.
    `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.
    `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.

    - ### Methods inherited from interface com.tinkerpop.blueprints.KeyIndexableGraph

      `createKeyIndex, dropKeyIndex, getIndexedKeys`

    - ### Methods inherited from interface com.tinkerpop.blueprints.TransactionalGraph

      `commit, rollback, stopTransaction`

    - ### Methods inherited from interface com.tinkerpop.blueprints.Graph

      `addEdge, addVertex, getEdge, getEdges, getEdges, getFeatures, getVertex, getVertices, getVertices, removeEdge, removeVertex`

- - ### Method Detail

    - #### newTransaction

          TitanTransaction newTransaction()

      Opens a new thread-independent `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.
      Specified by:
        `newTransaction` in interface `com.tinkerpop.blueprints.ThreadedTransactionalGraph`
      Returns:
        Transaction object representing a transactional context.

    - #### buildTransaction

          TransactionBuilder buildTransaction()

      Returns a `TransactionBuilder` to construct a new thread-independent `TitanTransaction`.
      Returns:
        a new TransactionBuilder
      See Also:
        `TransactionBuilder`, `newTransaction()`

    - #### getManagementSystem

          TitanManagement getManagementSystem()

      Returns the management system for this graph instance. The management system provides functionality to change global configuration options, install indexes and inspect the graph schema.

      The management system operates in its own transactional context which must be explicitly closed.
      Returns:

    - #### isOpen

          boolean isOpen()

      Checks whether the graph is still open.
      Returns:
        true, if the graph is open, else false.
      See Also:
        `shutdown()`

    - #### shutdown

          void shutdown()
                        throws TitanException

      Closes the graph database.

      Closing the graph database causes a disconnect and possible closing of the underlying storage backend and a release of all occupied resources by this graph database. Closing a graph database requires that all open thread-independent transactions have been closed - otherwise they will be left abandoned.
      Specified by:
        `shutdown` in interface `com.tinkerpop.blueprints.Graph`
      Specified by:
        `shutdown` in interface `com.tinkerpop.blueprints.TransactionalGraph`
      Throws:
        `TitanException` - if closing the graph database caused errors in the storage backend

    - #### containsRelationType

          boolean containsRelationType(String name)

      Checks whether a type with the specified name exists.
      Parameters:
        `name` - name of the type
      Returns:
        true, if a type with the given name exists, else false

    - #### getRelationType

          RelationType getRelationType(String name)

      Returns the `RelationType` uniquely identified by the given name, or NULL if such does not exist.
      Parameters:
        `name` -
      Returns:

    - #### containsVertexLabel

          boolean containsVertexLabel(String name)

      Whether a vertex label with the given name exists in the graph.
      Parameters:
        `name` -
      Returns:

    - #### getVertexLabel

          VertexLabel getVertexLabel(String name)

      Returns the vertex label with the given name. If a vertex label with this name does not exist, the label is automatically created through the registered `DefaultSchemaMaker`.

      Attempting to automatically create a vertex label might cause an exception depending on the configuration.
      Parameters:
        `name` -
      Returns:

    - #### addVertexWithLabel

          TitanVertex addVertexWithLabel(String vertexLabel)

      Creates a new vertex in the graph with the vertex label named by the argument.
      Parameters:
        `vertexLabel` - the name of the vertex label to use
      Returns:
        a new vertex in the graph created in the context of the current transaction

    - #### addVertexWithLabel

          TitanVertex addVertexWithLabel(VertexLabel vertexLabel)

      Creates a new vertex in the graph with the given vertex label.
      Parameters:
        `vertexLabel` - the vertex label which will apply to the new vertex
      Returns:
        a new vertex in the graph created in the context of the current transaction

    - #### query

          TitanGraphQuery<? extends TitanGraphQuery> query()

      Returns a `TitanGraphQuery` to query for vertices or edges in the graph by their properties.
      Specified by:
        `query` in interface `com.tinkerpop.blueprints.Graph`
      Returns:

    - #### indexQuery

          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. 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.
      Parameters:
        `indexName` - Name of the indexing backend to query as configured
        `query` - Query string
      Returns:
        TitanIndexQuery object to query the index directly

    - #### multiQuery

          TitanMultiVertexQuery multiQuery(TitanVertex... vertices)

      Returns a `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.
      Parameters:
        `vertices` -
      Returns:

    - #### multiQuery

          TitanMultiVertexQuery multiQuery(Collection<TitanVertex> vertices)

      Returns a `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.
      Parameters:
        `vertices` -
      Returns:

Copyright © 2012–2014. All rights reserved.