throws ValidationException {
try {
PDDocument document = handler.getDocument();
byte[] tmp = getXpacket(document.getDocument());
XMPDocumentBuilder builder;
try {
builder = new XMPDocumentBuilder();
builder.addPreprocessor(new PDFAExtentionSchemaPreprocessor());
} catch (XmpSchemaException e1) {
throw new ValidationException(e1.getMessage(), e1);
}
XMPMetadata metadata;
try {
metadata = builder.parse(tmp);
handler.setMetadata(metadata);
} catch (XmpSchemaException e) {
throw new ValidationException(
"Parser: Internal Problem (failed to instanciate Schema object)", e);
} catch (XmpXpacketEndException e) {