class FilterSets implements ProgressCheckFactory {

    @Override
    public ProgressCheck newInstance(final JsonObject config) {
        final Severity importModeSeverity = Severity
                .valueOf(config.getString(keys().importModeSeverity(), DEFAULT_IMPORT_MODE_SEVERITY.name())
                        .toUpperCase());
        final boolean allowEmptyFilter = hasNonNull(config, keys().allowEmptyFilter())
                && config.getBoolean(keys().allowEmptyFilter());
        final boolean allowRootFilter = hasNonNull(config, keys().allowRootFilter())
                && config.getBoolean(keys().allowRootFilter());
        return new Check(importModeSeverity, allowEmptyFilter, allowRootFilter);
    }

}