Class Schema.BuilderBase<BUILDER extends Schema.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Schema>

java.lang.Object
io.helidon.json.schema.Schema.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
Schema.Builder
Enclosing interface:
Schema

public abstract static class Schema.BuilderBase<BUILDER extends Schema.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Schema> extends Object implements Prototype.Builder<BUILDER,PROTOTYPE>
Fluent API builder base for Schema.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(Schema prototype)
      Update this builder from an existing prototype instance. This method disables automatic service discovery.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(Schema.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • rootFromSchema

      public BUILDER rootFromSchema(Schema schema)
      Take the root type of the provided schema and add it to the current builder.
      Parameters:
      schema - schema
      Returns:
      updated builder instance
    • clearId

      public BUILDER clearId()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • id

      public BUILDER id(URI id)
      The base URI for resolving relative references.
      Parameters:
      id - configured base URI
      Returns:
      updated builder instance
      See Also:
    • clearRootObject

      public BUILDER clearRootObject()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • rootObject

      public BUILDER rootObject(SchemaObject rootObject)
      Root of the schema should be validated as an object.
      Parameters:
      rootObject - object root schema
      Returns:
      updated builder instance
      See Also:
    • rootObject

      public BUILDER rootObject(Consumer<SchemaObject.Builder> consumer)
      Root of the schema should be validated as an object.
      Parameters:
      consumer - object root schema
      Returns:
      updated builder instance
      See Also:
    • clearRootArray

      public BUILDER clearRootArray()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • rootArray

      public BUILDER rootArray(SchemaArray rootArray)
      Root of the schema should be validated as an array.
      Parameters:
      rootArray - array root schema
      Returns:
      updated builder instance
      See Also:
    • rootArray

      public BUILDER rootArray(Consumer<SchemaArray.Builder> consumer)
      Root of the schema should be validated as an array.
      Parameters:
      consumer - array root schema
      Returns:
      updated builder instance
      See Also:
    • clearRootNumber

      public BUILDER clearRootNumber()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • rootNumber

      public BUILDER rootNumber(SchemaNumber rootNumber)
      Root of the schema should be validated as a number.
      Parameters:
      rootNumber - number root schema
      Returns:
      updated builder instance
      See Also:
    • rootNumber

      public BUILDER rootNumber(Consumer<SchemaNumber.Builder> consumer)
      Root of the schema should be validated as a number.
      Parameters:
      consumer - number root schema
      Returns:
      updated builder instance
      See Also:
    • clearRootInteger

      public BUILDER clearRootInteger()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • rootInteger

      public BUILDER rootInteger(SchemaInteger rootInteger)
      Root of the schema should be validated as an integer.
      Parameters:
      rootInteger - integer root schema
      Returns:
      updated builder instance
      See Also:
    • rootInteger

      public BUILDER rootInteger(Consumer<SchemaInteger.Builder> consumer)
      Root of the schema should be validated as an integer.
      Parameters:
      consumer - integer root schema
      Returns:
      updated builder instance
      See Also:
    • clearRootString

      public BUILDER clearRootString()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • rootString

      public BUILDER rootString(SchemaString rootString)
      Root of the schema should be validated as a string.
      Parameters:
      rootString - string root schema
      Returns:
      updated builder instance
      See Also:
    • rootString

      public BUILDER rootString(Consumer<SchemaString.Builder> consumer)
      Root of the schema should be validated as a string.
      Parameters:
      consumer - string root schema
      Returns:
      updated builder instance
      See Also:
    • clearRootBoolean

      public BUILDER clearRootBoolean()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • rootBoolean

      public BUILDER rootBoolean(SchemaBoolean rootBoolean)
      Root of the schema should be validated as a boolean.
      Parameters:
      rootBoolean - boolean root schema
      Returns:
      updated builder instance
      See Also:
    • rootBoolean

      public BUILDER rootBoolean(Consumer<SchemaBoolean.Builder> consumer)
      Root of the schema should be validated as a boolean.
      Parameters:
      consumer - boolean root schema
      Returns:
      updated builder instance
      See Also:
    • clearRootNull

      public BUILDER clearRootNull()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • rootNull

      public BUILDER rootNull(SchemaNull rootNull)
      Root of the schema should be validated as a null.
      Parameters:
      rootNull - null root schema
      Returns:
      updated builder instance
      See Also:
    • rootNull

      public BUILDER rootNull(Consumer<SchemaNull.Builder> consumer)
      Root of the schema should be validated as a null.
      Parameters:
      consumer - null root schema
      Returns:
      updated builder instance
      See Also:
    • id

      public Optional<URI> id()
      The base URI for resolving relative references.
      Returns:
      the id
    • rootObject

      public Optional<SchemaObject> rootObject()
      Root of the schema should be validated as an object.
      Returns:
      the root object
    • rootArray

      public Optional<SchemaArray> rootArray()
      Root of the schema should be validated as an array.
      Returns:
      the root array
    • rootNumber

      public Optional<SchemaNumber> rootNumber()
      Root of the schema should be validated as a number.
      Returns:
      the root number
    • rootInteger

      public Optional<SchemaInteger> rootInteger()
      Root of the schema should be validated as an integer.
      Returns:
      the root integer
    • rootString

      public Optional<SchemaString> rootString()
      Root of the schema should be validated as a string.
      Returns:
      the root string
    • rootBoolean

      public Optional<SchemaBoolean> rootBoolean()
      Root of the schema should be validated as a boolean.
      Returns:
      the root boolean
    • rootNull

      public Optional<SchemaNull> rootNull()
      Root of the schema should be validated as a null.
      Returns:
      the root null
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.