com.github.fge.jsonschema.format
Interface FormatAttribute

All Known Implementing Classes:
AbstractFormatAttribute, DateAttribute, DateFormatAttribute, DateTimeAttribute, EmailAttribute, IPv4FormatAttribute, IPv6Attribute, PhoneAttribute, RegexAttribute, SharedHostNameAttribute, TimeAttribute, URIAttribute, UTCMillisecAttribute

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, 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,
              FullData data)
              throws ProcessingException
Validate the instance against this format attribute

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


Copyright © 2014. All Rights Reserved.