Class Draft7EvaluatorFactory

java.lang.Object
dev.harrel.jsonschema.Draft7EvaluatorFactory
All Implemented Interfaces:
EvaluatorFactory

public class Draft7EvaluatorFactory extends Object
EvaluatorFactory implementation that supports draft 7 specification.
  • Constructor Details

    • Draft7EvaluatorFactory

      public Draft7EvaluatorFactory()
  • Method Details

    • create

      public Optional<Evaluator> create(SchemaParsingContext ctx, String fieldName, JsonNode node)
      Description copied from interface: EvaluatorFactory
      This method will be invoked for each JSON object field during schema parsing process. Must not throw any exceptions.
      Specified by:
      create in interface EvaluatorFactory
      Parameters:
      ctx - current schema parsing context
      fieldName - field name (keyword) in JSON object for which Evaluator should be created
      node - value of field in JSON object
      Returns:
      If this factory supports given field name (keyword) it should return corresponding Evaluator wrapped in Optional, Optional.empty() otherwise.