com.github.fge.jsonschema.keyword.validator
Class AbstractKeywordValidator

java.lang.Object
  extended by com.github.fge.jsonschema.keyword.validator.AbstractKeywordValidator
All Implemented Interfaces:
KeywordValidator
Direct Known Subclasses:
AdditionalItemsValidator, AdditionalPropertiesValidator, DependenciesValidator, DraftV3TypeKeywordValidator, DraftV4TypeValidator, EnumValidator, Example9.DivisorsKeywordValidator, ExtendsValidator, NotValidator, NumericValidator, PatternValidator, PositiveIntegerValidator, PropertiesValidator, RequiredKeywordValidator, SchemaArrayValidator, UniqueItemsValidator

public abstract class AbstractKeywordValidator
extends Object
implements KeywordValidator

Base abstract class for keyword validators

This class provides a template message for error reporting, with all details about the current validation context already filled.


Field Summary
protected  String keyword
           
 
Constructor Summary
protected AbstractKeywordValidator(String keyword)
          Protected constructor
 
Method Summary
protected  ProcessingMessage newMsg(FullData data)
           
protected  ProcessingMessage newMsg(FullData data, MessageBundle bundle, String key)
           
protected static
<T> JsonNode
toArrayNode(Collection<T> collection)
           
abstract  String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.github.fge.jsonschema.keyword.validator.KeywordValidator
validate
 

Field Detail

keyword

protected final String keyword
Constructor Detail

AbstractKeywordValidator

protected AbstractKeywordValidator(String keyword)
Protected constructor

Parameters:
keyword - the keyword's name
Method Detail

newMsg

protected final ProcessingMessage newMsg(FullData data)

newMsg

protected final ProcessingMessage newMsg(FullData data,
                                         MessageBundle bundle,
                                         String key)

toArrayNode

protected static <T> JsonNode toArrayNode(Collection<T> collection)

toString

public abstract String toString()
Overrides:
toString in class Object