Interface DataType
-
public interface DataType
Represents a data type for structured content provided by a Content Fragment.Data types are used to extend text-based Content Fragments with structured, typed data. Fragments with structured data are called Structured Content Fragments.
The defining type strings (@see
getTypeString()
} for available types are defined byBasicDataType
.Additionally, arrays of each data type are supported ("multi-value").
- Since:
- 1.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description @Nullable java.lang.String
getSemanticType()
Gets the semantic type of the data type.@NotNull java.lang.String
getTypeString()
Deprecated.UsegetValueType()
andgetSemanticType()
@NotNull java.lang.String
getValueType()
Gets the value type of the data type.boolean
isMultiValue()
Determines if the data type represents an array of values.
-
-
-
Method Detail
-
getTypeString
@Deprecated @NotNull @NotNull java.lang.String getTypeString()
Deprecated.UsegetValueType()
andgetSemanticType()
Gets the string representation of the data type.The string representation must be unique and is used to identify the type (and some related data like mappings, etc.) within the repository.
Note that it is recommended to use
getValueType()
andgetSemanticType()
, which provide more precise and normalized access to the type information.- Returns:
- The string representation of the data type
-
getValueType
@NotNull @NotNull java.lang.String getValueType()
Gets the value type of the data type.The value type defines how a value is persisted. The list of value types is provided through
BasicDataType
, except for the values deprecated there.- Returns:
- The value type
-
getSemanticType
@Nullable @Nullable java.lang.String getSemanticType()
Gets the semantic type of the data type.The semantic type defines how the stored value should be interpreted and mapped to a Java object. For example, a semantic type
content-fragment
defines that a value of value typestring
provides the path to a (nested) Content Fragment.Content Fragments ship with a set of predefined semantic types, defined by the constants found in
SemanticDataType
.- Returns:
- The semantic type
-
isMultiValue
boolean isMultiValue()
Determines if the data type represents an array of values.- Returns:
true
if the data type represents a collection of values;false
if the data type represents a single value
-
-