com.github.fge.jsonschema.format.helpers
Class DateFormatAttribute

java.lang.Object
  extended by com.github.fge.jsonschema.format.AbstractFormatAttribute
      extended by com.github.fge.jsonschema.format.helpers.DateFormatAttribute
All Implemented Interfaces:
FormatAttribute
Direct Known Subclasses:
DateAttribute, DateTimeAttribute, TimeAttribute

public abstract class DateFormatAttribute
extends AbstractFormatAttribute

Abstract class for date/time related format attributes

Joda Time is used for date and time parsing: it can handle all defined formats, and catches more errors than the standard JDK's SimpleDateFormat does.

Furthermore (and more importantly), unlike SimpleDateFormat, Joda Time's DateTimeFormatter is thread-safe!


Constructor Summary
protected DateFormatAttribute(String fmt, String format)
           
 
Method Summary
 void validate(ProcessingReport report, FullData data)
          Validate the instance against this format attribute
 
Methods inherited from class com.github.fge.jsonschema.format.AbstractFormatAttribute
newMsg, supportedTypes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateFormatAttribute

protected DateFormatAttribute(String fmt,
                              String format)
Method Detail

validate

public final void validate(ProcessingReport report,
                           FullData data)
                    throws ProcessingException
Description copied from interface: FormatAttribute
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.