com.github.fge.jsonschema.format.helpers
Class DateFormatAttribute
java.lang.Object
com.github.fge.jsonschema.format.AbstractFormatAttribute
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!
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateFormatAttribute
protected DateFormatAttribute(String fmt,
String format)
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 usedata
- the validation data
- Throws:
ProcessingException
- an exception occurs (normally, never for a
format attribute)
Copyright © 2014. All Rights Reserved.