|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.github.fge.jsonschema.cfg.ValidationConfigurationBuilder
public final class ValidationConfigurationBuilder
Validation configuration (mutable instance)
ValidationConfiguration
Method Summary | |
---|---|
ValidationConfigurationBuilder |
addLibrary(String uri,
Library library)
Add a $schema and matching library to this configuration |
ValidationConfiguration |
freeze()
Return a frozen version of this configuration |
ValidationConfigurationBuilder |
setDefaultLibrary(String uri,
Library library)
Add a library and sets it as the default |
ValidationConfigurationBuilder |
setDefaultVersion(SchemaVersion version)
Set the default schema version for this configuration |
ValidationConfigurationBuilder |
setUseFormat(boolean useFormat)
Tell whether the resulting configuration has support for format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public ValidationConfigurationBuilder addLibrary(String uri, Library library)
$schema
and matching library to this configuration
uri
- the value for $schema
library
- the library
ValidationConfigurationError
- provided URI is null, not a URI, or
not an absolute JSON Reference; library is null; or there already exists
a library for this value of $schema
public ValidationConfigurationBuilder setDefaultVersion(SchemaVersion version)
This will set the default library to use to the one registered for this schema version.
version
- the version
ValidationConfigurationError
- version is nullpublic ValidationConfigurationBuilder setDefaultLibrary(String uri, Library library)
uri
- the value for $schema
library
- the library
addLibrary(String, Library)
public ValidationConfigurationBuilder setUseFormat(boolean useFormat)
format
useFormat
- true
if it must be used
public ValidationConfiguration freeze()
freeze
in interface Thawed<ValidationConfiguration>
ValidationConfiguration
ValidationConfiguration.ValidationConfiguration(ValidationConfigurationBuilder)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |