public static XMPMeta convert(Metadata tikaMetadata) throws TikaException {
        if (tikaMetadata == null) {
            throw new IllegalArgumentException("Metadata parameter must not be null");
        }

        String mimetype = tikaMetadata.get(Metadata.CONTENT_TYPE);
        if (mimetype == null) {
            mimetype = tikaMetadata.get(TikaCoreProperties.FORMAT);
        }

        return convert(tikaMetadata, mimetype);
    }
@see TikaToXMP#convert(Metadata, String) But the mimetype is retrieved from the metadata
map.
tika-xmp/src/main/java/org/apache/tika/xmp/convert/TikaToXMP.java