io.vertx.json.schema.common

## Class BaseSingleSchemaValidatorFactory

- java.lang.Object
- - io.vertx.json.schema.common.BaseSingleSchemaValidatorFactory

- All Implemented Interfaces:
    ValidatorFactory
  Direct Known Subclasses:
    ContainsValidatorFactory, ItemsValidatorFactory, NotValidatorFactory, PropertyNamesValidatorFactory

      public abstract class BaseSingleSchemaValidatorFactory
      extends Object
      implements ValidatorFactory

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BaseSingleSchemaValidatorFactory()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `canConsumeSchema(JsonObject schema)` Returns true if this factory can consume the provided schema, eventually returning an instance of `Validator`
    `Validator` | `createValidator(JsonObject schema, JsonPointer scope, SchemaParserInternal parser, MutableStateValidator parent)` This method consume the schema eventually creating a new `Validator`.
    `protected abstract String` | `getKeyword()`
    `protected abstract BaseSingleSchemaValidator` | `instantiate(MutableStateValidator parent)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BaseSingleSchemaValidatorFactory

          public BaseSingleSchemaValidatorFactory()

  - ### Method Detail

    - #### createValidator

          public Validator createValidator(JsonObject schema,
                                           JsonPointer scope,
                                           SchemaParserInternal parser,
                                           MutableStateValidator parent)

      Description copied from interface: `ValidatorFactory`
      This method consume the schema eventually creating a new `Validator`. The schema parser calls it during schema parsing only if `ValidatorFactory.canConsumeSchema(JsonObject)` returns true

      You can return any of `SyncValidator`, `AsyncValidator` or `MutableStateValidator`

      Specified by:
        `createValidator` in interface `ValidatorFactory`
      Parameters:
        `schema` - JsonObject representing the schema
        `scope` - scope of the parsed schema
        `parser` - caller parser
        `parent` - parent of this schema
      Returns:
        the created validator.

    - #### canConsumeSchema

          public boolean canConsumeSchema(JsonObject schema)

      Description copied from interface: `ValidatorFactory`
      Returns true if this factory can consume the provided schema, eventually returning an instance of `Validator`
      Specified by:
        `canConsumeSchema` in interface `ValidatorFactory`
      Returns:

    - #### instantiate

          protected abstract BaseSingleSchemaValidator instantiate(MutableStateValidator parent)

    - #### getKeyword

          protected abstract String getKeyword()

Copyright © 2022 Eclipse. All rights reserved.