com.thinkaurelius.titan.graphdb.blueprints

## Class TitanBlueprintsGraph

- java.lang.Object
- - com.thinkaurelius.titan.graphdb.blueprints.TitanBlueprintsGraph

- All Implemented Interfaces:
    TitanGraph, com.tinkerpop.blueprints.Graph, com.tinkerpop.blueprints.KeyIndexableGraph, com.tinkerpop.blueprints.ThreadedTransactionalGraph, com.tinkerpop.blueprints.TransactionalGraph
  Direct Known Subclasses:
    StandardTitanGraph

      public abstract class TitanBlueprintsGraph
      extends Object
      implements TitanGraph

  Blueprints specific implementation for `TitanGraph`. Handles thread-bound transactions.
  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Nested Class Summary

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

      `com.tinkerpop.blueprints.TransactionalGraph.Conclusion`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TitanBlueprintsGraph()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `TitanEdge` | `addEdge(Object id, com.tinkerpop.blueprints.Vertex outVertex, com.tinkerpop.blueprints.Vertex inVertex, String label)`
    `TitanVertex` | `addVertex(Object id)`
    `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.
    `void` | `commit()`
    `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.
    `<T extends com.tinkerpop.blueprints.Element> void` | `createKeyIndex(String key, Class<T> elementClass, com.tinkerpop.blueprints.Parameter... indexParameters)`
    `<T extends com.tinkerpop.blueprints.Element> void` | `dropKeyIndex(String key, Class<T> elementClass)`
    `TitanTransaction` | `getCurrentThreadTx()`
    `TitanEdge` | `getEdge(Object id)`
    `Iterable<com.tinkerpop.blueprints.Edge>` | `getEdges()`
    `Iterable<com.tinkerpop.blueprints.Edge>` | `getEdges(String key, Object value)`
    `<T extends com.tinkerpop.blueprints.Element> Set<String>` | `getIndexedKeys(Class<T> elementClass)`
    `RelationType` | `getRelationType(String name)` Returns the `RelationType` uniquely identified by the given name, or NULL if such does not exist.
    `TitanVertex` | `getVertex(Object id)`
    `VertexLabel` | `getVertexLabel(String name)` Returns the vertex label with the given name.
    `Iterable<com.tinkerpop.blueprints.Vertex>` | `getVertices()`
    `Iterable<com.tinkerpop.blueprints.Vertex>` | `getVertices(String key, Object value)`
    `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.
    `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.
    `abstract TitanTransaction` | `newThreadBoundTransaction()`
    `TitanGraphQuery<? extends TitanGraphQuery>` | `query()` Returns a `TitanGraphQuery` to query for vertices or edges in the graph by their properties.
    `void` | `removeEdge(com.tinkerpop.blueprints.Edge edge)`
    `void` | `removeVertex(com.tinkerpop.blueprints.Vertex vertex)`
    `void` | `rollback()`
    `void` | `shutdown()` Closes the graph database.
    `void` | `stopTransaction(com.tinkerpop.blueprints.TransactionalGraph.Conclusion conclusion)` Deprecated.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.thinkaurelius.titan.core.TitanGraph

      `buildTransaction, getManagementSystem, isOpen, newTransaction`

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

      `getFeatures`

