@Override
    public void endDocument() {
        targetLanguages.forEach(s -> metadata.add("target-language", s));
        metadata.set("tu-count", String.valueOf(numberOfTUs));
        metadata.set("tuv-count", String.valueOf(numberOfTUVs));
    }
Content Handler for Translation Memory eXchange (TMX) files.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-xml-module/src/main/java/org/apache/tika/parser/tmx/TMXContentHandler.java