org.elasticsearch.common.xcontent
Enum XContentType

java.lang.Object
  extended by java.lang.Enum<XContentType>
      extended by org.elasticsearch.common.xcontent.XContentType
All Implemented Interfaces:
Serializable, Comparable<XContentType>

public enum XContentType
extends Enum<XContentType>

The content type of XContent.


Enum Constant Summary
JSON
          A JSON based content type.
SMILE
          The jackson based smile binary format.
YAML
          The jackson based smile binary format.
 
Method Summary
static XContentType fromRestContentType(String contentType)
           
 int index()
           
abstract  String restContentType()
           
abstract  String shortName()
           
static XContentType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static XContentType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
abstract  XContent xContent()
           
 
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

JSON

public static final XContentType JSON
A JSON based content type.


SMILE

public static final XContentType SMILE
The jackson based smile binary format. Fast and compact binary format.


YAML

public static final XContentType YAML
The jackson based smile binary format. Fast and compact binary format.

Method Detail

values

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

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

valueOf

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

fromRestContentType

public static XContentType fromRestContentType(String contentType)

index

public int index()

restContentType

public abstract String restContentType()

shortName

public abstract String shortName()

xContent

public abstract XContent xContent()


Copyright © 2009-2012. All Rights Reserved.