Float.toString(document.getDocument().getVersion()));
try {
if( xmp != null ) {
xmp.addXMLNSMapping(XMPSchemaPDFAId.NAMESPACE, XMPSchemaPDFAId.class);
XMPSchemaPDFAId pdfaxmp = (XMPSchemaPDFAId) xmp.getSchemaByClass(XMPSchemaPDFAId.class);
if( pdfaxmp != null ) {
metadata.set("pdfaid:part", Integer.toString(pdfaxmp.getPart()));
if (pdfaxmp.getConformance() != null) {
metadata.set("pdfaid:conformance", pdfaxmp.getConformance());
String version = "A-"+pdfaxmp.getPart()+pdfaxmp.getConformance().toLowerCase(Locale.ROOT);
metadata.set("pdfa:PDFVersion", version );
metadata.add(TikaCoreProperties.FORMAT.getName(),
MEDIA_TYPE.toString()+"; version=\""+version+"\"" );
}
}