private StatusFilter buildStatusFilter(Set<PipesResult.STATUS> includes,
                                           Set<PipesResult.STATUS> excludes) throws TikaConfigException {
        if (includes.size() > 0 && excludes.size() > 0) {
            throw new TikaConfigException("Only one of includes and excludes may have any " +
                    "contents");
        }
        if (includes.size() > 0) {
            return new IncludesFilter(includes);
        } else if (excludes.size() > 0) {
            return new ExcludesFilter(excludes);
        }
        return new AcceptAllFilter();
    }
Base class that includes filtering by {@link PipesResult.STATUS}
tika-core/src/main/java/org/apache/tika/pipes/PipesReporterBase.java