Package com.luciad.datamodels
Class DataType
java.lang.Object
com.luciad.datamodels.DataType
- All Implemented Interfaces:
AutoCloseable
A representation of the type of a data object.
A type describes the structure of a data object as a list of properties. Each of these properties is itself of a certain type.
A type is either a primitive type or a data object type. Primitive types are types which have no internal structure (no properties) and typically represent simple object such as strings, numbers etc. All primitive types are accessible from this class (see e.g. getIntType(), getStringType() ...).
Application-specific metadata can be attached to a type in the form of a DataAnnotation.
New types can be defined using a DataType.Builder (see newBuilder()).
Instances of this class are thread safe. Once an instance has been created, there is no public API to modify it.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanprotected voidfinalize()findDataProperty(String name) Searches for a data property by name.List<@NotNull DataAnnotation> Returns the list of annotations attached to this data type.static DataTypeReturns the type that corresponds toboolvalues.List<@NotNull DataProperty> Returns the list of properties of this data type.static DataTypeReturns the type that corresponds todoublevalues.static DataTypeReturns the type that corresponds tofloatvalues.static DataTypeReturns the type that corresponds toGeometryvalues.static DataTypeReturns the type that corresponds toint32_tvalues.static DataTypeReturns the type that corresponds toint64_tvalues.getName()Returns the name of this data type.static DataTypeReturns the type that corresponds tostd::stringvalues.booleanhasDataProperty(DataProperty property) Returns if the given property is declared in this data type.inthashCode()Returns the hash code.booleanReturns whether this is a primitive type, i.e.static DataType.BuilderCreates a newDataTypebuilder.toString()
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
newBuilder
Creates a newDataTypebuilder.- Returns:
- a new
DataTypebuilder.
-
getGeometryType
Returns the type that corresponds toGeometryvalues.- Returns:
- the type that corresponds to
Geometryvalues.
-
getIntType
Returns the type that corresponds toint32_tvalues.- Returns:
- the type that corresponds to
int32_tvalues.
-
getLongType
Returns the type that corresponds toint64_tvalues.- Returns:
- the type that corresponds to
int64_tvalues.
-
getFloatType
Returns the type that corresponds tofloatvalues.- Returns:
- the type that corresponds to
floatvalues.
-
getDoubleType
Returns the type that corresponds todoublevalues.- Returns:
- the type that corresponds to
doublevalues.
-
getStringType
Returns the type that corresponds tostd::stringvalues.- Returns:
- the type that corresponds to
std::stringvalues.
-
getBooleanType
Returns the type that corresponds toboolvalues.- Returns:
- the type that corresponds to
boolvalues.
-
getAnnotations
Returns the list of annotations attached to this data type.- Returns:
- the list of annotations attached to this data type.
-
getName
Returns the name of this data type.- Returns:
- the name of this data type.
-
getDataProperties
Returns the list of properties of this data type.- Returns:
- the list of properties of this data type.
-
findDataProperty
Searches for a data property by name.- Parameters:
name- the name of a property- Returns:
- the data property with the given name, if available
- See Also:
-
hasDataProperty
Returns if the given property is declared in this data type.- Parameters:
property- Data property.- Returns:
- if the given property is declared in this data type.
- See Also:
-
isPrimitive
public boolean isPrimitive()Returns whether this is a primitive type, i.e.a type without any properties.
- Returns:
- whether this is a primitive type, i.e. a type without any properties.
-
toString
-
hashCode
public int hashCode()Returns the hash code. -
equals
-