com.thinkaurelius.titan.core.attribute

## Enum Text

- java.lang.Object
- - java.lang.Enum<Text>
  - - com.thinkaurelius.titan.core.attribute.Text

- All Implemented Interfaces:
    TitanPredicate, com.tinkerpop.blueprints.Predicate, Serializable, Comparable<Text>

      public enum Text
      extends Enum<Text>
      implements TitanPredicate

  Comparison relations for text objects. These comparisons are based on a tokenized representation of the text, i.e. the text is considered as a set of word tokens.
  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.thinkaurelius.titan.graphdb.query.TitanPredicate

      `TitanPredicate.Converter`

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `CONTAINS` Whether the text contains a given term as a token in the text (case insensitive)
    `CONTAINS_PREFIX` Whether the text contains a token that starts with a given term (case insensitive)
    `CONTAINS_REGEX` Whether the text contains a token that matches a regular expression
    `PREFIX` Whether the text starts with a given prefix (case sensitive)
    `REGEX` Whether the text matches a regular expression (case sensitive)

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasNegation()` Whether this predicate has a predicate that is semantically its negation.
    `boolean` | `isQNF()` Returns true if this predicate is in query normal form.
    `boolean` | `isValidValueType(Class<?> clazz)` Whether the given class is a valid data type for a value to which this predicate may be applied.
    `TitanPredicate` | `negate()` Returns the negation of this predicate if it exists, otherwise an exception is thrown.
    `void` | `preevaluate(Object value, Object condition)`
    `static List<String>` | `tokenize(String str)`
    `static Text` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static Text[]` | `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`

    - ### Methods inherited from interface com.thinkaurelius.titan.graphdb.query.TitanPredicate

      `evaluate, isValidCondition`

- - ### Enum Constant Detail

    - #### CONTAINS

          public static final Text CONTAINS

      Whether the text contains a given term as a token in the text (case insensitive)

    - #### CONTAINS_PREFIX

          public static final Text CONTAINS_PREFIX

      Whether the text contains a token that starts with a given term (case insensitive)

    - #### CONTAINS_REGEX

          public static final Text CONTAINS_REGEX

      Whether the text contains a token that matches a regular expression

    - #### PREFIX

          public static final Text PREFIX

      Whether the text starts with a given prefix (case sensitive)

    - #### REGEX

          public static final Text REGEX

      Whether the text matches a regular expression (case sensitive)

  - ### Method Detail

    - #### values

          public static Text[] 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 (Text c : Text.values())
              System.out.println(c);

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

    - #### valueOf

          public static Text 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

    - #### preevaluate

          public void preevaluate(Object value,
                         Object condition)

    - #### tokenize

          public static List<String> tokenize(String str)

    - #### isValidValueType

          public boolean isValidValueType(Class<?> clazz)

      Description copied from interface: `TitanPredicate`
      Whether the given class is a valid data type for a value to which this predicate may be applied. For instance, the `Cmp.GREATER_THAN` can only be applied to `Comparable` values.
      Specified by:
        `isValidValueType` in interface `TitanPredicate`
      Returns:

    - #### hasNegation

          public boolean hasNegation()

      Description copied from interface: `TitanPredicate`
      Whether this predicate has a predicate that is semantically its negation. For instance, `Cmp.EQUAL` and `Cmp.NOT_EQUAL` are negatives of each other.
      Specified by:
        `hasNegation` in interface `TitanPredicate`
      Returns:

    - #### negate

          public TitanPredicate negate()

      Description copied from interface: `TitanPredicate`
      Returns the negation of this predicate if it exists, otherwise an exception is thrown. Check `TitanPredicate.hasNegation()` first.
      Specified by:
        `negate` in interface `TitanPredicate`
      Returns:

    - #### isQNF

          public boolean isQNF()

      Description copied from interface: `TitanPredicate`
      Returns true if this predicate is in query normal form.
      Specified by:
        `isQNF` in interface `TitanPredicate`
      Returns:

Copyright © 2012–2014. All rights reserved.