|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.github.fge.jsonschema.core.load.configuration.LoadingConfigurationBuilder
public final class LoadingConfigurationBuilder
Loading configuration (mutable instance)
LoadingConfiguration| Method Summary | |
|---|---|
LoadingConfigurationBuilder |
addParserFeature(JsonParser.Feature feature)
Add a JsonParser feature |
LoadingConfigurationBuilder |
addScheme(String scheme,
URIDownloader downloader)
Add a new URI downloader |
LoadingConfigurationBuilder |
dereferencing(Dereferencing dereferencing)
Set the dereferencing mode for this loading configuration |
LoadingConfiguration |
freeze()
Freeze this configuration |
LoadingConfigurationBuilder |
preloadSchema(JsonNode schema)
Preload a schema |
LoadingConfigurationBuilder |
preloadSchema(String uri,
JsonNode schema)
Preload a schema at a given URI |
LoadingConfigurationBuilder |
removeParserFeature(JsonParser.Feature feature)
Remove a JSON parser feature |
LoadingConfigurationBuilder |
removeScheme(String scheme)
Remove a downloader for a given scheme |
LoadingConfigurationBuilder |
setEnableCache(boolean enableCache)
Should we enable caching of downloaded schemas |
LoadingConfigurationBuilder |
setURITranslatorConfiguration(URITranslatorConfiguration translatorCfg)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public LoadingConfigurationBuilder setEnableCache(boolean enableCache)
Note that this does not affect preloaded schemas
enableCache - if loaded schemas have to be cached
public LoadingConfigurationBuilder addScheme(String scheme,
URIDownloader downloader)
scheme - the schemedownloader - the downloader
NullPointerException - scheme or downloader is null
IllegalArgumentException - illegal schemepublic LoadingConfigurationBuilder removeScheme(String scheme)
scheme - the scheme
public LoadingConfigurationBuilder setURITranslatorConfiguration(URITranslatorConfiguration translatorCfg)
public LoadingConfigurationBuilder dereferencing(Dereferencing dereferencing)
By default, it is Dereferencing.CANONICAL.
dereferencing - the dereferencing mode
NullPointerException - dereferencing mode is null
public LoadingConfigurationBuilder preloadSchema(String uri,
JsonNode schema)
Use this if the schema you wish to preload does not have an absolute
id at the top level.
Note that the syntax of the schema is not checked at this stage.
uri - the URI to useschema - the schema
NullPointerException - the URI or schema is null
IllegalArgumentException - a schema already exists at this URIJsonRefpublic LoadingConfigurationBuilder preloadSchema(JsonNode schema)
Use this if the schema already has an absolute id.
schema - the schema
NullPointerException - schema is null
IllegalArgumentException - schema has no id, or its id is not an absolute JSON ReferenceJsonRefpublic LoadingConfigurationBuilder addParserFeature(JsonParser.Feature feature)
Use this option to enable non-standard JSON schema source including comments, single quotes, unquoted field names, etc.
feature - the JsonParser feature to enable
NullPointerException - feature is nullJsonParser.Featurepublic LoadingConfigurationBuilder removeParserFeature(JsonParser.Feature feature)
Note that attempts to remove JsonParser.Feature.AUTO_CLOSE_SOURCE will
be ignored for safety reasons.
feature - the feature to remove
NullPointerException - feature is nulladdParserFeature(JsonParser.Feature)public LoadingConfiguration freeze()
freeze in interface Thawed<LoadingConfiguration>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||