Package org.everit.json.schema
Class Schema.Builder<S extends Schema>
- java.lang.Object
-
- org.everit.json.schema.Schema.Builder<S>
-
- Type Parameters:
S
- the type of the schema being built by the builder subclass.
- Direct Known Subclasses:
ArraySchema.Builder
,BooleanSchema.Builder
,CombinedSchema.Builder
,ConditionalSchema.Builder
,ConstSchema.ConstSchemaBuilder
,EmptySchema.Builder
,EnumSchema.Builder
,FalseSchema.Builder
,NotSchema.Builder
,NullSchema.Builder
,NumberSchema.Builder
,ObjectSchema.Builder
,ReferenceSchema.Builder
,StringSchema.Builder
- Enclosing class:
- Schema
public abstract static class Schema.Builder<S extends Schema> extends Object
Abstract builder class for the builder classes ofSchema
subclasses. This builder is used to load the generic properties of all types of schemas liketitle
ordescription
.
-
-
Field Summary
Fields Modifier and Type Field Description Map<String,Object>
unprocessedProperties
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description abstract S
build()
Schema.Builder<S>
defaultValue(Object defaultValue)
Schema.Builder<S>
description(String description)
Schema.Builder<S>
id(String id)
Schema.Builder<S>
nullable(Boolean nullable)
Schema.Builder<S>
readOnly(Boolean readOnly)
Schema.Builder<S>
schemaLocation(String schemaLocation)
Deprecated.UseschemaLocation(SchemaLocation)
instead.Schema.Builder<S>
schemaLocation(SchemaLocation location)
Schema.Builder<S>
title(String title)
Schema.Builder<S>
unprocessedProperties(Map<String,Object> unprocessedProperties)
Schema.Builder<S>
writeOnly(Boolean writeOnly)
-
-
-
Method Detail
-
title
public Schema.Builder<S> title(String title)
-
description
public Schema.Builder<S> description(String description)
-
id
public Schema.Builder<S> id(String id)
-
schemaLocation
@Deprecated public Schema.Builder<S> schemaLocation(String schemaLocation)
Deprecated.UseschemaLocation(SchemaLocation)
instead.
-
schemaLocation
public Schema.Builder<S> schemaLocation(SchemaLocation location)
-
defaultValue
public Schema.Builder<S> defaultValue(Object defaultValue)
-
nullable
public Schema.Builder<S> nullable(Boolean nullable)
-
readOnly
public Schema.Builder<S> readOnly(Boolean readOnly)
-
writeOnly
public Schema.Builder<S> writeOnly(Boolean writeOnly)
-
unprocessedProperties
public Schema.Builder<S> unprocessedProperties(Map<String,Object> unprocessedProperties)
-
build
public abstract S build()
-
-