public final class AttributeType extends Enum
| Modifier and Type | Field and Description |
|---|---|
static AttributeType |
BINARY
Corresponds to an array of Java
bytes. |
static AttributeType |
BOOLEAN
Attribute values are limited to
true and false. |
static AttributeType |
BYTE
Corresponds to the Java
byte primitive type. |
static AttributeType |
CHAR
Corresponds to the Java
char primitive type. |
static AttributeType |
DATE
Corresponds to the
MIDate class. |
static AttributeType |
DATE_TIME
Corresponds to the
MIDateTime class. |
static AttributeType |
DATE_TIME_ZONE
Corresponds to the
MIDateTimeZone class. |
static AttributeType |
DBASE_DECIMAL
Identifies a double-precision floating point data type that has defined
persistence characteristics for total width and decimal place precision.
|
static AttributeType |
DOUBLE
Corresponds to the Java
double primitive type. |
static AttributeType |
FEATURE
Corresponds to implementations of the
IFeature interface. |
static AttributeType |
FEATURE_COLLECTION
Corresponds to implementations of the
IFeatureCollection interface. |
static AttributeType |
FEATURE_GEOMETRY
Corresponds to implementations of the
IFeatureGeometry
interface. |
static AttributeType |
FLOAT
Corresponds to the Java
float primitive type. |
static AttributeType |
INTEGER
Corresponds to the Java
int primitive type. |
static AttributeType |
LONG_INTEGER
Corresponds to the Java
long primitive type. |
static AttributeType |
MULTIFEATURE_COLLECTION
Corresponds to implementations of the
IMultiFeatureCollection interface. |
static AttributeType |
RASTER
Corresponds to implementations of the
IRasterDataset
interface. |
static AttributeType |
SHORT_INTEGER
Corresponds to the Java
short primitive type. |
static AttributeType |
STRING
Corresponds to the Java
String type. |
static AttributeType |
STYLE
Corresponds to implementations of the
IStyle
interface. |
static AttributeType |
TIME
Corresponds to the
MITime class. |
static AttributeType |
TIMESPAN
Corresponds to the
MITimespan class. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isDateType()
Indiacates if the attribute type corresponds to a Date Time type(date, time or combination of date time)
|
boolean |
isNumeric()
Indicates if this attribute type corresponds to a numeric type (integer or floating point).
|
boolean |
isRealNumber()
Indicates if this attribute type corresponds to a floating point (or real) number.
|
boolean |
isWholeNumber()
Indicates if this attribute type corresponds to a whole (or integer) number.
|
static AttributeType |
valueOf(String name) |
static AttributeType[] |
values() |
public static final AttributeType BOOLEAN
true and false.
Corresponds to the Java boolean primitive type.public static final AttributeType INTEGER
int primitive type.public static final AttributeType SHORT_INTEGER
short primitive type.public static final AttributeType LONG_INTEGER
long primitive type.public static final AttributeType FLOAT
float primitive type.public static final AttributeType DOUBLE
double primitive type.public static final AttributeType DBASE_DECIMAL
IAttributeDefinition.getWidth
and IAttributeDefinition.getDecimals
properties apply to an attribute of this type. The width refers to the total
width of the storage capacity of the attribute while the decimals refers to
the number of significant digits that can be stored after the decimal point.
Thus, an attribute of type DBASE_DECIMAL with a width of 6 and decimal precision
of 1, for example, could store the range of values [-999.9 to 9999.9], inclusive.
Note that all access to and processing of an attribute of type DBASE_DECIMAL
is the same as attributes of type DOUBLE. Intermediate results from calculations
between two decimal types such as division and multiplication) will be treated
as doubles. Features may hold onto these values as doubles and only restrict
the significant number of decimal digits at the time of persistence without
exception. Feature implementations should, however, validate the overall width
of decimals at the time a value is set. For example, an attribute defined
as decimal with a width of 6 and a decimal precision of 1 can hold onto a
value of 1234.5678 and will persist this value as 1234.6. However, the value 12345.6
cannot be persisted and should not be accepted by the feature implementation.public static final AttributeType STRING
String type. Attributes of type STRING
may have defined persistence characteristics for total width or number of
characters allowed. The IAttributeDefinition.getWidth
property applies to an attribute of this type.public static final AttributeType BINARY
bytes. Attributes of type BINARY
may have defined persistence characteristics for total width or number of
bytes allowed. The IAttributeDefinition.getWidth
property applies to an attribute of this type.public static final AttributeType CHAR
char primitive type.public static final AttributeType BYTE
byte primitive type.public static final AttributeType DATE
MIDate class. Attributes
of this type store date values containing only year, month, and day values.public static final AttributeType TIME
MITime class. Attributes
of this type store time values containing only hour, minute, and second values.public static final AttributeType DATE_TIME
MIDateTime class. Attributes
of this type store time values containing year, month, day, hour,
minute, and second values.public static final AttributeType DATE_TIME_ZONE
MIDateTimeZone class. Attributes
of this type store time values containing year, month, day, hour,
minute, and second values with an associated timezone.public static final AttributeType TIMESPAN
MITimespan class. Attributes
of this type store time values that represent a time duration measured in
days, hours, minutes, and seconds.public static final AttributeType FEATURE_GEOMETRY
IFeatureGeometry
interface.public static final AttributeType STYLE
IStyle
interface.public static final AttributeType RASTER
IRasterDataset
interface.public static final AttributeType FEATURE
IFeature interface. Attributes that
are of this type contain feature instances as their values. This may be encountered
for complex types.
For example, a database server may define a type called Address as
containing fields Street, City, State, and Zip and may then allow a customer table
to be defined with fields Name, PromotionCode, ShipTo, and BillTo where ShipTo and BillTo
would be fields of type Address. Features obtained from the Customer table would have
attributes of type STRING, STRING, FEATURE, and FEATURE, respectively. The FEATURE
types representing the server-side Address type would contain (nested) fields of type
STRING, STRING, STRING, and STRING (for Street, City, State, and Zip, respectively).public static final AttributeType FEATURE_COLLECTION
IFeatureCollection interface.
Attributes that are of this type contain feature collection instances as
data values. This may be used to expose data type such as arrays or nested tables
for data sources that support such concepts.public static final AttributeType MULTIFEATURE_COLLECTION
IMultiFeatureCollection interface.
Attributes that are of this type contain multi-feature collection instances as
data values. This may be used to expose data type such as variable-sized multi-dimensional
arrays for data sources that support such concepts.public static AttributeType[] values()
public static AttributeType valueOf(String name)
public boolean isRealNumber()
true for attribute types DOUBLE, FLOAT,
and DBASE_DECIMAL; false otherwise.public boolean isWholeNumber()
true for attribute types INTEGER,
SHORT_INTEGER, LONG_INTEGER,
BYTE, and CHAR; false otherwise.public boolean isNumeric()
true for attribute types that satisfy isRealNumber or
isWholeNumber; false otherwise.public boolean isDateType()
true for attribute types DATE,DATE_TIME,
TIME ,TIMESPAN,DATE_TIME_ZONE, false otherwise.© 2007, 2022 Precisely. All rights reserved.