Package com.networknt.schema
Enum ValidatorTypeCode
- java.lang.Object
-
- java.lang.Enum<ValidatorTypeCode>
-
- com.networknt.schema.ValidatorTypeCode
-
- All Implemented Interfaces:
ErrorMessageType
,Keyword
,java.io.Serializable
,java.lang.Comparable<ValidatorTypeCode>
public enum ValidatorTypeCode extends java.lang.Enum<ValidatorTypeCode> implements Keyword, ErrorMessageType
-
-
Enum Constant Summary
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<java.lang.String,ValidatorTypeCode>
CONSTANTS
private java.lang.String
errorCode
private ValidatorFactory
validatorFactory
private java.lang.String
value
private VersionCode
versionCode
-
Constructor Summary
Constructors Modifier Constructor Description private
ValidatorTypeCode(java.lang.String value, java.lang.String errorCode, ValidatorFactory validatorFactory, VersionCode versionCode)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ValidatorTypeCode
fromValue(java.lang.String value)
java.lang.String
getErrorCode()
Your error code.java.lang.String
getErrorCodeValue()
Get the text representation of the error code.static java.util.List<ValidatorTypeCode>
getKeywords(SpecVersion.VersionFlag versionFlag)
java.lang.String
getValue()
Gets the keyword value.VersionCode
getVersionCode()
JsonValidator
newValidator(SchemaLocation schemaLocation, JsonNodePath evaluationPath, com.fasterxml.jackson.databind.JsonNode schemaNode, JsonSchema parentSchema, ValidationContext validationContext)
Creates a new validator for the keyword.java.lang.String
toString()
static ValidatorTypeCode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ValidatorTypeCode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ADDITIONAL_PROPERTIES
public static final ValidatorTypeCode ADDITIONAL_PROPERTIES
-
ALL_OF
public static final ValidatorTypeCode ALL_OF
-
ANY_OF
public static final ValidatorTypeCode ANY_OF
-
CONST
public static final ValidatorTypeCode CONST
-
CONTAINS
public static final ValidatorTypeCode CONTAINS
-
CONTENT_ENCODING
public static final ValidatorTypeCode CONTENT_ENCODING
-
CONTENT_MEDIA_TYPE
public static final ValidatorTypeCode CONTENT_MEDIA_TYPE
-
DEPENDENCIES
public static final ValidatorTypeCode DEPENDENCIES
-
DEPENDENT_REQUIRED
public static final ValidatorTypeCode DEPENDENT_REQUIRED
-
DEPENDENT_SCHEMAS
public static final ValidatorTypeCode DEPENDENT_SCHEMAS
-
DISCRIMINATOR
public static final ValidatorTypeCode DISCRIMINATOR
-
DYNAMIC_REF
public static final ValidatorTypeCode DYNAMIC_REF
-
ENUM
public static final ValidatorTypeCode ENUM
-
EXCLUSIVE_MAXIMUM
public static final ValidatorTypeCode EXCLUSIVE_MAXIMUM
-
EXCLUSIVE_MINIMUM
public static final ValidatorTypeCode EXCLUSIVE_MINIMUM
-
FALSE
public static final ValidatorTypeCode FALSE
-
FORMAT
public static final ValidatorTypeCode FORMAT
-
ID
public static final ValidatorTypeCode ID
-
IF_THEN_ELSE
public static final ValidatorTypeCode IF_THEN_ELSE
-
ITEMS_202012
public static final ValidatorTypeCode ITEMS_202012
-
ITEMS
public static final ValidatorTypeCode ITEMS
-
MAX_CONTAINS
public static final ValidatorTypeCode MAX_CONTAINS
-
MAX_ITEMS
public static final ValidatorTypeCode MAX_ITEMS
-
MAX_LENGTH
public static final ValidatorTypeCode MAX_LENGTH
-
MAX_PROPERTIES
public static final ValidatorTypeCode MAX_PROPERTIES
-
MAXIMUM
public static final ValidatorTypeCode MAXIMUM
-
MIN_CONTAINS
public static final ValidatorTypeCode MIN_CONTAINS
-
MIN_ITEMS
public static final ValidatorTypeCode MIN_ITEMS
-
MIN_LENGTH
public static final ValidatorTypeCode MIN_LENGTH
-
MIN_PROPERTIES
public static final ValidatorTypeCode MIN_PROPERTIES
-
MINIMUM
public static final ValidatorTypeCode MINIMUM
-
MULTIPLE_OF
public static final ValidatorTypeCode MULTIPLE_OF
-
NOT_ALLOWED
public static final ValidatorTypeCode NOT_ALLOWED
-
NOT
public static final ValidatorTypeCode NOT
-
ONE_OF
public static final ValidatorTypeCode ONE_OF
-
PATTERN_PROPERTIES
public static final ValidatorTypeCode PATTERN_PROPERTIES
-
PATTERN
public static final ValidatorTypeCode PATTERN
-
PREFIX_ITEMS
public static final ValidatorTypeCode PREFIX_ITEMS
-
PROPERTIES
public static final ValidatorTypeCode PROPERTIES
-
PROPERTYNAMES
public static final ValidatorTypeCode PROPERTYNAMES
-
READ_ONLY
public static final ValidatorTypeCode READ_ONLY
-
RECURSIVE_REF
public static final ValidatorTypeCode RECURSIVE_REF
-
REF
public static final ValidatorTypeCode REF
-
REQUIRED
public static final ValidatorTypeCode REQUIRED
-
TRUE
public static final ValidatorTypeCode TRUE
-
TYPE
public static final ValidatorTypeCode TYPE
-
UNEVALUATED_ITEMS
public static final ValidatorTypeCode UNEVALUATED_ITEMS
-
UNEVALUATED_PROPERTIES
public static final ValidatorTypeCode UNEVALUATED_PROPERTIES
-
UNION_TYPE
public static final ValidatorTypeCode UNION_TYPE
-
UNIQUE_ITEMS
public static final ValidatorTypeCode UNIQUE_ITEMS
-
WRITE_ONLY
public static final ValidatorTypeCode WRITE_ONLY
-
-
Field Detail
-
CONSTANTS
private static final java.util.Map<java.lang.String,ValidatorTypeCode> CONSTANTS
-
value
private final java.lang.String value
-
errorCode
private final java.lang.String errorCode
-
validatorFactory
private final ValidatorFactory validatorFactory
-
versionCode
private final VersionCode versionCode
-
-
Constructor Detail
-
ValidatorTypeCode
private ValidatorTypeCode(java.lang.String value, java.lang.String errorCode, ValidatorFactory validatorFactory, VersionCode versionCode)
-
-
Method Detail
-
values
public static ValidatorTypeCode[] 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 (ValidatorTypeCode c : ValidatorTypeCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ValidatorTypeCode 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 namejava.lang.NullPointerException
- if the argument is null
-
getKeywords
public static java.util.List<ValidatorTypeCode> getKeywords(SpecVersion.VersionFlag versionFlag)
-
fromValue
public static ValidatorTypeCode fromValue(java.lang.String value)
-
newValidator
public JsonValidator newValidator(SchemaLocation schemaLocation, JsonNodePath evaluationPath, com.fasterxml.jackson.databind.JsonNode schemaNode, JsonSchema parentSchema, ValidationContext validationContext)
Description copied from interface:Keyword
Creates a new validator for the keyword.- Specified by:
newValidator
in interfaceKeyword
- Parameters:
schemaLocation
- the schema locationevaluationPath
- the evaluation pathschemaNode
- the schema nodeparentSchema
- the parent schemavalidationContext
- the validation context- Returns:
- the validation
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<ValidatorTypeCode>
-
getValue
public java.lang.String getValue()
Description copied from interface:Keyword
Gets the keyword value.
-
getErrorCode
public java.lang.String getErrorCode()
Description copied from interface:ErrorMessageType
Your error code. Please ensure global uniqueness. Builtin error codes are sequential numbers.Customer error codes could have a prefix to denote the namespace of your custom keywords and errors.
- Specified by:
getErrorCode
in interfaceErrorMessageType
- Returns:
- error code
-
getVersionCode
public VersionCode getVersionCode()
-
getErrorCodeValue
public java.lang.String getErrorCodeValue()
Description copied from interface:ErrorMessageType
Get the text representation of the error code.- Specified by:
getErrorCodeValue
in interfaceErrorMessageType
- Returns:
- The error code value.
-
-