magoffin.matt.ma2.lucene
Enum IndexField

java.lang.Object
  extended by java.lang.Enum<IndexField>
      extended by magoffin.matt.ma2.lucene.IndexField
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<IndexField>

public enum IndexField
extends java.lang.Enum<IndexField>

An enumeration of Matte Lucene index fields.

Version:
$Revision: 43 $ $Date: 2007-10-21 11:10:01 +1300 (Sun, 21 Oct 2007) $
Author:
Matt Magoffin (spamsqr@msqr.us)

Enum Constant Summary
ADDRESS
          An address.
CITY
          A city.
COUNTRY
          A country.
CREATED_DATE
          The index field for an item's creation date.
CREATED_DATE_MONTH
          The index field for an item's creation date, consisting of only year and month.
DESCRIPTION
          An item's description or comments.
EMAIL
          A person's email.
GENERAL_TEXT
          The index field (not stored) for tokenized free-form text.
GIVEN_NAME
          The given name of a person (first name).
ITEM_DATE
          The index field for an item's date (search date, i.e.
ITEM_DATE_MONTH
          The index field for an item's date consisting of only year and month.
ITEM_DATE_TIME_ZONE
          The time zone for the item date.
ITEM_ID
          The index field for an item's unique ID.
ITEM_INDEX_KEY
          An index key appropriate for this item.
ITEM_NAME
          The index field for an item's name.
ITEM_OWNER
          The owner of an item.
MEDIA_HEIGHT
          The height of an item.
MEDIA_MIME
          The MIME type of an item.
MEDIA_RATING
          The user media ratings.
MEDIA_SHARED_ALBUM_KEY
          A shared album key for an item (so can tell if item is shared).
MEDIA_SHARED_ALBUM_NAME
          A shared album name for an item.
MEDIA_SHARED_FLAG
          A flag indicating the item is part of some shared album.
MEDIA_WIDTH
          The width of an item.
METADATA
          Metadata.
MODIFIED_DATE
          An item's modified date.
PHONE
          A phone number.
POSTAL_CODE
          The postal code of an address.
STATE
          A state or province.
SURNAME
          The surname of a person (last, family name).
TAG
          A tag.
USER_LOGIN
          The login name for a user login.
 
Method Summary
static IndexField fromFieldName(java.lang.String field)
          Get an IndexField from a Lucene field name.
 java.lang.String getFieldName()
          Get a Lucene field name for this enum.
static IndexField valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static IndexField[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ITEM_ID

public static final IndexField ITEM_ID
The index field for an item's unique ID.


ITEM_OWNER

public static final IndexField ITEM_OWNER
The owner of an item.


ITEM_DATE

public static final IndexField ITEM_DATE
The index field for an item's date (search date, i.e. created, modified, etc).


ITEM_DATE_MONTH

public static final IndexField ITEM_DATE_MONTH
The index field for an item's date consisting of only year and month.


ITEM_DATE_TIME_ZONE

public static final IndexField ITEM_DATE_TIME_ZONE
The time zone for the item date.


ITEM_NAME

public static final IndexField ITEM_NAME
The index field for an item's name.


ITEM_INDEX_KEY

public static final IndexField ITEM_INDEX_KEY
An index key appropriate for this item.


MEDIA_SHARED_ALBUM_KEY

public static final IndexField MEDIA_SHARED_ALBUM_KEY
A shared album key for an item (so can tell if item is shared).


MEDIA_SHARED_ALBUM_NAME

public static final IndexField MEDIA_SHARED_ALBUM_NAME
A shared album name for an item.


MEDIA_SHARED_FLAG

public static final IndexField MEDIA_SHARED_FLAG
A flag indicating the item is part of some shared album.


CREATED_DATE

public static final IndexField CREATED_DATE
The index field for an item's creation date.


CREATED_DATE_MONTH

public static final IndexField CREATED_DATE_MONTH
The index field for an item's creation date, consisting of only year and month.


DESCRIPTION

public static final IndexField DESCRIPTION
An item's description or comments.


MODIFIED_DATE

public static final IndexField MODIFIED_DATE
An item's modified date.


GENERAL_TEXT

public static final IndexField GENERAL_TEXT
The index field (not stored) for tokenized free-form text.


GIVEN_NAME

public static final IndexField GIVEN_NAME
The given name of a person (first name).


MEDIA_HEIGHT

public static final IndexField MEDIA_HEIGHT
The height of an item.


MEDIA_MIME

public static final IndexField MEDIA_MIME
The MIME type of an item.


MEDIA_RATING

public static final IndexField MEDIA_RATING
The user media ratings.


MEDIA_WIDTH

public static final IndexField MEDIA_WIDTH
The width of an item.


METADATA

public static final IndexField METADATA
Metadata.


SURNAME

public static final IndexField SURNAME
The surname of a person (last, family name).


TAG

public static final IndexField TAG
A tag.


EMAIL

public static final IndexField EMAIL
A person's email.


PHONE

public static final IndexField PHONE
A phone number.


ADDRESS

public static final IndexField ADDRESS
An address.


CITY

public static final IndexField CITY
A city.


STATE

public static final IndexField STATE
A state or province.


POSTAL_CODE

public static final IndexField POSTAL_CODE
The postal code of an address.


COUNTRY

public static final IndexField COUNTRY
A country.


USER_LOGIN

public static final IndexField USER_LOGIN
The login name for a user login.

Method Detail

values

public static final IndexField[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(IndexField c : IndexField.values())
        System.out.println(c);

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

valueOf

public static IndexField valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

getFieldName

public java.lang.String getFieldName()
Get a Lucene field name for this enum.

Returns:
field name
See Also:
fromFieldName(String)

fromFieldName

public static IndexField fromFieldName(java.lang.String field)
Get an IndexField from a Lucene field name.

Parameters:
field - field name
Returns:
the IndexField
Throws:
java.lang.IllegalArgumentException - if the field name is not supported
See Also:
getFieldName()