Enum Class PropertyTypeName.BaseType
java.lang.Object
java.lang.Enum<PropertyTypeName.BaseType>
org.gcube.informationsystem.types.PropertyTypeName.BaseType
- All Implemented Interfaces:
Serializable,Comparable<PropertyTypeName.BaseType>,Constable
- Enclosing class:
- PropertyTypeName
The fundamental data types for properties.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA generic opaque object mapping to any supported type.Binary data payload.A standard true/false boolean value.A single byte.A timestamp.A double-precision 64-bit floating point.A single-precision 32-bit floating point.A 32-bit signed integer.A generic JSON Array.A generic JSON Object.An ordered collection of values of a single element type.A 64-bit signed integer.A collection of key-value pairs; keys must be String, values share a single element type.A reference to another Property-family type, embedded inline (Schema-Mixed Mode).An unordered collection of unique values of a single element type.A 16-bit signed integer.A sequence of characters. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Map<String,PropertyTypeName.BaseType> A map of base types, keyed by string representation. -
Method Summary
Modifier and TypeMethodDescriptionstatic PropertyTypeName.BaseTypegetBaseTypeFromString(String type) Returns theBaseTypeenum constant from its string representation.Returns a human-readable description of this base type, e.g. for documentation generation.Class<?>Returns the canonical Java class this base type is mapped to, e.g. for documentation generation.toString()static PropertyTypeName.BaseTypeReturns the enum constant of this class with the specified name.static PropertyTypeName.BaseType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ANY
A generic opaque object mapping to any supported type. -
BOOLEAN
A standard true/false boolean value. -
INTEGER
A 32-bit signed integer. Evaluates Min/Max attributes if provided in the schema. -
SHORT
A 16-bit signed integer. Evaluates Min/Max attributes if provided in the schema. -
LONG
A 64-bit signed integer. Evaluates Min/Max attributes if provided in the schema. -
FLOAT
A single-precision 32-bit floating point. Evaluates Min/Max attributes if provided. -
DOUBLE
A double-precision 64-bit floating point. Evaluates Min/Max attributes if provided. -
DATE
A timestamp. It must be provided in the strictly expected format (yyyy-MM-dd HH:mm:ss.SSS Z). -
STRING
A sequence of characters. Can be constrained by a Regular Expression using the Regex schema attribute. -
BINARY
Binary data payload. In the JSON representation, this is encoded as a base64 string. -
BYTE
A single byte. In the JSON representation, it is formatted as a standard JSON number (from -128 to 127). -
JSON_OBJECT
A generic JSON Object. -
JSON_ARRAY
A generic JSON Array. -
PROPERTY
A reference to another Property-family type, embedded inline (Schema-Mixed Mode). -
LIST
An ordered collection of values of a single element type. -
SET
An unordered collection of unique values of a single element type. -
MAP
A collection of key-value pairs; keys must be String, values share a single element type.
-
-
Field Details
-
map
A map of base types, keyed by string representation.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
toString
- Overrides:
toStringin classEnum<PropertyTypeName.BaseType>
-
getMappedClass
Returns the canonical Java class this base type is mapped to, e.g. for documentation generation. Several other classes may also resolve to this base type (seePropertyTypeName.getBaseTypeByClass(Class)) -- this is the single, primary one.- Returns:
- The mapped class.
-
getDescription
Returns a human-readable description of this base type, e.g. for documentation generation.- Returns:
- The description.
-
getBaseTypeFromString
Returns theBaseTypeenum constant from its string representation.- Parameters:
type- The string representation of the type.- Returns:
- The corresponding
BaseType. - Throws:
IllegalArgumentException- if the string does not match any known base type.
-