com.thinkaurelius.titan.core.schema

## Enum Mapping

- java.lang.Object
- - java.lang.Enum<Mapping>
  - - com.thinkaurelius.titan.core.schema.Mapping

- All Implemented Interfaces:
    Serializable, Comparable<Mapping>

      public enum Mapping
      extends Enum<Mapping>

  Used to change the default mapping of an indexed key by providing the mapping explicitly as a parameter to `TitanManagement.addIndexKey(TitanGraphIndex, com.thinkaurelius.titan.core.PropertyKey, Parameter[])`.

  This applies mostly to string data types of keys, where the mapping specifies whether the string value is tokenized (`TEXT`) or indexed as a whole (`STRING`).
  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `DEFAULT`
    `STRING`
    `TEXT`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Mapping` | `getMapping(KeyInformation information)`
    `static Mapping` | `getMapping(String store, String key, KeyInformation.IndexRetriever informations)`
    `Parameter` | `getParameter()` Returns the mapping as a parameter so that it can be passed to `TitanManagement.addIndexKey(TitanGraphIndex, com.thinkaurelius.titan.core.PropertyKey, Parameter[])`
    `static Mapping` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static Mapping[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

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

- - ### Enum Constant Detail

    - #### DEFAULT

          public static final Mapping DEFAULT

    - #### TEXT

          public static final Mapping TEXT

    - #### STRING

          public static final Mapping STRING

  - ### Method Detail

    - #### values

          public static Mapping[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (Mapping c : Mapping.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static Mapping valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### getParameter

          public Parameter getParameter()

      Returns the mapping as a parameter so that it can be passed to `TitanManagement.addIndexKey(TitanGraphIndex, com.thinkaurelius.titan.core.PropertyKey, Parameter[])`
      Returns:

    - #### getMapping

          public static Mapping getMapping(KeyInformation information)

    - #### getMapping

          public static Mapping getMapping(String store,
                           String key,
                           KeyInformation.IndexRetriever informations)

Copyright © 2012–2014. All rights reserved.