Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com)
   *
   * This software is dual-licensed under:
   *
   * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any
   *   later version;
   * - the Apache Software License (ASL) version 2.0.
   *
  * The text of this file and of both licenses is available at the root of this
  * project or, if you have the jar distribution, in directory META-INF/, under
  * the names LGPL-3.0.txt and ASL-2.0.txt respectively.
  *
  * Direct link to the sources:
  *
  * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt
  * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt
  */
 
 package com.github.fge.jsonschema.main;
 
 
 import  javax.annotation.concurrent.NotThreadSafe;

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
 
 @NotThreadSafe
 public final class JsonSchemaFactoryBuilder
     implements Thawed<JsonSchemaFactory>
 {
     private static final MessageBundle BUNDLE
         = MessageBundles.getBundle(JsonSchemaConfigurationBundle.class);
 
A builder with the default configuration

See also:
JsonSchemaFactory.newBuilder()
 
     {
          = LoadingConfiguration.byDefault();
          = ValidationConfiguration.byDefault();
     }

    
A builder spawned from an existing JsonSchemaFactory

Parameters:
factory the factory
See also:
JsonSchemaFactory.thaw()
 
     {
          = factory.reportProvider;
          = factory.loadingCfg;
          = factory.validationCfg;
     }

    
Set a new report provider for this factory

Parameters:
reportProvider the report provider
Returns:
this
Throws:
NullPointerException provider is null
 
         final ReportProvider reportProvider)
     {
         .checkNotNull(reportProvider"nullReportProvider");
         this. = reportProvider;
         return this;
     }

    
Set a new loading configuration for this factory

Parameters:
loadingCfg the loading configuration
Returns:
this
Throws:
NullPointerException configuration is null
        final LoadingConfiguration loadingCfg)
    {
        .checkNotNull(loadingCfg"nullLoadingCfg");
        this. = loadingCfg;
        return this;
    }

    
Set a new validation configuration for this factory

Parameters:
validationCfg the validation configuration
Returns:
this
Throws:
NullPointerException configuration is null
        final ValidationConfiguration validationCfg)
    {
        .checkNotNull(validationCfg"nullValidationCfg");
        this. = validationCfg;
        return this;
    }

    
Build a frozen instance of this factory configuration

Returns:
a new JsonSchemaFactory
See also:
JsonSchemaFactory.JsonSchemaFactory(JsonSchemaFactoryBuilder)
    @Override
    public JsonSchemaFactory freeze()
    {
        return new JsonSchemaFactory(this);
    }
New to GrepCode? Check out our FAQ X