com.github.fge.jsonschema.format
Interface FormatAttribute

All Known Implementing Classes:
AbstractDateFormatAttribute, AbstractFormatAttribute, Base64FormatAttribute, DateAttribute, DateTimeAttribute, EmailAttribute, HexStringFormatAttribute, IPv4FormatAttribute, IPv6Attribute, JsonPointerFormatAttribute, MacAddressFormatAttribute, MD5FormatAttribute, PhoneAttribute, RegexAttribute, SHA1FormatAttribute, SHA256FormatAttribute, SHA512FormatAttribute, SharedHostNameAttribute, TimeAttribute, URIAttribute, URITemplateFormatAttribute, UTCMillisecAttribute, UUIDFormatAttribute

public interface FormatAttribute

Interface for a format attribute validator


Method Summary
 EnumSet<NodeType> supportedTypes()
          Return the set of JSON Schema types this format attribute applies to
 void validate(ProcessingReport report, MessageBundle bundle, FullData data)
          Validate the instance against this format attribute
 

Method Detail

supportedTypes

EnumSet<NodeType> supportedTypes()
Return the set of JSON Schema types this format attribute applies to

It is important that this method be implemented correctly. Remind that validation for a given format attribute and an instance which type is not supported always succeeds.

Returns:
the set of supported types

validate

void validate(ProcessingReport report,
              MessageBundle bundle,
              FullData data)
              throws ProcessingException
Validate the instance against this format attribute

Parameters:
report - the report to use
bundle - the message bundle to use
data - the validation data
Throws:
ProcessingException - an exception occurs (normally, never for a format attribute)