public final class LoadingConfigurationBuilder extends Object implements com.github.fge.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 downloaderNullPointerException - scheme or downloader is nullIllegalArgumentException - illegal schemepublic LoadingConfigurationBuilder removeScheme(String scheme)
scheme - the schemepublic LoadingConfigurationBuilder setNamespace(String input)
input - the namespaceNullPointerException - input is nullIllegalArgumentException - input is not an absolute JSON ReferenceJsonRefpublic LoadingConfigurationBuilder dereferencing(Dereferencing dereferencing)
By default, it is Dereferencing.CANONICAL.
dereferencing - the dereferencing modeNullPointerException - dereferencing mode is nullpublic LoadingConfigurationBuilder addSchemaRedirect(String source, String destination)
source - URI of the source schemadestination - URI to redirect toNullPointerException - source or destination is nullIllegalArgumentException - source and destination are the same URIJsonRefpublic 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 schemaNullPointerException - the URI or schema is nullIllegalArgumentException - a schema already exists at this URIJsonRefpublic LoadingConfigurationBuilder preloadSchema(JsonNode schema)
Use this if the schema already has an absolute id.
schema - the schemaNullPointerException - schema is nullIllegalArgumentException - schema has no id, or its id is not an absolute JSON ReferenceJsonRefpublic LoadingConfiguration freeze()
freeze in interface com.github.fge.Thawed<LoadingConfiguration>Copyright © 2013. All Rights Reserved.