Enum Class ItemType

java.lang.Object
java.lang.Enum<ItemType>
io.permazen.schema.ItemType
All Implemented Interfaces:
Serializable, Comparable<ItemType>, Constable

public enum ItemType extends Enum<ItemType>
The various types of items that constitute a SchemaModel.
  • Enum Constant Details

    • SCHEMA_MODEL

      public static final ItemType SCHEMA_MODEL
    • OBJECT_TYPE

      public static final ItemType OBJECT_TYPE
    • SIMPLE_FIELD

      public static final ItemType SIMPLE_FIELD
    • REFERENCE_FIELD

      public static final ItemType REFERENCE_FIELD
    • ENUM_FIELD

      public static final ItemType ENUM_FIELD
    • ENUM_ARRAY_FIELD

      public static final ItemType ENUM_ARRAY_FIELD
    • COUNTER_FIELD

      public static final ItemType COUNTER_FIELD
    • SET_FIELD

      public static final ItemType SET_FIELD
    • LIST_FIELD

      public static final ItemType LIST_FIELD
    • MAP_FIELD

      public static final ItemType MAP_FIELD
    • COMPOSITE_INDEX

      public static final ItemType COMPOSITE_INDEX
  • Method Details

    • values

      public static ItemType[] 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

      public static ItemType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getTypeCode

      public String getTypeCode()
      Get the type code, which prefixes generated SchemaIds.
      Returns:
      type code for this schema item type
    • getElementName

      public QName getElementName()
      Get the XML element used for this item type.
      Returns:
      XML element name
    • isFieldItemType

      public boolean isFieldItemType()
      Determine if this instance represents an object field item type.
      Returns:
      true for field item types, otherwise false
    • forTypeCode

      public static ItemType forTypeCode(String typeCode)
      Get instance that corresponds to the given type code.
      Returns:
      item type
      Throws:
      IllegalArgumentException - if typeCode is null or invalid