Package com.networknt.schema.keyword
Class BaseKeywordValidator
- java.lang.Object
-
- com.networknt.schema.keyword.AbstractKeywordValidator
-
- com.networknt.schema.keyword.BaseKeywordValidator
-
- All Implemented Interfaces:
KeywordValidator,Validator,Walker
- Direct Known Subclasses:
AdditionalPropertiesValidator,AllOfValidator,AnyOfValidator,BaseFormatValidator,ConstValidator,ContainsValidator,ContentEncodingValidator,ContentMediaTypeValidator,DependenciesValidator,DependentRequired,DependentSchemas,DiscriminatorValidator,DynamicRefValidator,EnumValidator,ExclusiveMaximumValidator,ExclusiveMinimumValidator,FalseValidator,IfValidator,ItemsLegacyValidator,ItemsValidator,MaximumValidator,MaxItemsValidator,MaxLengthValidator,MaxPropertiesValidator,MinimumValidator,MinItemsValidator,MinLengthValidator,MinMaxContainsValidator,MinPropertiesValidator,MultipleOfValidator,NotAllowedValidator,NotValidator,OneOfValidator,PatternPropertiesValidator,PatternValidator,PrefixItemsValidator,PropertiesValidator,PropertyDependenciesValidator,PropertyNamesValidator,ReadOnlyValidator,RecursiveRefValidator,RefValidator,RequiredValidator,TrueValidator,TypeValidator,UnevaluatedItemsValidator,UnevaluatedPropertiesValidator,UnionTypeValidator,UniqueItemsValidator,WriteOnlyValidator
public abstract class BaseKeywordValidator extends AbstractKeywordValidator
BaseKeywordValidator.
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,String>errorMessageprotected SchemaparentSchemaprotected SchemaContextschemaContext-
Fields inherited from class com.networknt.schema.keyword.AbstractKeywordValidator
schemaLocation, schemaNode
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseKeywordValidator(Keyword keyword, com.fasterxml.jackson.databind.JsonNode schemaNode, SchemaLocation schemaLocation, SchemaContext schemaContext, Schema parentSchema, Map<String,String> errorMessage)Constructor to create a copy using fields.BaseKeywordValidator(Keyword keyword, com.fasterxml.jackson.databind.JsonNode schemaNode, SchemaLocation schemaLocation, Schema parentSchema, SchemaContext schemaContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MessageSourceError.Buildererror()protected StringgetNodeFieldType()SchemagetParentSchema()Gets the parent schema.protected voidpreloadSchemas(Collection<Schema> schemas)-
Methods inherited from class com.networknt.schema.keyword.AbstractKeywordValidator
collectAnnotations, collectAnnotations, getKeyword, getSchemaLocation, getSchemaNode, hasAdjacentKeywordInEvaluationPath, hasUnevaluatedItemsInEvaluationPath, hasUnevaluatedPropertiesInEvaluationPath, putAnnotation, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.networknt.schema.keyword.KeywordValidator
preloadSchema
-
-
-
-
Field Detail
-
schemaContext
protected final SchemaContext schemaContext
-
parentSchema
protected final Schema parentSchema
-
-
Constructor Detail
-
BaseKeywordValidator
public BaseKeywordValidator(Keyword keyword, com.fasterxml.jackson.databind.JsonNode schemaNode, SchemaLocation schemaLocation, Schema parentSchema, SchemaContext schemaContext)
-
BaseKeywordValidator
protected BaseKeywordValidator(Keyword keyword, com.fasterxml.jackson.databind.JsonNode schemaNode, SchemaLocation schemaLocation, SchemaContext schemaContext, Schema parentSchema, Map<String,String> errorMessage)
Constructor to create a copy using fields.- Parameters:
keyword- the keywordschemaNode- the schema nodeschemaLocation- the schema locationschemaContext- the schema contextparentSchema- the parent schemaerrorMessage- the error message
-
-
Method Detail
-
getParentSchema
public Schema getParentSchema()
Gets the parent schema.This is the lexical parent schema.
- Returns:
- the parent schema
-
getNodeFieldType
protected String getNodeFieldType()
-
preloadSchemas
protected void preloadSchemas(Collection<Schema> schemas)
-
error
protected MessageSourceError.Builder error()
-
-