Enum Class SchemaKeyword
- All Implemented Interfaces:
Serializable,Comparable<SchemaKeyword>,Constable
JSON Schema properties and their values.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumValues of theTAG_TYPE.static enumType of content/values to be expected under a schema tag.Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionBeware that this keyword was only introduced inSchemaVersion.DRAFT_2019_09.Prior toSchemaVersion.DRAFT_2019_09, this had the same name asTAG_DEPENDENT_SCHEMAS.Prior toSchemaVersion.DRAFT_2019_09, this had the same name asTAG_DEPENDENT_REQUIRED.Beware that this keyword was only introduced inSchemaVersion.DRAFT_7.Beware that this keyword was only introduced inSchemaVersion.DRAFT_7.Beware that this keyword was only introduced inSchemaVersion.DRAFT_2019_09.Beware that this keyword was only introduced inSchemaVersion.DRAFT_7.BeforeSchemaVersion.DRAFT_2019_09all other properties in the same sub-schema besides this one were ignored.Deprecated.Beware that this keyword was only introduced inSchemaVersion.DRAFT_7.Beware that this keyword was only introduced inSchemaVersion.DRAFT_2019_09.Beware that this keyword was only introduced inSchemaVersion.DRAFT_2019_09.Beware that this keyword was only introduced inSchemaVersion.DRAFT_7. -
Method Summary
Modifier and TypeMethodDescriptionforVersion(SchemaVersion version) Provide the appropriate tag name/value, considering the specified schema version.Determine which (if any) specificTAG_TYPEvalues this keyword implies.static Map<String,SchemaKeyword> getReverseTagMap(SchemaVersion version, Predicate<SchemaKeyword> filter) Provide a map over all keywords, that represent a schema tag/property, i.e., not a value.booleansupportsContentType(SchemaKeyword.TagContent contentType) Indicate whether the given kind of values can be expected under this keyword (if it represents a tag).static SchemaKeywordReturns the enum constant of this class with the specified name.static SchemaKeyword[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TAG_SCHEMA
-
TAG_SCHEMA_VALUE
-
TAG_ID
-
TAG_ANCHOR
Beware that this keyword was only introduced inSchemaVersion.DRAFT_2019_09. -
TAG_DEFINITIONS
-
TAG_REF
BeforeSchemaVersion.DRAFT_2019_09all other properties in the same sub-schema besides this one were ignored. -
TAG_REF_MAIN
-
TAG_REF_PREFIX
Deprecated.is now implicitly created based onTAG_DEFINITIONSor an explicit alternative definitions pathCommon prefix of all standardTAG_REFvalues. -
TAG_TYPE
-
TAG_TYPE_NULL
-
TAG_TYPE_ARRAY
-
TAG_TYPE_OBJECT
-
TAG_TYPE_BOOLEAN
-
TAG_TYPE_STRING
-
TAG_TYPE_INTEGER
-
TAG_TYPE_NUMBER
-
TAG_PROPERTIES
-
TAG_UNEVALUATED_PROPERTIES
Beware that this keyword was only introduced inSchemaVersion.DRAFT_2019_09. -
TAG_ITEMS
-
TAG_PREFIX_ITEMS
Beware that this keyword was only introduced inSchemaVersion.DRAFT_2019_09. -
TAG_UNEVALUATED_ITEMS
Beware that this keyword was only introduced inSchemaVersion.DRAFT_2019_09. -
TAG_REQUIRED
-
TAG_DEPENDENT_SCHEMAS
Prior toSchemaVersion.DRAFT_2019_09, this had the same name asTAG_DEPENDENT_REQUIRED. -
TAG_DEPENDENT_REQUIRED
Prior toSchemaVersion.DRAFT_2019_09, this had the same name asTAG_DEPENDENT_SCHEMAS. -
TAG_ADDITIONAL_PROPERTIES
-
TAG_PATTERN_PROPERTIES
-
TAG_PROPERTIES_MIN
-
TAG_PROPERTIES_MAX
-
TAG_ALLOF
-
TAG_ANYOF
-
TAG_ONEOF
-
TAG_NOT
-
TAG_TITLE
-
TAG_DESCRIPTION
-
TAG_CONST
-
TAG_ENUM
-
TAG_DEFAULT
-
TAG_READ_ONLY
Beware that this keyword was only introduced inSchemaVersion.DRAFT_7. -
TAG_WRITE_ONLY
Beware that this keyword was only introduced inSchemaVersion.DRAFT_7. -
TAG_LENGTH_MIN
-
TAG_LENGTH_MAX
-
TAG_FORMAT
-
TAG_PATTERN
-
TAG_MINIMUM
-
TAG_MINIMUM_EXCLUSIVE
-
TAG_MAXIMUM
-
TAG_MAXIMUM_EXCLUSIVE
-
TAG_MULTIPLE_OF
-
TAG_ITEMS_MIN
-
TAG_ITEMS_MAX
-
TAG_ITEMS_UNIQUE
-
TAG_IF
Beware that this keyword was only introduced inSchemaVersion.DRAFT_7. -
TAG_THEN
Beware that this keyword was only introduced inSchemaVersion.DRAFT_7. -
TAG_ELSE
Beware that this keyword was only introduced inSchemaVersion.DRAFT_7.
-
-
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
-
forVersion
Provide the appropriate tag name/value, considering the specified schema version.- Parameters:
version- applicable JSON Schema version- Returns:
- corresponding tag name/value for this keyword in the indicated JSON Schema version
-
getImpliedTypes
Determine which (if any) specificTAG_TYPEvalues this keyword implies.- Returns:
- implied type values or an empty list if this keyword is not type specific
-
supportsContentType
Indicate whether the given kind of values can be expected under this keyword (if it represents a tag). Returns always false for values.- Parameters:
contentType- type of content/values to be expected under a schema tag- Returns:
- whether the given tag content type is supported by this keyword
-
getReverseTagMap
public static Map<String,SchemaKeyword> getReverseTagMap(SchemaVersion version, Predicate<SchemaKeyword> filter) Provide a map over all keywords, that represent a schema tag/property, i.e., not a value.- Parameters:
version- schema draft version to look-up keyword forfilter- additional tag filter to apply- Returns:
- mapping of schema tag/property name to its corresponding tag
-
TAG_DEFINITIONSor an explicit alternative definitions path