- - ### Constructor Detail

    - #### TitanBlueprintsGraph

          public TitanBlueprintsGraph()

  - ### Method Detail

    - #### commit

          public void commit()

      Specified by:
        `commit` in interface `com.tinkerpop.blueprints.TransactionalGraph`

    - #### rollback

          public void rollback()

      Specified by:
        `rollback` in interface `com.tinkerpop.blueprints.TransactionalGraph`

    - #### stopTransaction

          @Deprecated
          public void stopTransaction(com.tinkerpop.blueprints.TransactionalGraph.Conclusion conclusion)

      Deprecated.
      Specified by:
        `stopTransaction` in interface `com.tinkerpop.blueprints.TransactionalGraph`

    - #### newThreadBoundTransaction

          public abstract TitanTransaction newThreadBoundTransaction()

    - #### getCurrentThreadTx

          public TitanTransaction getCurrentThreadTx()

    - #### shutdown

          public void shutdown()

      Description copied from interface: `TitanGraph`
      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 `TitanGraph`
      Specified by:
        `shutdown` in interface `com.tinkerpop.blueprints.Graph`
      Specified by:
        `shutdown` in interface `com.tinkerpop.blueprints.TransactionalGraph`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### dropKeyIndex

          public <T extends com.tinkerpop.blueprints.Element> void dropKeyIndex(String key,
                                                                       Class<T> elementClass)

      Specified by:
        `dropKeyIndex` in interface `com.tinkerpop.blueprints.KeyIndexableGraph`

    - #### createKeyIndex

          public <T extends com.tinkerpop.blueprints.Element> void createKeyIndex(String key,
                                                                         Class<T> elementClass,
                                                                         com.tinkerpop.blueprints.Parameter... indexParameters)

      Specified by:
        `createKeyIndex` in interface `com.tinkerpop.blueprints.KeyIndexableGraph`

    - #### getIndexedKeys

          public <T extends com.tinkerpop.blueprints.Element> Set<String> getIndexedKeys(Class<T> elementClass)

      Specified by:
        `getIndexedKeys` in interface `com.tinkerpop.blueprints.KeyIndexableGraph`

    - #### addVertex

          public TitanVertex addVertex(Object id)

      Specified by:
        `addVertex` in interface `com.tinkerpop.blueprints.Graph`

    - #### getVertex

          public TitanVertex getVertex(Object id)

      Specified by:
        `getVertex` in interface `com.tinkerpop.blueprints.Graph`

    - #### removeVertex

          public void removeVertex(com.tinkerpop.blueprints.Vertex vertex)

      Specified by:
        `removeVertex` in interface `com.tinkerpop.blueprints.Graph`

    - #### getVertices

          public Iterable<com.tinkerpop.blueprints.Vertex> getVertices()

      Specified by:
        `getVertices` in interface `com.tinkerpop.blueprints.Graph`

    - #### containsRelationType

          public boolean containsRelationType(String name)

      Description copied from interface: `TitanGraph`
      Checks whether a type with the specified name exists.
      Specified by:
        `containsRelationType` in interface `TitanGraph`
      Parameters:
        `name` - name of the type
      Returns:
        true, if a type with the given name exists, else false

    - #### getRelationType

          public RelationType getRelationType(String name)

      Description copied from interface: `TitanGraph`
      Returns the `RelationType` uniquely identified by the given name, or NULL if such does not exist.
      Specified by:
        `getRelationType` in interface `TitanGraph`
      Returns:

    - #### containsVertexLabel

          public boolean containsVertexLabel(String name)

      Description copied from interface: `TitanGraph`
      Whether a vertex label with the given name exists in the graph.
      Specified by:
        `containsVertexLabel` in interface `TitanGraph`
      Returns:

    - #### getVertexLabel

          public VertexLabel getVertexLabel(String name)

      Description copied from interface: `TitanGraph`
      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.
      Specified by:
        `getVertexLabel` in interface `TitanGraph`
      Returns:

    - #### addVertexWithLabel

          public TitanVertex addVertexWithLabel(VertexLabel vertexLabel)

      Description copied from interface: `TitanGraph`
      Creates a new vertex in the graph with the given vertex label.
      Specified by:
        `addVertexWithLabel` in interface `TitanGraph`
      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

    - #### addVertexWithLabel

          public TitanVertex addVertexWithLabel(String vertexLabel)

      Description copied from interface: `TitanGraph`
      Creates a new vertex in the graph with the vertex label named by the argument.
      Specified by:
        `addVertexWithLabel` in interface `TitanGraph`
      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

    - #### query

          public TitanGraphQuery<? extends TitanGraphQuery> query()

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

    - #### indexQuery

          public TitanIndexQuery indexQuery(String indexName,
                                   String query)

      Description copied from interface: `TitanGraph`
      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.
      Specified by:
        `indexQuery` in interface `TitanGraph`
      Parameters:
        `indexName` - Name of the indexing backend to query as configured
        `query` - Query string
      Returns:
        TitanIndexQuery object to query the index directly

    - #### multiQuery

          public TitanMultiVertexQuery multiQuery(TitanVertex... vertices)

      Description copied from interface: `TitanGraph`
      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.
      Specified by:
        `multiQuery` in interface `TitanGraph`
      Returns:

    - #### multiQuery

          public TitanMultiVertexQuery multiQuery(Collection<TitanVertex> vertices)

      Description copied from interface: `TitanGraph`
      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.
      Specified by:
        `multiQuery` in interface `TitanGraph`
      Returns:

    - #### getVertices

          public Iterable<com.tinkerpop.blueprints.Vertex> getVertices(String key,
                                                              Object value)

      Specified by:
        `getVertices` in interface `com.tinkerpop.blueprints.Graph`

    - #### addEdge

          public TitanEdge addEdge(Object id,
                          com.tinkerpop.blueprints.Vertex outVertex,
                          com.tinkerpop.blueprints.Vertex inVertex,
                          String label)

      Specified by:
        `addEdge` in interface `com.tinkerpop.blueprints.Graph`

    - #### getEdge

          public TitanEdge getEdge(Object id)

      Specified by:
        `getEdge` in interface `com.tinkerpop.blueprints.Graph`

    - #### removeEdge

          public void removeEdge(com.tinkerpop.blueprints.Edge edge)

      Specified by:
        `removeEdge` in interface `com.tinkerpop.blueprints.Graph`

    - #### getEdges

          public Iterable<com.tinkerpop.blueprints.Edge> getEdges()

      Specified by:
        `getEdges` in interface `com.tinkerpop.blueprints.Graph`

    - #### getEdges

          public Iterable<com.tinkerpop.blueprints.Edge> getEdges(String key,
                                                         Object value)

      Specified by:
        `getEdges` in interface `com.tinkerpop.blueprints.Graph`

Copyright © 2012–2014. All rights reserved.