diff --git a/Kitodo/src/main/java/org/kitodo/production/helper/tasks/HierarchyMigrationTask.java b/Kitodo/src/main/java/org/kitodo/production/helper/tasks/HierarchyMigrationTask.java index 948520c92b9..d6db504c263 100644 --- a/Kitodo/src/main/java/org/kitodo/production/helper/tasks/HierarchyMigrationTask.java +++ b/Kitodo/src/main/java/org/kitodo/production/helper/tasks/HierarchyMigrationTask.java @@ -146,7 +146,7 @@ public void run() { } while (progress < processesList.size()) { Process process = processService.getById(processesList.get(progress)); - if (fileService.processOwnsAnchorXML(process, true) && !fileService.processOwnsYearXML(process, true)) { + if (fileService.processOwnsAnchorXML(process) && !fileService.processOwnsYearXML(process)) { setWorkDetail(process.getTitle()); migrate(process); } diff --git a/Kitodo/src/main/java/org/kitodo/production/migration/NewspaperProcessesMigrator.java b/Kitodo/src/main/java/org/kitodo/production/migration/NewspaperProcessesMigrator.java index b0e9a35fe99..b91db33ff8a 100644 --- a/Kitodo/src/main/java/org/kitodo/production/migration/NewspaperProcessesMigrator.java +++ b/Kitodo/src/main/java/org/kitodo/production/migration/NewspaperProcessesMigrator.java @@ -237,7 +237,7 @@ private static boolean isNewspaperBatch(Batch batch) throws IOException { logger.trace("Examining batch {}...", batch.getTitle()); boolean newspaperBatch = true; for (Process process : batch.getProcesses()) { - if (!fileService.processOwnsYearXML(process, true)) { + if (!fileService.processOwnsYearXML(process)) { newspaperBatch = false; break; } diff --git a/Kitodo/src/main/java/org/kitodo/production/services/file/FileService.java b/Kitodo/src/main/java/org/kitodo/production/services/file/FileService.java index 899e0ea0035..da748098086 100644 --- a/Kitodo/src/main/java/org/kitodo/production/services/file/FileService.java +++ b/Kitodo/src/main/java/org/kitodo/production/services/file/FileService.java @@ -562,18 +562,7 @@ public void moveFile(URI sourceUri, URI targetUri) throws IOException { * if Io failed */ public boolean processOwnsAnchorXML(Process process) throws IOException { - return processOwnsAnchorXML(process, false); - } - - /** - * Process owns anchor XML. - * - * @param process whose metadata path to use - * @param forIndexingAll if method is triggerd from system/indexing page - * @return true if anchor file was found - */ - public boolean processOwnsAnchorXML(Process process, boolean forIndexingAll) throws IOException { - URI yearFile = createAnchorFile(getMetadataFilePath(process, false, forIndexingAll)); + URI yearFile = createAnchorFile(getMetadataFilePath(process, false, true)); return fileExist(yearFile); } @@ -587,18 +576,7 @@ public boolean processOwnsAnchorXML(Process process, boolean forIndexingAll) thr * if Io failed */ public boolean processOwnsYearXML(Process process) throws IOException { - return processOwnsYearXML(process, false); - } - - /** - * Process owns year XML. - * - * @param process whose metadata path to use - * @param forIndexingAll if method is triggerd from system/indexing page - * @return true if year file was found - */ - public boolean processOwnsYearXML(Process process, boolean forIndexingAll) throws IOException { - URI yearFile = createYearFile(getMetadataFilePath(process, false, forIndexingAll)); + URI yearFile = createYearFile(getMetadataFilePath(process, false, true)); return fileExist(yearFile); }