com.thinkaurelius.titan.graphdb.fulgora

## Class FulgoraNeighborVertex

- java.lang.Object
- - com.thinkaurelius.titan.graphdb.fulgora.FulgoraNeighborVertex

- All Implemented Interfaces:
    Idfiable, TitanElement, TitanVertex, InternalElement, InternalVertex, Removable, com.tinkerpop.blueprints.Element, com.tinkerpop.blueprints.Vertex

      public class FulgoraNeighborVertex
      extends Object
      implements InternalVertex

  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FulgoraNeighborVertex(long id, com.thinkaurelius.titan.graphdb.fulgora.FulgoraExecutor executor)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `TitanEdge` | `addEdge(EdgeLabel label, TitanVertex vertex)` Creates a new edge incident on this vertex.
    `TitanEdge` | `addEdge(String label, TitanVertex vertex)` Creates a new edge incident on this vertex.
    `com.tinkerpop.blueprints.Edge` | `addEdge(String s, com.tinkerpop.blueprints.Vertex vertex)`
    `TitanProperty` | `addProperty(PropertyKey key, Object attribute)` Creates a new property for this vertex and given key with the specified value.
    `TitanProperty` | `addProperty(String key, Object attribute)` Creates a new property for this vertex and given key with the specified value.
    `boolean` | `addRelation(InternalRelation e)` Add a new relation to the vertex
    `List<InternalRelation>` | `getAddedRelations(com.google.common.base.Predicate<InternalRelation> query)` Returns an iterable over all newly added relations incident on this vertex that match the given predicate
    `long` | `getEdgeCount()` Returns the number of edges incident on this vertex.
    `Iterable<TitanEdge>` | `getEdges()` Returns an iterable over all edges incident on this vertex.
    `Iterable<com.tinkerpop.blueprints.Edge>` | `getEdges(com.tinkerpop.blueprints.Direction d, String... labels)` Returns an iterable over all edges of the specified edge label in the given direction incident on this vertex.
    `Object` | `getId()` Returns a unique identifier for this entity.
    `String` | `getLabel()` Returns the name of the vertex label for this vertex.
    `byte` | `getLifeCycle()`
    `long` | `getLongId()` Unique identifier for this entity.
    `Iterable<TitanProperty>` | `getProperties()` Returns an iterable over all properties incident on this vertex.
    `Iterable<TitanProperty>` | `getProperties(PropertyKey key)` Returns an iterable over all properties of the specified property key incident on this vertex.
    `Iterable<TitanProperty>` | `getProperties(String key)` Returns an iterable over all properties of the specified property key incident on this vertex.
    `<O> O` | `getProperty(PropertyKey key)` Retrieves the value associated with the given key on this vertex and casts it to the specified type.
    `<A> A` | `getProperty(String key)` Retrieves the value associated with the given key on this vertex and casts it to the specified type.
    `long` | `getPropertyCount()` Returns the number of properties incident on this vertex.
    `Set<String>` | `getPropertyKeys()`
    `Iterable<TitanRelation>` | `getRelations()` Returns an iterable over all relations incident on this vertex.
    `Iterable<TitanEdge>` | `getTitanEdges(com.tinkerpop.blueprints.Direction d, EdgeLabel... labels)` Returns an iterable over all edges of the specified edge label in the given direction incident on this vertex.
    `VertexLabel` | `getVertexLabel()` Returns the vertex label of this vertex.
    `Iterable<com.tinkerpop.blueprints.Vertex>` | `getVertices(com.tinkerpop.blueprints.Direction direction, String... strings)`
    `boolean` | `hasAddedRelations()` Whether this vertex has added relations
    `boolean` | `hasId()` Checks whether this entity has a unique identifier.
    `boolean` | `hasLoadedRelations(SliceQuery query)` Returns true if the results for the given query have already been loaded for this vertex and are locally cached.
    `boolean` | `hasRemovedRelations()` Whether this vertex has removed relations
    `boolean` | `isConnected()` Checks whether this vertex has at least one incident edge.
    `boolean` | `isHidden()` Whether this element is hidden and should only be returned to queries that explicitly ask for hidden elements.
    `boolean` | `isLoaded()` Checks whether this entity has been loaded into the current transaction and not yet modified.
    `boolean` | `isModified()` Checks whether this entity has been loaded into the current transaction and modified.
    `boolean` | `isNew()` Checks whether this entity has been newly created in the current transaction.
    `boolean` | `isRemoved()` Checks whether this entity has been deleted into the current transaction.
    `InternalVertex` | `it()` Returns this element in the context of the current transaction.
    `EntryList` | `loadRelations(SliceQuery query, Retriever<SliceQuery,EntryList> lookup)` Returns all relations that match the given query.
    `VertexCentricQueryBuilder` | `query()` Starts a new `TitanVertexQuery` for this vertex.
    `void` | `remove()` Deletes this entity and any incident edges or properties from the graph.
    `<O> O` | `removeProperty(RelationType type)` Removes the value associated with the given key for this vertex (if exists).
    `<O> O` | `removeProperty(String key)` Removes the value associated with the given key for this vertex (if exists).
    `void` | `removeRelation(InternalRelation e)` Deleted relation e from the adjacency list of this vertex and updates the state of the vertex to reflect the modification.
    `void` | `setId(long id)`
    `void` | `setProperty(PropertyKey key, Object value)` Sets the value for the given key on this element.
    `void` | `setProperty(String key, Object value)` Sets the value for the given key on this element.
    `StandardTitanTx` | `tx()` Returns the transaction to which the element is currently bound or should be refreshed into

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

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

- - ### Constructor Detail

    - #### FulgoraNeighborVertex

          public FulgoraNeighborVertex(long id,
                               com.thinkaurelius.titan.graphdb.fulgora.FulgoraExecutor executor)

  - ### Method Detail

    - #### getProperty

          public <A> A getProperty(String key)

      Description copied from interface: `TitanElement`
      Retrieves the value associated with the given key on this vertex and casts it to the specified type. If the key has cardinality SINGLE, then there can be at most one value and this value is returned (or null). Otherwise a list of all associated values is returned, or an empty list if non exist.

      Specified by:
        `getProperty` in interface `TitanElement`
      Specified by:
        `getProperty` in interface `com.tinkerpop.blueprints.Element`
      Parameters:
        `key` - string identifying a key
      Returns:
        value or list of values associated with key

    - #### getProperty

          public <O> O getProperty(PropertyKey key)

      Description copied from interface: `TitanElement`
      Retrieves the value associated with the given key on this vertex and casts it to the specified type. If the key has cardinality SINGLE, then there can be at most one value and this value is returned (or null). Otherwise a list of all associated values is returned, or an empty list if non exist.

      Specified by:
        `getProperty` in interface `TitanElement`
      Parameters:
        `key` - key
      Returns:
        value or list of values associated with key

    - #### getLabel

          public String getLabel()

      Description copied from interface: `TitanVertex`
      Returns the name of the vertex label for this vertex.
      Specified by:
        `getLabel` in interface `TitanVertex`
      Returns:

    - #### getVertexLabel

          public VertexLabel getVertexLabel()

      Description copied from interface: `TitanVertex`
      Returns the vertex label of this vertex.
      Specified by:
        `getVertexLabel` in interface `TitanVertex`
      Returns:

    - #### isNew

          public boolean isNew()

      Description copied from interface: `TitanElement`
      Checks whether this entity has been newly created in the current transaction.
      Specified by:
        `isNew` in interface `TitanElement`
      Returns:
        True, if entity has been newly created, else false.

    - #### isLoaded

          public boolean isLoaded()

      Description copied from interface: `TitanElement`
      Checks whether this entity has been loaded into the current transaction and not yet modified.
      Specified by:
        `isLoaded` in interface `TitanElement`
      Returns:
        True, has been loaded and not modified, else false.

    - #### isRemoved

          public boolean isRemoved()

      Description copied from interface: `TitanElement`
      Checks whether this entity has been deleted into the current transaction.
      Specified by:
        `isRemoved` in interface `TitanElement`
      Returns:
        True, has been deleted, else false.

    - #### getId

          public Object getId()

      Description copied from interface: `TitanElement`
      Returns a unique identifier for this entity.

      The unique identifier may only be set when the transaction in which entity is created commits. The Graph Configuration Wiki explains how to configure when entity ids are assigned. Some entities are never assigned a unique identifier if they depend on a parent entity.

      Specified by:
        `getId` in interface `TitanElement`
      Specified by:
        `getId` in interface `com.tinkerpop.blueprints.Element`
      Returns:
        The unique identifier for this entity
      See Also:
        `TitanElement.hasId()`

    - #### getLongId

          public long getLongId()

      Description copied from interface: `TitanElement`
      Unique identifier for this entity. This id can be temporarily assigned and might change. Use `TitanElement.getId()` for the permanent id.
      Specified by:
        `getLongId` in interface `Idfiable`
      Specified by:
        `getLongId` in interface `TitanElement`
      Returns:
        Unique long id

    - #### hasId

          public boolean hasId()

      Description copied from interface: `TitanElement`
      Checks whether this entity has a unique identifier.

      Note that some entities may never be assigned an identifier and others will only be assigned an identifier at the end of a transaction.
      Specified by:
        `hasId` in interface `TitanElement`
      Returns:
        true if this entity has been assigned a unique id, else false
      See Also:
        `TitanElement.getLongId()`

    - #### getPropertyKeys

          public Set<String> getPropertyKeys()

      Specified by:
        `getPropertyKeys` in interface `com.tinkerpop.blueprints.Element`

    - #### removeProperty

          public <O> O removeProperty(String key)

      Description copied from interface: `TitanElement`
      Removes the value associated with the given key for this vertex (if exists).
      Specified by:
        `removeProperty` in interface `TitanElement`
      Specified by:
        `removeProperty` in interface `com.tinkerpop.blueprints.Element`
      Parameters:
        `key` - the string identifying the key
      Returns:
        the object value associated with that key prior to removal, or NULL if such does not exist.
      See Also:
        `TitanElement.removeProperty(RelationType)`

    - #### removeProperty

          public <O> O removeProperty(RelationType type)

      Description copied from interface: `TitanElement`
      Removes the value associated with the given key for this vertex (if exists). If the key is list-valued then all values associated with this key are removed and only the last removed value returned.
      Specified by:
        `removeProperty` in interface `TitanElement`
      Parameters:
        `type` - the key
      Returns:
        the object value associated with that key prior to removal, or NULL if such does not exist.

    - #### remove

          public void remove()

      Description copied from interface: `TitanElement`
      Deletes this entity and any incident edges or properties from the graph.

      Specified by:
        `remove` in interface `TitanElement`
      Specified by:
        `remove` in interface `Removable`
      Specified by:
        `remove` in interface `com.tinkerpop.blueprints.Element`

    - #### setProperty

          public void setProperty(String key,
                         Object value)

      Description copied from interface: `TitanElement`
      Sets the value for the given key on this element. The key must be defined to have `Cardinality.SINGLE`, otherwise this method throws an exception.
      Specified by:
        `setProperty` in interface `TitanElement`
      Specified by:
        `setProperty` in interface `com.tinkerpop.blueprints.Element`
      Parameters:
        `key` - the string identifying the key
        `value` - the object value

    - #### setProperty

          public void setProperty(PropertyKey key,
                         Object value)

      Description copied from interface: `TitanElement`
      Sets the value for the given key on this element. The key must be defined to have `Cardinality.SINGLE`, otherwise this method throws an exception.
      Specified by:
        `setProperty` in interface `TitanElement`
      Parameters:
        `key` - the key
        `value` - the object value

    - #### it

          public InternalVertex it()

      Description copied from interface: `InternalElement`
      Returns this element in the context of the current transaction.
      Specified by:
        `it` in interface `InternalElement`
      Specified by:
        `it` in interface `InternalVertex`
      Returns:

    - #### tx

          public StandardTitanTx tx()

      Description copied from interface: `InternalElement`
      Returns the transaction to which the element is currently bound or should be refreshed into
      Specified by:
        `tx` in interface `InternalElement`
      Returns:

    - #### setId

          public void setId(long id)

      Specified by:
        `setId` in interface `InternalElement`

    - #### getLifeCycle

          public byte getLifeCycle()

      Specified by:
        `getLifeCycle` in interface `InternalElement`
      Returns:
        The lifecycle of this element
      See Also:
        `ElementLifeCycle`

    - #### isHidden

          public boolean isHidden()

      Description copied from interface: `InternalElement`
      Whether this element is hidden and should only be returned to queries that explicitly ask for hidden elements.
      Specified by:
        `isHidden` in interface `InternalElement`
      Returns:

    - #### removeRelation

          public void removeRelation(InternalRelation e)

      Description copied from interface: `InternalVertex`
      Deleted relation e from the adjacency list of this vertex and updates the state of the vertex to reflect the modification. Note that this method tolerates the prior removal of the vertex and hence does not throw an exception if the relation could not actually be removed from the adjacency list. This behavior was chosen to allow relation deletion while iterating over the list of adjacent relations, in which case the relation deletion is taken care of by the iterator and only vertex status update needs to be executed.
      Specified by:
        `removeRelation` in interface `InternalVertex`
      Parameters:
        `e` - TitanRelation to be removed

    - #### addRelation

          public boolean addRelation(InternalRelation e)

      Description copied from interface: `InternalVertex`
      Add a new relation to the vertex
      Specified by:
        `addRelation` in interface `InternalVertex`
      Returns:

    - #### getAddedRelations

          public List<InternalRelation> getAddedRelations(com.google.common.base.Predicate<InternalRelation> query)

      Description copied from interface: `InternalVertex`
      Returns an iterable over all newly added relations incident on this vertex that match the given predicate
      Specified by:
        `getAddedRelations` in interface `InternalVertex`
      Returns:

    - #### loadRelations

          public EntryList loadRelations(SliceQuery query,
                                Retriever<SliceQuery,EntryList> lookup)

      Description copied from interface: `InternalVertex`
      Returns all relations that match the given query. If these matching relations are not currently held in memory, it uses the given `Retriever` to retrieve the edges from backend storage.
      Specified by:
        `loadRelations` in interface `InternalVertex`
      Returns:

    - #### hasLoadedRelations

          public boolean hasLoadedRelations(SliceQuery query)

      Description copied from interface: `InternalVertex`
      Returns true if the results for the given query have already been loaded for this vertex and are locally cached.
      Specified by:
        `hasLoadedRelations` in interface `InternalVertex`
      Returns:

    - #### hasRemovedRelations

          public boolean hasRemovedRelations()

      Description copied from interface: `InternalVertex`
      Whether this vertex has removed relations
      Specified by:
        `hasRemovedRelations` in interface `InternalVertex`
      Returns:

    - #### hasAddedRelations

          public boolean hasAddedRelations()

      Description copied from interface: `InternalVertex`
      Whether this vertex has added relations
      Specified by:
        `hasAddedRelations` in interface `InternalVertex`
      Returns:

    - #### addEdge

          public TitanEdge addEdge(EdgeLabel label,
                          TitanVertex vertex)

      Description copied from interface: `TitanVertex`
      Creates a new edge incident on this vertex.

      Creates and returns a new `TitanEdge` of the specified label with this vertex being the outgoing vertex and the given vertex being the incoming vertex.
      Specified by:
        `addEdge` in interface `TitanVertex`
      Parameters:
        `label` - label of the edge to be created
        `vertex` - incoming vertex of the edge to be created
      Returns:
        new edge

    - #### addEdge

          public TitanEdge addEdge(String label,
                          TitanVertex vertex)

      Description copied from interface: `TitanVertex`
      Creates a new edge incident on this vertex.

      Creates and returns a new `TitanEdge` of the specified label with this vertex being the outgoing vertex and the given vertex being the incoming vertex.
      Automatically creates the edge label if it does not exist and automatic creation of types is enabled. Otherwise, this method with throw an `IllegalArgumentException`.
      Specified by:
        `addEdge` in interface `TitanVertex`
      Parameters:
        `label` - label of the edge to be created
        `vertex` - incoming vertex of the edge to be created
      Returns:
        new edge

    - #### addProperty

          public TitanProperty addProperty(PropertyKey key,
                                  Object attribute)

      Description copied from interface: `TitanVertex`
      Creates a new property for this vertex and given key with the specified value.

      Creates and returns a new `TitanProperty` for the given key on this vertex with the specified object being the value.
      Specified by:
        `addProperty` in interface `TitanVertex`
      Parameters:
        `key` - key of the property to be created
        `attribute` - value of the property to be created
      Returns:
        New property

    - #### addProperty

          public TitanProperty addProperty(String key,
                                  Object attribute)

      Description copied from interface: `TitanVertex`
      Creates a new property for this vertex and given key with the specified value.

      Creates and returns a new `TitanProperty` for the given key on this vertex with the specified object being the value.
      Automatically creates the property key if it does not exist and automatic creation of types is enabled. Otherwise, this method with throw an `IllegalArgumentException`.
      Specified by:
        `addProperty` in interface `TitanVertex`
      Parameters:
        `key` - key of the property to be created
        `attribute` - value of the property to be created
      Returns:
        New property

    - #### query

          public VertexCentricQueryBuilder query()

      Description copied from interface: `TitanVertex`
      Starts a new `TitanVertexQuery` for this vertex.

      Initializes and returns a new `TitanVertexQuery` based on this vertex.
      Specified by:
        `query` in interface `TitanVertex`
      Specified by:
        `query` in interface `InternalVertex`
      Specified by:
        `query` in interface `com.tinkerpop.blueprints.Vertex`
      Returns:
        New TitanQuery for this vertex
      See Also:
        `TitanVertexQuery`

    - #### addEdge

          public com.tinkerpop.blueprints.Edge addEdge(String s,
                                              com.tinkerpop.blueprints.Vertex vertex)

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

    - #### getProperties

          public Iterable<TitanProperty> getProperties()

      Description copied from interface: `TitanVertex`
      Returns an iterable over all properties incident on this vertex.

      There is no guarantee concerning the order in which the properties are returned. All properties incident on this vertex are returned irrespective of their key.
      Specified by:
        `getProperties` in interface `TitanVertex`
      Returns:
        `Iterable` over all properties incident on this vertex

    - #### getProperties

          public Iterable<TitanProperty> getProperties(PropertyKey key)

      Description copied from interface: `TitanVertex`
      Returns an iterable over all properties of the specified property key incident on this vertex.

      There is no guarantee concerning the order in which the properties are returned. All returned properties are of the specified key.
      Specified by:
        `getProperties` in interface `TitanVertex`
      Parameters:
        `key` - `PropertyKey` of the returned properties
      Returns:
        `Iterable` over all properties of the specified key incident on this vertex

    - #### getProperties

          public Iterable<TitanProperty> getProperties(String key)

      Description copied from interface: `TitanVertex`
      Returns an iterable over all properties of the specified property key incident on this vertex.

      There is no guarantee concerning the order in which the properties are returned. All returned properties are of the specified key.
      Specified by:
        `getProperties` in interface `TitanVertex`
      Parameters:
        `key` - key of the returned properties
      Returns:
        `Iterable` over all properties of the specified key incident on this vertex

    - #### getTitanEdges

          public Iterable<TitanEdge> getTitanEdges(com.tinkerpop.blueprints.Direction d,
                                          EdgeLabel... labels)

      Description copied from interface: `TitanVertex`
      Returns an iterable over all edges of the specified edge label in the given direction incident on this vertex.

      There is no guarantee concerning the order in which the edges are returned. All returned edges have the given label and the direction of the edge from the perspective of this vertex matches the specified direction.
      Specified by:
        `getTitanEdges` in interface `TitanVertex`
      Parameters:
        `d` - Direction of the returned edges with respect to this vertex
        `labels` - label of the returned edges
      Returns:
        `Iterable` over all edges with the given label and direction incident on this vertex

    - #### getEdges

          public Iterable<com.tinkerpop.blueprints.Edge> getEdges(com.tinkerpop.blueprints.Direction d,
                                                         String... labels)

      Description copied from interface: `TitanVertex`
      Returns an iterable over all edges of the specified edge label in the given direction incident on this vertex.

      There is no guarantee concerning the order in which the edges are returned. All returned edges have the given label and the direction of the edge from the perspective of this vertex matches the specified direction.
      Specified by:
        `getEdges` in interface `TitanVertex`
      Specified by:
        `getEdges` in interface `com.tinkerpop.blueprints.Vertex`
      Parameters:
        `d` - Direction of the returned edges with respect to this vertex
        `labels` - label of the returned edges
      Returns:
        `Iterable` over all edges with the given label and direction incident on this vertex

    - #### getVertices

          public Iterable<com.tinkerpop.blueprints.Vertex> getVertices(com.tinkerpop.blueprints.Direction direction,
                                                              String... strings)

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

    - #### getEdges

          public Iterable<TitanEdge> getEdges()

      Description copied from interface: `TitanVertex`
      Returns an iterable over all edges incident on this vertex.

      There is no guarantee concerning the order in which the edges are returned.
      Specified by:
        `getEdges` in interface `TitanVertex`
      Returns:
        `Iterable` over all edges incident on this vertex

    - #### getRelations

          public Iterable<TitanRelation> getRelations()

      Description copied from interface: `TitanVertex`
      Returns an iterable over all relations incident on this vertex.

      There is no guarantee concerning the order in which the relations are returned. Note, that this method potentially returns both `TitanEdge` and `TitanProperty`.
      Specified by:
        `getRelations` in interface `TitanVertex`
      Returns:
        `Iterable` over all properties and edges incident on this vertex.

    - #### getEdgeCount

          public long getEdgeCount()

      Description copied from interface: `TitanVertex`
      Returns the number of edges incident on this vertex.

      Returns the total number of edges irrespective of label and direction. Note, that loop edges, i.e. edges with identical in- and outgoing vertex, are counted twice.
      Specified by:
        `getEdgeCount` in interface `TitanVertex`
      Returns:
        The number of edges incident on this vertex.

    - #### getPropertyCount

          public long getPropertyCount()

      Description copied from interface: `TitanVertex`
      Returns the number of properties incident on this vertex.

      Returns the total number of properties irrespective of key.
      Specified by:
        `getPropertyCount` in interface `TitanVertex`
      Returns:
        The number of properties incident on this vertex.

    - #### isConnected

          public boolean isConnected()

      Description copied from interface: `TitanVertex`
      Checks whether this vertex has at least one incident edge. In other words, it returns getEdgeCount()>0, but might be implemented more efficiently.
      Specified by:
        `isConnected` in interface `TitanVertex`
      Returns:
        true, if this vertex has at least one incident edge, else false

    - #### isModified

          public boolean isModified()

      Description copied from interface: `TitanVertex`
      Checks whether this entity has been loaded into the current transaction and modified.
      Specified by:
        `isModified` in interface `TitanVertex`
      Returns:
        True, has been loaded and modified, else false.

Copyright © 2012–2014. All rights reserved.