|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.github.fge.jsonschema.format.AbstractFormatAttribute
public abstract class AbstractFormatAttribute
Base abstract class for a format attribute
You should really use this class instead of implementing FormatAttribute directly. Its main, but important, helping role is to
build the list of supported types for you.
| Constructor Summary | |
|---|---|
protected |
AbstractFormatAttribute(String fmt,
NodeType first,
NodeType... other)
Protected constructor |
| Method Summary | |
|---|---|
protected ProcessingMessage |
newMsg(FullData data,
MessageBundle bundle,
String key)
Return a new message for this format attribute |
EnumSet<NodeType> |
supportedTypes()
Return the set of JSON Schema types this format attribute applies to |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.github.fge.jsonschema.format.FormatAttribute |
|---|
validate |
| Constructor Detail |
|---|
protected AbstractFormatAttribute(String fmt,
NodeType first,
NodeType... other)
fmt - the name for this format attributefirst - first supported typeother - other supported types, if anysupportedTypes()| Method Detail |
|---|
public final EnumSet<NodeType> supportedTypes()
FormatAttributeIt 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.
supportedTypes in interface FormatAttribute
protected final ProcessingMessage newMsg(FullData data,
MessageBundle bundle,
String key)
data - the validation contextkey - key in the format bundle message
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||