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 by BasicDataType.

    Additionally, arrays of each data type are supported ("multi-value").

    • Method Detail

      • getTypeString

        @NotNull String getTypeString()
        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() and getSemanticType(), which provide more precise and normalized access to the type information.

        The string representation of the data type
      • getValueType

        @NotNull 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.

        The value type
      • getSemanticType

        @Nullable 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 type string 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.

        The semantic type
      • isMultiValue

        boolean isMultiValue()
        Determines if the data type represents an array of values.
        true if the data type represents a collection of values; false if the data type represents a single value