com.thinkaurelius.titan.graphdb.types

## Class StandardEdgeLabelMaker

- java.lang.Object
- - com.thinkaurelius.titan.graphdb.types.StandardRelationTypeMaker
  - - com.thinkaurelius.titan.graphdb.types.StandardEdgeLabelMaker

- All Implemented Interfaces:
    EdgeLabelMaker, RelationTypeMaker

      public class StandardEdgeLabelMaker
      extends StandardRelationTypeMaker
      implements EdgeLabelMaker

  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Field Summary

    - ### Fields inherited from class com.thinkaurelius.titan.graphdb.types.StandardRelationTypeMaker

      `attributeHandler, indexSerializer, tx`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StandardEdgeLabelMaker(StandardTitanTx tx, IndexSerializer indexSerializer, AttributeHandling attributeHandler)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `StandardEdgeLabelMaker` | `directed()` Configures the label to be directed.
    `StandardEdgeLabelMaker` | `hidden()`
    `EdgeLabel` | `make()` Defines the `EdgeLabel` specified by this EdgeLabelMaker and returns the resulting label
    `StandardEdgeLabelMaker` | `multiplicity(Multiplicity multiplicity)` Sets the multiplicity of this label.
    `StandardEdgeLabelMaker` | `signature(RelationType... types)` Configures the signature of this relation type.
    `StandardEdgeLabelMaker` | `sortKey(RelationType... types)` Configures the composite sort key for this label.
    `StandardEdgeLabelMaker` | `sortOrder(Order order)` Defines in which order to sort the relations for efficient retrieval, i.e.
    `StandardEdgeLabelMaker` | `unidirected()` Configures the label to be unidirected.
    `StandardEdgeLabelMaker` | `unidirected(com.tinkerpop.blueprints.Direction dir)`

    - ### Methods inherited from class com.thinkaurelius.titan.graphdb.types.StandardRelationTypeMaker

      `checkName, getMultiplicity, getName, hasSortKey, makeDefinition, name, status`

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

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

    - ### Methods inherited from interface com.thinkaurelius.titan.core.schema.RelationTypeMaker

      `getName`

- - ### Constructor Detail

    - #### StandardEdgeLabelMaker

          public StandardEdgeLabelMaker(StandardTitanTx tx,
                                IndexSerializer indexSerializer,
                                AttributeHandling attributeHandler)

  - ### Method Detail

    - #### directed

          public StandardEdgeLabelMaker directed()

      Description copied from interface: `EdgeLabelMaker`
      Configures the label to be directed.

      By default, the label is directed.
      Specified by:
        `directed` in interface `EdgeLabelMaker`
      Returns:
        this EdgeLabelMaker
      See Also:
        `EdgeLabel.isDirected()`

    - #### unidirected

          public StandardEdgeLabelMaker unidirected()

      Description copied from interface: `EdgeLabelMaker`
      Configures the label to be unidirected.

      By default, the type is directed.
      Specified by:
        `unidirected` in interface `EdgeLabelMaker`
      Returns:
        this EdgeLabelMaker
      See Also:
        `EdgeLabel.isUnidirected()`

    - #### unidirected

          public StandardEdgeLabelMaker unidirected(com.tinkerpop.blueprints.Direction dir)

    - #### multiplicity

          public StandardEdgeLabelMaker multiplicity(Multiplicity multiplicity)

      Description copied from interface: `EdgeLabelMaker`
      Sets the multiplicity of this label. The default multiplicity is `Multiplicity.MULTI`.
      Specified by:
        `multiplicity` in interface `EdgeLabelMaker`
      Overrides:
        `multiplicity` in class `StandardRelationTypeMaker`
      Returns:
        this EdgeLabelMaker
      See Also:
        `Multiplicity`

    - #### signature

          public StandardEdgeLabelMaker signature(RelationType... types)

      Description copied from interface: `RelationTypeMaker`
      Configures the signature of this relation type.

      Specifying the signature of a type tells the graph database to expect that relations of this type always have or are likely to have an incident property or unidirected edge of the type included in the signature. This allows the graph database to store such relations more compactly and retrieve them more quickly.
      For instance, if all edges with label friend have a property with key createdOn, then specifying (createdOn) as the signature for label friend allows friend edges to be stored more efficiently.
      `RelationType`s used in the signature must be either property out-unique keys or out-unique unidirected edge labels.
      The signature is empty by default.
      Specified by:
        `signature` in interface `EdgeLabelMaker`
      Specified by:
        `signature` in interface `RelationTypeMaker`
      Overrides:
        `signature` in class `StandardRelationTypeMaker`
      Parameters:
        `types` - RelationTypes composing the signature for the configured relation type. The order is irrelevant.
      Returns:
        this RelationTypeMaker

    - #### sortKey

          public StandardEdgeLabelMaker sortKey(RelationType... types)

      Description copied from class: `StandardRelationTypeMaker`
      Configures the composite sort key for this label.

      Specifying the sort key of a type allows relations of this type to be efficiently retrieved in the order of the sort key.
      For instance, if the edge label friend has the sort key (since), which is a property key with a timestamp data type, then one can efficiently retrieve all edges with label friend in a specified time interval using `TitanVertexQuery.interval(com.thinkaurelius.titan.core.PropertyKey, Comparable, Comparable)`.
      In other words, relations are stored on disk in the order of the configured sort key. The sort key is empty by default.
      If multiple types are specified as sort key, then those are considered as a composite sort key, i.e. taken jointly in the given order.

      `RelationType`s used in the sort key must be either property out-unique keys or out-unique unidirected edge lables.
      Overrides:
        `sortKey` in class `StandardRelationTypeMaker`
      Parameters:
        `types` - TitanTypes composing the sort key. The order is relevant.
      Returns:
        this LabelMaker

    - #### sortOrder

          public StandardEdgeLabelMaker sortOrder(Order order)

      Description copied from class: `StandardRelationTypeMaker`
      Defines in which order to sort the relations for efficient retrieval, i.e. either increasing (`Order.ASC`) or decreasing (`Order.DESC`). Note, that only one sort order can be specified and that a sort key must be defined to use a sort order.
      Overrides:
        `sortOrder` in class `StandardRelationTypeMaker`
      Returns:
      See Also:
        `StandardRelationTypeMaker.sortKey(RelationType...)`

    - #### hidden

          public StandardEdgeLabelMaker hidden()

      Overrides:
        `hidden` in class `StandardRelationTypeMaker`

    - #### make

          public EdgeLabel make()

      Description copied from interface: `EdgeLabelMaker`
      Defines the `EdgeLabel` specified by this EdgeLabelMaker and returns the resulting label
      Specified by:
        `make` in interface `EdgeLabelMaker`
      Specified by:
        `make` in interface `RelationTypeMaker`
      Returns:
        the created `EdgeLabel`

Copyright © 2012–2014. All rights reserved.