
com.github.fge.jsonschema.load.LoadingConfiguration Maven / Gradle / Ivy
package com.github.fge.jsonschema.load;
import com.github.fge.jsonschema.library.Dictionary;
import com.github.fge.jsonschema.util.Frozen;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import java.net.URI;
import java.util.Map;
public final class LoadingConfiguration
implements Frozen
{
final Dictionary downloaders;
final URI namespace;
final Map schemaRedirects;
public static LoadingConfigurationBuilder newConfiguration()
{
return new LoadingConfigurationBuilder();
}
public static LoadingConfiguration byDefault()
{
return new LoadingConfigurationBuilder().freeze();
}
LoadingConfiguration(final LoadingConfigurationBuilder cfg)
{
downloaders = cfg.downloaders.freeze();
namespace = cfg.namespace;
schemaRedirects = Maps.newHashMap(cfg.schemaRedirects);
}
public Dictionary downloaders()
{
return downloaders;
}
public Map schemaRedirects()
{
return ImmutableMap.copyOf(schemaRedirects);
}
@Override
public LoadingConfigurationBuilder thaw()
{
return new LoadingConfigurationBuilder(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy