From 7d4a7d88980e187e238f009713506ae0abb06aa5 Mon Sep 17 00:00:00 2001 From: Antoniafriedrich Date: Wed, 11 Oct 2023 11:54:00 +0200 Subject: [PATCH] MIR-1198 Support validation of PDF/A documents --- .../src/main/resources/xsl/metadata/mir-pdf-errorbox.xsl | 2 +- .../mycore/mir/wizard/command/MIRWizardDownloadDBLib.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mir-module/src/main/resources/xsl/metadata/mir-pdf-errorbox.xsl b/mir-module/src/main/resources/xsl/metadata/mir-pdf-errorbox.xsl index 0961805cf2..e0d6b93fb9 100644 --- a/mir-module/src/main/resources/xsl/metadata/mir-pdf-errorbox.xsl +++ b/mir-module/src/main/resources/xsl/metadata/mir-pdf-errorbox.xsl @@ -179,4 +179,4 @@ - \ No newline at end of file + diff --git a/mir-wizard/src/main/java/org/mycore/mir/wizard/command/MIRWizardDownloadDBLib.java b/mir-wizard/src/main/java/org/mycore/mir/wizard/command/MIRWizardDownloadDBLib.java index 450601afdc..ea45e46e09 100644 --- a/mir-wizard/src/main/java/org/mycore/mir/wizard/command/MIRWizardDownloadDBLib.java +++ b/mir-wizard/src/main/java/org/mycore/mir/wizard/command/MIRWizardDownloadDBLib.java @@ -53,7 +53,7 @@ public void doExecute() { Element library = getInputXML().getChild("database").getChild("library"); if (library != null && library.getChildren().size() > 0) { - String libDir = MCRConfigurationDir.getConfigurationDirectory().getAbsolutePath() + File.separator + String libDir = MCRConfigurationDir.getConfigurationDirectory().getAbsolutePath() + File.separator + "lib"; boolean success = true; @@ -62,12 +62,13 @@ public void doExecute() { String fname = FilenameUtils.getName(url); File file = new File(libDir + File.separator + fname); try { + FileUtils.copyURLToFile(new URL(url), file); MCRConfigurationDirSetup.loadExternalLibs(); success = true; } catch (Exception ex) { - LOGGER.error("Exception while downloading or loading database library: " + LOGGER.error("Exception while downloading or loading database library: " + file.getAbsolutePath(), ex); success = false; }