Class FormatKeyword

  • All Implemented Interfaces:
    Keyword

    public class FormatKeyword
    extends java.lang.Object
    implements Keyword
    Format Keyword.
    • Field Detail

      • value

        private final java.lang.String value
      • formats

        private final java.util.Map<java.lang.String,​Format> formats
    • Constructor Detail

      • FormatKeyword

        public FormatKeyword​(java.util.Map<java.lang.String,​Format> formats)
      • FormatKeyword

        public FormatKeyword​(ValidatorTypeCode type,
                             java.util.Map<java.lang.String,​Format> formats)
      • FormatKeyword

        public FormatKeyword​(java.lang.String value,
                             ErrorMessageType errorMessageType,
                             java.util.Map<java.lang.String,​Format> formats)
    • Method Detail

      • getFormats

        java.util.Collection<Format> getFormats()
      • newValidator

        public JsonValidator newValidator​(SchemaLocation schemaLocation,
                                          JsonNodePath evaluationPath,
                                          com.fasterxml.jackson.databind.JsonNode schemaNode,
                                          JsonSchema parentSchema,
                                          ValidationContext validationContext)
        Description copied from interface: Keyword
        Creates a new validator for the keyword.
        Specified by:
        newValidator in interface Keyword
        Parameters:
        schemaLocation - the schema location
        evaluationPath - the evaluation path
        schemaNode - the schema node
        parentSchema - the parent schema
        validationContext - the validation context
        Returns:
        the validation
      • getValue

        public java.lang.String getValue()
        Description copied from interface: Keyword
        Gets the keyword value.
        Specified by:
        getValue in interface Keyword
        Returns:
        the keyword value