com.github.fge.jsonschema.main
Class JsonSchemaFactoryBuilder

java.lang.Object
  extended by com.github.fge.jsonschema.main.JsonSchemaFactoryBuilder
All Implemented Interfaces:
Thawed<JsonSchemaFactory>

@NotThreadSafe
public final class JsonSchemaFactoryBuilder
extends Object
implements Thawed<JsonSchemaFactory>

Thawed instance of a JsonSchemaFactory

This is the class you will use to configure a schema factory before use, should you need to. In most cases, the default factory will be enough.

In order to obtain an instance of this builder class, use JsonSchemaFactory.newBuilder().

See Also:
JsonSchemaFactory.byDefault(), LoadingConfiguration, ValidationConfiguration, ReportProvider

Method Summary
 JsonSchemaFactory freeze()
          Build a frozen instance of this factory configuration
 JsonSchemaFactoryBuilder setLoadingConfiguration(LoadingConfiguration loadingCfg)
          Set a new loading configuration for this factory
 JsonSchemaFactoryBuilder setReportProvider(ReportProvider reportProvider)
          Set a new report provider for this factory
 JsonSchemaFactoryBuilder setValidationConfiguration(ValidationConfiguration validationCfg)
          Set a new validation configuration for this factory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setReportProvider

public JsonSchemaFactoryBuilder setReportProvider(ReportProvider reportProvider)
Set a new report provider for this factory

Parameters:
reportProvider - the report provider
Returns:
this
Throws:
NullPointerException - provider is null

setLoadingConfiguration

public JsonSchemaFactoryBuilder setLoadingConfiguration(LoadingConfiguration loadingCfg)
Set a new loading configuration for this factory

Parameters:
loadingCfg - the loading configuration
Returns:
this
Throws:
NullPointerException - configuration is null

setValidationConfiguration

public JsonSchemaFactoryBuilder setValidationConfiguration(ValidationConfiguration validationCfg)
Set a new validation configuration for this factory

Parameters:
validationCfg - the validation configuration
Returns:
this
Throws:
NullPointerException - configuration is null

freeze

public JsonSchemaFactory freeze()
Build a frozen instance of this factory configuration

Specified by:
freeze in interface Thawed<JsonSchemaFactory>
Returns:
a new JsonSchemaFactory
See Also:
JsonSchemaFactory.JsonSchemaFactory(JsonSchemaFactoryBuilder)