All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.fge.jsonschema.load.DefaultDownloadersDictionary Maven / Gradle / Ivy

There is a newer version: 2.2.6
Show newest version
package com.github.fge.jsonschema.load;

import com.github.fge.jsonschema.library.Dictionary;
import com.github.fge.jsonschema.library.DictionaryBuilder;

public final class DefaultDownloadersDictionary
{
    private static final Dictionary DICTIONARY;

    static {
        final DictionaryBuilder builder
            = Dictionary.newBuilder();

        String scheme;
        URIDownloader downloader;

        scheme = "http";
        downloader = DefaultURIDownloader.getInstance();
        builder.addEntry(scheme, downloader);

        scheme = "https";
        downloader = DefaultURIDownloader.getInstance();
        builder.addEntry(scheme, downloader);

        scheme = "file";
        downloader = DefaultURIDownloader.getInstance();
        builder.addEntry(scheme, downloader);

        scheme = "ftp";
        downloader = DefaultURIDownloader.getInstance();
        builder.addEntry(scheme, downloader);

        scheme = "jar";
        downloader = DefaultURIDownloader.getInstance();
        builder.addEntry(scheme, downloader);

        scheme = "resource";
        downloader = ResourceURIDownloader.getInstance();
        builder.addEntry(scheme, downloader);

        DICTIONARY = builder.freeze();
    }

    public static Dictionary get()
    {
        return DICTIONARY;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy