Enum DefaultDataTypes

  • All Implemented Interfaces:
    DataType, java.io.Serializable, java.lang.Comparable<DefaultDataTypes>

    public enum DefaultDataTypes
    extends java.lang.Enum<DefaultDataTypes>
    implements DataType
    Default data types provided by the add-on.
    Since:
    4.1.0
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getCode()
      Returns the unique code.
      java.util.List<com.orchestranetworks.schema.SchemaTypeName> getCompatibleSchemaTypes()
      Returns the schema types in EBX that this data type represents.
      static DataType getForSchemaNode​(com.orchestranetworks.schema.SchemaNode schemaNode)
      Converts a schema node to a default data type.
      com.onwbp.base.text.UserMessage getLabel()
      Returns the label.
      java.lang.Class<?> getValueClass()
      Returns the class of values that this data type represents.
      static boolean isAnyType​(DataType dataType)
      Returns true if this is ANY_TYPE.
      static DataType parse​(java.lang.String code)
      Converts a unique code to a default data type.
      static DefaultDataTypes valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static DefaultDataTypes[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • BOOLEAN

        public static final DefaultDataTypes BOOLEAN
        Default boolean type.
        See Also:
        SchemaTypeName.XS_BOOLEAN
      • COLOR

        public static final DefaultDataTypes COLOR
        Default color type.
        See Also:
        SchemaTypeName.OSD_COLOR
      • DATE

        public static final DefaultDataTypes DATE
        Default date type.
        See Also:
        SchemaTypeName.XS_DATE
      • DATE_TIME

        public static final DefaultDataTypes DATE_TIME
        Default date-time type.
        See Also:
        SchemaTypeName.XS_DATETIME
      • DATASET_NAME

        public static final DefaultDataTypes DATASET_NAME
        Default dataset name type.
        See Also:
        SchemaTypeName.OSD_DATASET_NAME
      • DATASPACE_KEY

        public static final DefaultDataTypes DATASPACE_KEY
        Default dataspace key type.
        See Also:
        SchemaTypeName.OSD_DATASPACE_KEY
      • DECIMAL

        public static final DefaultDataTypes DECIMAL
        Default decimal type.
        See Also:
        SchemaTypeName.XS_DECIMAL
      • EMAIL

        public static final DefaultDataTypes EMAIL
        Default email type.
        See Also:
        SchemaTypeName.OSD_EMAIL
      • HTML

        public static final DefaultDataTypes HTML
        Default HTML type.
        See Also:
        SchemaTypeName.OSD_STRING_HTML
      • INTEGER

        public static final DefaultDataTypes INTEGER
        Default integer type.
        See Also:
        SchemaTypeName.XS_INT, SchemaTypeName.XS_INTEGER
      • LOCALE

        public static final DefaultDataTypes LOCALE
        Default locale type.
        See Also:
        SchemaTypeName.OSD_LOCALE
      • PASSWORD

        public static final DefaultDataTypes PASSWORD
        Default password type.
        See Also:
        SchemaTypeName.OSD_PASSWORD
      • RESOURCE

        public static final DefaultDataTypes RESOURCE
        Default resource type.
        See Also:
        SchemaTypeName.OSD_RESOURCE
      • STRING

        public static final DefaultDataTypes STRING
        Default string type.
        See Also:
        SchemaTypeName.XS_STRING, SchemaTypeName.XS_NAME
      • TEXT

        public static final DefaultDataTypes TEXT
        Default text type.
        See Also:
        SchemaTypeName.OSD_TEXT
      • TIME

        public static final DefaultDataTypes TIME
        Default time type.
        See Also:
        SchemaTypeName.XS_TIME
      • URI

        public static final DefaultDataTypes URI
        Default URI type.
        See Also:
        SchemaTypeName.XS_ANY_URI
      • XML_NAME

        public static final DefaultDataTypes XML_NAME
        Default XML name type.
        See Also:
        SchemaTypeName.XS_NAME
    • Method Detail

      • values

        public static DefaultDataTypes[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DefaultDataTypes c : DefaultDataTypes.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DefaultDataTypes valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • parse

        public static DataType parse​(java.lang.String code)
        Converts a unique code to a default data type.
        Throws:
        java.lang.IllegalArgumentException - if no default data type found for the code.
        See Also:
        DataType.getCode()
      • getForSchemaNode

        public static DataType getForSchemaNode​(com.orchestranetworks.schema.SchemaNode schemaNode)
        Converts a schema node to a default data type.

        Returns null if the schema node is not supported.

        See Also:
        getCompatibleSchemaTypes()
      • isAnyType

        public static boolean isAnyType​(DataType dataType)
        Returns true if this is ANY_TYPE.
      • getCode

        public java.lang.String getCode()
        Description copied from interface: DataType
        Returns the unique code.
        Specified by:
        getCode in interface DataType
      • getLabel

        public com.onwbp.base.text.UserMessage getLabel()
        Description copied from interface: DataType
        Returns the label.
        Specified by:
        getLabel in interface DataType
      • getValueClass

        public java.lang.Class<?> getValueClass()
        Description copied from interface: DataType
        Returns the class of values that this data type represents.

        This helps validate data transformation.

        Specified by:
        getValueClass in interface DataType
      • getCompatibleSchemaTypes

        public java.util.List<com.orchestranetworks.schema.SchemaTypeName> getCompatibleSchemaTypes()
        Returns the schema types in EBX that this data type represents.