public static class SchemaLoader.SchemaLoaderBuilder extends Object
SchemaLoader.| Constructor and Description |
|---|
SchemaLoaderBuilder() |
| Modifier and Type | Method and Description |
|---|---|
SchemaLoader.SchemaLoaderBuilder |
addFormatValidator(FormatValidator formatValidator)
Registers a format validator with the name returned by
FormatValidator.formatName(). |
SchemaLoader.SchemaLoaderBuilder |
addFormatValidator(String formatName,
FormatValidator formatValidator)
Deprecated.
instead it is better to override
FormatValidator.formatName()
and use addFormatValidator(FormatValidator) |
SchemaLoader |
build() |
org.json.JSONObject |
getRootSchemaJson() |
SchemaLoader.SchemaLoaderBuilder |
httpClient(SchemaClient httpClient) |
SchemaLoader.SchemaLoaderBuilder |
resolutionScope(String id)
Sets the initial resolution scope of the schema.
|
SchemaLoader.SchemaLoaderBuilder |
resolutionScope(URI id) |
SchemaLoader.SchemaLoaderBuilder |
schemaJson(org.json.JSONObject schemaJson) |
public SchemaLoader.SchemaLoaderBuilder addFormatValidator(FormatValidator formatValidator)
FormatValidator.formatName().formatValidator - this@Deprecated public SchemaLoader.SchemaLoaderBuilder addFormatValidator(String formatName, FormatValidator formatValidator)
FormatValidator.formatName()
and use addFormatValidator(FormatValidator)formatName - the name which will be used in the schema JSON files to refer to this formatValidatorformatValidator - the object performing the validation for schemas which use the formatName formatthispublic SchemaLoader build()
public org.json.JSONObject getRootSchemaJson()
public SchemaLoader.SchemaLoaderBuilder httpClient(SchemaClient httpClient)
public SchemaLoader.SchemaLoaderBuilder resolutionScope(String id)
id and $ref attributes
accuring in the schema will be resolved against this value.id - the initial (absolute) URI, used as the resolution scope.thispublic SchemaLoader.SchemaLoaderBuilder resolutionScope(URI id)
public SchemaLoader.SchemaLoaderBuilder schemaJson(org.json.JSONObject schemaJson)
Copyright © 2017 Everit Kft.. All rights reserved.