com.thinkaurelius.titan.graphdb.relations

## Class AbstractEdge

- java.lang.Object
- - com.thinkaurelius.titan.graphdb.internal.AbstractElement
  - - com.thinkaurelius.titan.graphdb.relations.AbstractTypedRelation
    - - com.thinkaurelius.titan.graphdb.relations.AbstractEdge

- All Implemented Interfaces:
    Idfiable, TitanEdge, TitanElement, TitanRelation, InternalElement, InternalRelation, Removable, com.tinkerpop.blueprints.Edge, com.tinkerpop.blueprints.Element, Comparable<TitanElement>
  Direct Known Subclasses:
    CacheEdge, StandardEdge

      public abstract class AbstractEdge
      extends AbstractTypedRelation
      implements TitanEdge

  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Property Summary

    Properties
    Type | Property and Description
    --- | ---
    `boolean` | `is` Checks whether this relation is a property.

  - ### Field Summary

    - ### Fields inherited from class com.thinkaurelius.titan.graphdb.relations.AbstractTypedRelation

      `type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractEdge(long id, EdgeLabel label, InternalVertex start, InternalVertex end)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getArity()` Number of vertices on this relation
    `EdgeLabel` | `getEdgeLabel()` Returns the edge label of this edge
    `String` | `getLabel()`
    `int` | `getLen()` Number of vertices on this relation that are aware of its existence
    `TitanVertex` | `getOtherVertex(TitanVertex vertex)` Returns the vertex at the opposite end of the edge.
    `TitanVertex` | `getVertex(com.tinkerpop.blueprints.Direction dir)` Returns the vertex for the specified direction.
    `InternalVertex` | `getVertex(int pos)` Returns the vertex at the given position (0=OUT, 1=IN) of this relation
    `boolean` | `isDirected()` Checks whether this relation is directed, i.e.
    `boolean` | `isEdge()` Checks whether this relation is an edge.
    `boolean` | `isProperty()` Checks whether this relation is a property.
    `boolean` | `isUnidirected()` Checks whether this relation is unidirected, i.e.
    `void` | `setVertexAt(int pos, InternalVertex vertex)`
    `String` | `toString()`

    - ### Methods inherited from class com.thinkaurelius.titan.graphdb.relations.AbstractTypedRelation

      `getDirection, getId, getProperty, getProperty, getProperty, getProperty, getPropertyKeys, getType, isHidden, isIncidentOn, isLoop, it, removeProperty, removeProperty, setProperty, setProperty, setProperty, tx`

    - ### Methods inherited from class com.thinkaurelius.titan.graphdb.internal.AbstractElement

      `clone, compare, compareTo, equals, getCompareId, getLongId, hashCode, hasId, isLoaded, isNew, isRemoved, isTemporaryId, setId`

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

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

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

      `getDirection, getProperty, getType, isIncidentOn, isLoop, setProperty`

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

      `getId, getLongId, getProperty, getProperty, hasId, isLoaded, isNew, isRemoved, remove, removeProperty, removeProperty, setProperty, setProperty`

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

      `getPropertyKeys`

    - ### Methods inherited from interface com.thinkaurelius.titan.graphdb.internal.InternalRelation

      `getPropertyDirect, getPropertyKeysDirect, removePropertyDirect, setPropertyDirect`

    - ### Methods inherited from interface com.thinkaurelius.titan.graphdb.internal.InternalElement

      `getLifeCycle, setId`

- - ### Property Detail

    - #### is

      Specified by:
        `isProperty` in interface `TitanRelation`
      Returns:
        true, if this relation is a property, else false.
      See Also:
        `TitanProperty`

  - ### Constructor Detail

    - #### AbstractEdge

          public AbstractEdge(long id,
                      EdgeLabel label,
                      InternalVertex start,
                      InternalVertex end)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### getLabel

          public String getLabel()

      Specified by:
        `getLabel` in interface `com.tinkerpop.blueprints.Edge`

    - #### setVertexAt

          public void setVertexAt(int pos,
                         InternalVertex vertex)

    - #### getVertex

          public InternalVertex getVertex(int pos)

      Description copied from interface: `InternalRelation`
      Returns the vertex at the given position (0=OUT, 1=IN) of this relation
      Specified by:
        `getVertex` in interface `InternalRelation`
      Returns:

    - #### getArity

          public int getArity()

      Description copied from interface: `InternalRelation`
      Number of vertices on this relation
      Specified by:
        `getArity` in interface `InternalRelation`
      Returns:

    - #### getLen

          public int getLen()

      Description copied from interface: `InternalRelation`
      Number of vertices on this relation that are aware of its existence
      Specified by:
        `getLen` in interface `InternalRelation`
      See Also:
        `TitanEdge.isUnidirected()`

    - #### getEdgeLabel

          public EdgeLabel getEdgeLabel()

      Description copied from interface: `TitanEdge`
      Returns the edge label of this edge
      Specified by:
        `getEdgeLabel` in interface `TitanEdge`
      Returns:
        edge label of this edge

    - #### getVertex

          public TitanVertex getVertex(com.tinkerpop.blueprints.Direction dir)

      Description copied from interface: `TitanEdge`
      Returns the vertex for the specified direction. The direction cannot be Direction.BOTH.
      Specified by:
        `getVertex` in interface `TitanEdge`
      Specified by:
        `getVertex` in interface `com.tinkerpop.blueprints.Edge`
      Returns:
        the vertex for the specified direction

    - #### getOtherVertex

          public TitanVertex getOtherVertex(TitanVertex vertex)

      Description copied from interface: `TitanEdge`
      Returns the vertex at the opposite end of the edge.
      Specified by:
        `getOtherVertex` in interface `TitanEdge`
      Parameters:
        `vertex` - vertex on which this edge is incident
      Returns:
        The vertex at the opposite end of the edge.

    - #### isDirected

          public boolean isDirected()

      Description copied from interface: `TitanEdge`
      Checks whether this relation is directed, i.e. has a start and end vertex both of which are aware of the incident edge.
      Specified by:
        `isDirected` in interface `TitanEdge`
      Returns:
        true, if this relation is directed, else false.

    - #### isUnidirected

          public boolean isUnidirected()

      Description copied from interface: `TitanEdge`
      Checks whether this relation is unidirected, i.e. only the start vertex is aware of the edge's existence. A unidirected edge is similar to a link.
      Specified by:
        `isUnidirected` in interface `TitanEdge`
      Returns:
        true, if this relation is unidirected, else false.

    - #### isProperty

          public boolean isProperty()

      Description copied from interface: `TitanRelation`
      Checks whether this relation is a property.
      Specified by:
        `isProperty` in interface `TitanRelation`
      Returns:
        true, if this relation is a property, else false.
      See Also:
        `TitanProperty`

    - #### isEdge

          public boolean isEdge()

      Description copied from interface: `TitanRelation`
      Checks whether this relation is an edge.
      Specified by:
        `isEdge` in interface `TitanRelation`
      Returns:
        true, if this relation is an edge, else false.
      See Also:
        `TitanEdge`

Copyright © 2012–2014. All rights reserved.