Package io.permazen.schema
Enum Class ItemType
- All Implemented Interfaces:
Serializable
,Comparable<ItemType>
,Constable
The various types of items that constitute a
SchemaModel
.
Note there is a value SCHEMA_MODEL
for SchemaModel
, even though a SchemaModel
is technically not a SchemaItem
.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic ItemType
forTypeCode
(String typeCode) Get instance that corresponds to the given type code.Get the XML element used for this item type.Get the type code, which prefixes generatedSchemaId
s.boolean
Determine if this instance represents an object field item type.static ItemType
Returns the enum constant of this class with the specified name.static ItemType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SCHEMA_MODEL
-
OBJECT_TYPE
-
SIMPLE_FIELD
-
REFERENCE_FIELD
-
ENUM_FIELD
-
ENUM_ARRAY_FIELD
-
COUNTER_FIELD
-
SET_FIELD
-
LIST_FIELD
-
MAP_FIELD
-
COMPOSITE_INDEX
-
-
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
-
getTypeCode
Get the type code, which prefixes generatedSchemaId
s.- Returns:
- type code for this schema item type
-
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
Get instance that corresponds to the given type code.- Returns:
- item type
- Throws:
IllegalArgumentException
- iftypeCode
is null or invalid
-