Esri Geoportal Server
1.0

com.esri.gpt.catalog.discovery
Enum PropertyValueType

java.lang.Object
  extended by java.lang.Enum<PropertyValueType>
      extended by com.esri.gpt.catalog.discovery.PropertyValueType
All Implemented Interfaces:
Serializable, Comparable<PropertyValueType>

public enum PropertyValueType
extends Enum<PropertyValueType>

The enumeration of value types for a property.

DOUBLE: a double precision number

GEOMETRY: the bounding envelope for a document

LONG: a long integer

STRING: a string

TIMESTAMP: a timestamp


Enum Constant Summary
DOUBLE
           
GEOMETRY
           
LONG
           
STRING
           
TIMESTAMP
           
 
Method Summary
 Object evaluate(String value)
          Converts a String value into an Object of the associated value type.
 Object evaluate(String value, boolean isLowerBoundary, boolean isUpperBoundary)
          Converts a String value into an Object of the associated value type.
static PropertyValueType from(String value)
          Makes a property value type from a supplied string value.
static PropertyValueType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PropertyValueType[] 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

DOUBLE

public static final PropertyValueType DOUBLE

GEOMETRY

public static final PropertyValueType GEOMETRY

LONG

public static final PropertyValueType LONG

STRING

public static final PropertyValueType STRING

TIMESTAMP

public static final PropertyValueType TIMESTAMP
Method Detail

values

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

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

valueOf

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

evaluate

public Object evaluate(String value)
                throws NumberFormatException
Converts a String value into an Object of the associated value type.

If a null value is supplied, a null value will be returned.

The GEOMETRY type is virtual an cannot be evaluated. If a non-null value is supplied for a GEOMETRY type, an IllegalArgumentException will be thrown.

Parameters:
value - the value to evaluate
Returns:
the evaluated Object
Throws:
NumberFormatException - if the supplied value cannot be converted (applies to types DOUBLE,INTEGER,LONG)
IllegalArgumentException - if the supplied value cannot be converted (applies to types GEOMETRY,TIMESTAMP)

evaluate

public Object evaluate(String value,
                       boolean isLowerBoundary,
                       boolean isUpperBoundary)
                throws NumberFormatException,
                       IllegalArgumentException
Converts a String value into an Object of the associated value type.

If a null value is supplied, a null value will be returned.

The GEOMETRY type is virtual an cannot be evaluated. If a non-null value is supplied for a GEOMETRY type, an IllegalArgumentException will be thrown.

Parameters:
value - the value to evaluate
isLowerBoundary - true if the value is the lower boundary of a range
isUpperBoundary - true if the value is the upper boundary of a range
Returns:
the evaluated Object
Throws:
NumberFormatException - if the supplied value cannot be converted (applies to types DOUBLE,INTEGER,LONG)
IllegalArgumentException - if the supplied value cannot be converted (applies to types GEOMETRY,TIMESTAMP)

from

public static PropertyValueType from(String value)
                              throws IllegalArgumentException
Makes a property value type from a supplied string value.
I null or an empty string is supplied, PropertyValueType.STRING is returned.

Parameters:
value - the value
Returns:
the property value type
Throws:
IllegalArgumentException - if the value was invalid

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.