com.github.fge.jsonschema.core.load.configuration
Class LoadingConfiguration

java.lang.Object
  extended by com.github.fge.jsonschema.core.load.configuration.LoadingConfiguration
All Implemented Interfaces:
Frozen<LoadingConfigurationBuilder>

public final class LoadingConfiguration
extends Object
implements Frozen<LoadingConfigurationBuilder>

Loading configuration (frozen instance)

With a loading configuration, you can influence the following aspects:

The default configuration only preloads the core metaschemas for draft v4 and draft v3, and uses canonical dereferencing mode; it also uses the default set of supported schemes:

You don't instantiate this class directly, you must go through a LoadingConfigurationBuilder for this (using newBuilder(); alternatively, you can obtain a default configuration using byDefault().

See Also:
LoadingConfigurationBuilder, Dereferencing, URIManager, SchemaLoader

Method Summary
static LoadingConfiguration byDefault()
          Create a default, immutable loading configuration
 Dereferencing getDereferencing()
          Return the dereferencing mode used for this configuration
 Map<String,URIDownloader> getDownloaderMap()
          Return the map of downloaders for this configuration
 boolean getEnableCache()
          Return if we want to cache loaded schema or not note that this do not affect preloadedSchema that are always cached
 Map<URI,JsonNode> getPreloadedSchemas()
          Return the map of preloaded schemas
 JsonNodeReader getReader()
          Get a configured JsonNodeReader
 URITranslatorConfiguration getTranslatorConfiguration()
           
static LoadingConfigurationBuilder newBuilder()
          Create a new, default, mutable configuration instance
 LoadingConfigurationBuilder thaw()
          Return a thawed version of this loading configuration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newBuilder

public static LoadingConfigurationBuilder newBuilder()
Create a new, default, mutable configuration instance

Returns:
a LoadingConfigurationBuilder

byDefault

public static LoadingConfiguration byDefault()
Create a default, immutable loading configuration

This is the result of calling Thawed.freeze() on newBuilder().

Returns:
a default configuration

getDownloaderMap

public Map<String,URIDownloader> getDownloaderMap()
Return the map of downloaders for this configuration

Returns:
an ImmutableMap of downloaders
Since:
1.1.9

getTranslatorConfiguration

public URITranslatorConfiguration getTranslatorConfiguration()

getDereferencing

public Dereferencing getDereferencing()
Return the dereferencing mode used for this configuration

Returns:
the dereferencing mode

getPreloadedSchemas

public Map<URI,JsonNode> getPreloadedSchemas()
Return the map of preloaded schemas

Returns:
an immutable map of preloaded schemas

getReader

public JsonNodeReader getReader()
Get a configured JsonNodeReader

Returns:
the JSON reader
See Also:
JsonNodeReader

getEnableCache

public boolean getEnableCache()
Return if we want to cache loaded schema or not note that this do not affect preloadedSchema that are always cached

Returns:
if the cache has to be enabled

thaw

public LoadingConfigurationBuilder thaw()
Return a thawed version of this loading configuration

Specified by:
thaw in interface Frozen<LoadingConfigurationBuilder>
Returns:
a thawed copy
See Also:
LoadingConfigurationBuilder.LoadingConfigurationBuilder(LoadingConfiguration)