public final class LoadingConfigurationBuilder extends Object implements Thawed<LoadingConfiguration>
LoadingConfiguration
Modifier and Type | Method and Description |
---|---|
LoadingConfigurationBuilder |
addSchemaRedirect(String source,
String destination)
Add a schema redirection
|
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 |
removeScheme(String scheme)
Remove a downloader for a given scheme
|
LoadingConfigurationBuilder |
setNamespace(String input)
Set the default namespace for that loading configuration
|
public LoadingConfigurationBuilder addScheme(String scheme, URIDownloader downloader)
scheme
- the schemedownloader
- the downloaderLoadingConfigurationError
- scheme is null or illegalDictionaryBuildError
- downloader is nullpublic LoadingConfigurationBuilder removeScheme(String scheme)
scheme
- the schemepublic LoadingConfigurationBuilder setNamespace(String input)
input
- the namespaceValidationConfigurationError
- input is null or not an absolute
JSON ReferenceRefSanityChecks.absoluteLocator(String)
,
JsonRef
public LoadingConfigurationBuilder dereferencing(Dereferencing dereferencing)
By default, it is Dereferencing.CANONICAL
.
dereferencing
- the dereferencing modeLoadingConfigurationError
- dereferencing mode is nullpublic LoadingConfigurationBuilder addSchemaRedirect(String source, String destination)
source
- URI of the source schemadestination
- URI to redirect toValidationConfigurationError
- either the source or destination
URIs are null or not absolute JSON ReferencesLoadingConfigurationError
- source and destination are the sameJsonRef
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 schemaLoadingConfigurationError
- the URI is null and/or not an absolute
JSON Reference, or the node is nullJsonRef
public LoadingConfigurationBuilder preloadSchema(JsonNode schema)
Use this if the schema already has an absolute id
.
schema
- the schemaLoadingConfigurationError
- the schema is null, or it has no id
, or its id
is not an absolute JSON ReferenceJsonRef
public LoadingConfiguration freeze()
freeze
in interface Thawed<LoadingConfiguration>
Copyright © 2013. All Rights Reserved.