Gephi Toolkit Javadoc

org.gephi.data.attributes.api
Enum AttributeType

java.lang.Object
  extended by java.lang.Enum<AttributeType>
      extended by org.gephi.data.attributes.api.AttributeType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<AttributeType>

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

The different type an AttributeColumn can have.

Author:
Mathieu Bastian, Martin Ć kurla, Cezary Bartosiak

Enum Constant Summary
BIGDECIMAL
           
BIGINTEGER
           
BOOLEAN
           
BYTE
           
CHAR
           
DOUBLE
           
DYNAMIC_BIGDECIMAL
           
DYNAMIC_BIGINTEGER
           
DYNAMIC_BOOLEAN
           
DYNAMIC_BYTE
           
DYNAMIC_CHAR
           
DYNAMIC_DOUBLE
           
DYNAMIC_FLOAT
           
DYNAMIC_INT
           
DYNAMIC_LONG
           
DYNAMIC_SHORT
           
DYNAMIC_STRING
           
FLOAT
           
INT
           
LIST_BIGDECIMAL
           
LIST_BIGINTEGER
           
LIST_BOOLEAN
           
LIST_BYTE
           
LIST_CHARACTER
           
LIST_DOUBLE
           
LIST_FLOAT
           
LIST_INTEGER
           
LIST_LONG
           
LIST_SHORT
           
LIST_STRING
           
LONG
           
SHORT
           
STRING
           
TIME_INTERVAL
           
 
Method Summary
static double getDoubleFromXMLDateString(java.lang.String str)
           
 java.lang.Class getType()
          Returns the Class the type is associated with.
 java.lang.String getTypeString()
          The name of the enum constant.
 boolean isDynamicType()
          Indicates if this type is a DynamicType.
 boolean isListType()
           
static AttributeType parse(java.lang.Object obj)
          Build an AttributeType from the given obj type.
 java.lang.Object parse(java.lang.String str)
          Try to parse the given str snippet in an object of the type associated to this AttributeType.
static AttributeType parseDynamic(java.lang.Object obj)
          Build an dynamic AttributeType from the given obj type.
 java.lang.String toString()
           
static AttributeType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static AttributeType[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BYTE

public static final AttributeType BYTE

SHORT

public static final AttributeType SHORT

INT

public static final AttributeType INT

LONG

public static final AttributeType LONG

FLOAT

public static final AttributeType FLOAT

DOUBLE

public static final AttributeType DOUBLE

BOOLEAN

public static final AttributeType BOOLEAN

CHAR

public static final AttributeType CHAR

STRING

public static final AttributeType STRING

BIGINTEGER

public static final AttributeType BIGINTEGER

BIGDECIMAL

public static final AttributeType BIGDECIMAL

DYNAMIC_BYTE

public static final AttributeType DYNAMIC_BYTE

DYNAMIC_SHORT

public static final AttributeType DYNAMIC_SHORT

DYNAMIC_INT

public static final AttributeType DYNAMIC_INT

DYNAMIC_LONG

public static final AttributeType DYNAMIC_LONG

DYNAMIC_FLOAT

public static final AttributeType DYNAMIC_FLOAT

DYNAMIC_DOUBLE

public static final AttributeType DYNAMIC_DOUBLE

DYNAMIC_BOOLEAN

public static final AttributeType DYNAMIC_BOOLEAN

DYNAMIC_CHAR

public static final AttributeType DYNAMIC_CHAR

DYNAMIC_STRING

public static final AttributeType DYNAMIC_STRING

DYNAMIC_BIGINTEGER

public static final AttributeType DYNAMIC_BIGINTEGER

DYNAMIC_BIGDECIMAL

public static final AttributeType DYNAMIC_BIGDECIMAL

TIME_INTERVAL

public static final AttributeType TIME_INTERVAL

LIST_BYTE

public static final AttributeType LIST_BYTE

LIST_SHORT

public static final AttributeType LIST_SHORT

LIST_INTEGER

public static final AttributeType LIST_INTEGER

LIST_LONG

public static final AttributeType LIST_LONG

LIST_FLOAT

public static final AttributeType LIST_FLOAT

LIST_DOUBLE

public static final AttributeType LIST_DOUBLE

LIST_BOOLEAN

public static final AttributeType LIST_BOOLEAN

LIST_CHARACTER

public static final AttributeType LIST_CHARACTER

LIST_STRING

public static final AttributeType LIST_STRING

LIST_BIGINTEGER

public static final AttributeType LIST_BIGINTEGER

LIST_BIGDECIMAL

public static final AttributeType LIST_BIGDECIMAL
Method Detail

values

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

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

valueOf

public static AttributeType 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
java.lang.NullPointerException - if the argument is null

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<AttributeType>

getTypeString

public java.lang.String getTypeString()
The name of the enum constant.

Returns:
the name of the enum constant

getType

public java.lang.Class getType()
Returns the Class the type is associated with.

Returns:
the class the type is associated with

parse

public java.lang.Object parse(java.lang.String str)
Try to parse the given str snippet in an object of the type associated to this AttributeType. For instance if the type is Boolean, and str equals true, this method will succeed to return a Boolean instance. May throw NumberFormatException. DYNAMIC types and TIME_INTERVAL cannot be parsed with this method (see isDynamicType method) and a UnsupportedOperationException will be thrown if it is tried.

Parameters:
str - the string that is to be parsed
Returns:
an instance of the type of this or null if not able to parse given string as the type AttributeType.

parse

public static AttributeType parse(java.lang.Object obj)
Build an AttributeType from the given obj type. If the given obj class match with an AttributeType type, returns this type. Returns null otherwise.

For instance if obj instanceof Float equals true, returns AttributeType.FLOAT.

Parameters:
obj - the object that is to be parsed
Returns:
the compatible AttributeType, or null if no type is found or the input object is null

parseDynamic

public static AttributeType parseDynamic(java.lang.Object obj)
Build an dynamic AttributeType from the given obj type. If the given obj class match with an AttributeType type, returns this type. Returns null otherwise.

For instance if obj instanceof Float equals true, returns AttributeType.DYNAMIC_FLOAT.

Parameters:
obj - the object that is to be parsed
Returns:
the compatible AttributeType, or null

isDynamicType

public boolean isDynamicType()
Indicates if this type is a DynamicType.

Returns:
true if this is a DynamicType, false otherwise

isListType

public boolean isListType()

getDoubleFromXMLDateString

public static double getDoubleFromXMLDateString(java.lang.String str)
                                         throws java.text.ParseException
Throws:
java.text.ParseException

Gephi Toolkit Javadoc