com.github.fge.jsonschema.cfg
Class ValidationConfiguration

java.lang.Object
  extended by com.github.fge.jsonschema.cfg.ValidationConfiguration
All Implemented Interfaces:
Frozen<ValidationConfigurationBuilder>

public final class ValidationConfiguration
extends Object
implements Frozen<ValidationConfigurationBuilder>

Validation configuration (frozen instance)

This allows you to configure the following aspects of validation:

The default configuration has both draft v4 and draft v3 libraries preloaded, and format validation is enabled; the default library to use is draft v4.

See Also:
ValidationConfigurationBuilder, Keyword, Library

Method Summary
static ValidationConfiguration byDefault()
          Return a default, frozen configuration
 Library getDefaultLibrary()
          Return the default library to use
 Map<JsonRef,Library> getLibraries()
          Return the map of libraries for this configuration
 boolean getUseFormat()
          Whether format should be used
static ValidationConfigurationBuilder newBuilder()
          Return a new thawed instance of the default configuration
 ValidationConfigurationBuilder thaw()
          Return a thawed instance out of this frozen configuration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newBuilder

public static ValidationConfigurationBuilder newBuilder()
Return a new thawed instance of the default configuration

Returns:
a new configuration builder
See Also:
ValidationConfigurationBuilder.ValidationConfigurationBuilder()

byDefault

public static ValidationConfiguration byDefault()
Return a default, frozen configuration

Returns:
a new configuration

getLibraries

public Map<JsonRef,Library> getLibraries()
Return the map of libraries for this configuration

Returns:
an immutable map

getDefaultLibrary

public Library getDefaultLibrary()
Return the default library to use

Returns:
a library

getUseFormat

public boolean getUseFormat()
Whether format should be used

Returns:
true if the answer is yes

thaw

public ValidationConfigurationBuilder thaw()
Return a thawed instance out of this frozen configuration

Specified by:
thaw in interface Frozen<ValidationConfigurationBuilder>
Returns:
a ValidationConfigurationBuilder
See Also:
ValidationConfigurationBuilder.ValidationConfigurationBuilder(ValidationConfiguration)


Copyright © 2014. All Rights Reserved.