public static void recordParserDetails(String parserClassName, Metadata metadata) {
        String[] parsedBys = metadata.getValues(TikaCoreProperties.TIKA_PARSED_BY);
        if (parsedBys == null || parsedBys.length == 0) {
            metadata.add(TikaCoreProperties.TIKA_PARSED_BY, parserClassName);
        } else if (Arrays.stream(parsedBys).noneMatch(parserClassName::equals)) {
            //only add parser once
            metadata.add(TikaCoreProperties.TIKA_PARSED_BY, parserClassName);
        }
    }
Records details of the {@link Parser} used to the {@link Metadata},
typically wanted where multiple parsers could be picked between
or used.
tika-core/src/main/java/org/apache/tika/utils/ParserUtils.java