Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright (c) 2013, Francis Galiegue <fgaliegue@gmail.com>
   *
   * This program is free software: you can redistribute it and/or modify
   * it under the terms of the Lesser GNU General Public License as
   * published by the Free Software Foundation, either version 3 of the
   * License, or (at your option) any later version.
   *
   * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * Lesser GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 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
         = MessageBundleFactory.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