Class AbstractJsonValidator

    • Field Detail

      • schemaNode

        private final com.fasterxml.jackson.databind.JsonNode schemaNode
      • keyword

        private final java.lang.String keyword
    • Constructor Detail

      • AbstractJsonValidator

        public AbstractJsonValidator​(SchemaLocation schemaLocation,
                                     JsonNodePath evaluationPath,
                                     Keyword keyword,
                                     com.fasterxml.jackson.databind.JsonNode schemaNode)
        Constructor.
        Parameters:
        schemaLocation - the schema location
        evaluationPath - the evaluation path
        keyword - the keyword
        schemaNode - the schema node
    • Method Detail

      • getSchemaLocation

        public SchemaLocation getSchemaLocation()
        Description copied from interface: JsonValidator
        The schema location is the canonical URI of the schema object plus a JSON Pointer fragment indicating the subschema that produced a result. In contrast with the evaluation path, the schema location MUST NOT include by-reference applicators such as $ref or $dynamicRef.
        Specified by:
        getSchemaLocation in interface JsonValidator
        Returns:
        the schema location
      • getEvaluationPath

        public JsonNodePath getEvaluationPath()
        Description copied from interface: JsonValidator
        The evaluation path is the set of keys, starting from the schema root, through which evaluation passes to reach the schema object that produced a specific result.
        Specified by:
        getEvaluationPath in interface JsonValidator
        Returns:
        the evaluation path
      • getKeyword

        public java.lang.String getKeyword()
        Description copied from interface: JsonValidator
        The keyword of the validator.
        Specified by:
        getKeyword in interface JsonValidator
        Returns:
        the keyword
      • getSchemaNode

        public com.fasterxml.jackson.databind.JsonNode getSchemaNode()
        The schema node used to create the validator.
        Returns:
        the schema node
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • collectAnnotations

        protected boolean collectAnnotations​(ExecutionContext executionContext)
        Determine if annotations should be reported.
        Parameters:
        executionContext - the execution context
        Returns:
        true if annotations should be reported
      • collectAnnotations

        protected boolean collectAnnotations​(ExecutionContext executionContext,
                                             java.lang.String keyword)
        Determine if annotations should be reported.
        Parameters:
        executionContext - the execution context
        keyword - the keyword
        Returns:
        true if annotations should be reported
      • putAnnotation

        protected void putAnnotation​(ExecutionContext executionContext,
                                     java.util.function.Consumer<JsonNodeAnnotation.Builder> customizer)
        Puts an annotation.
        Parameters:
        executionContext - the execution context
        customizer - to customize the annotation