Annotation Type Incidence


@Retention(RUNTIME)
@Target(METHOD)
public @interface Incidence
Incidences annotate getters and adders to represent a Vertex incident to an Edge. This annotation extends the TinkerPop built-in Incidence annotation. It allows type arguments to be passed into the annotated method. This ensures the returned type is of the specified type in the argument. The following method signatures are valid. T add*(Class<T> type) T get*(Class<T> type) When annotating a get* class it ensures it only returns nodes of the specified type (including sub-classes). Any Nodes which are not of this type will not be returned.
Since:
2.0.0
  • Required Element Summary

    Required Elements 
    Modifier and Type Required Element Description
    String label
    The labels of the edges that are incident to the vertex.
  • Optional Element Summary

    Optional Elements 
    Modifier and Type Optional Element Description
    org.apache.tinkerpop.gremlin.structure.Direction direction
    The direction of the edges.
    Incidence.Operation operation
    The operation the method is performing on the vertex.
  • Element Details

    • label

      String label
      The labels of the edges that are incident to the vertex.
      Returns:
      the edge label
      Since:
      2.0.0
    • direction

      org.apache.tinkerpop.gremlin.structure.Direction direction
      The direction of the edges.
      Returns:
      the edge direction
      Since:
      2.0.0
      Default:
      org.apache.tinkerpop.gremlin.structure.Direction.OUT
    • operation

      The operation the method is performing on the vertex.
      Returns:
      The operation to be performed.
      Default:
      com.syncleus.ferma.annotations.Incidence.Operation.AUTO