diff --git a/Kitodo/src/main/java/org/kitodo/production/services/dataeditor/DataEditorService.java b/Kitodo/src/main/java/org/kitodo/production/services/dataeditor/DataEditorService.java index 636c87c2556..6538efc8b61 100644 --- a/Kitodo/src/main/java/org/kitodo/production/services/dataeditor/DataEditorService.java +++ b/Kitodo/src/main/java/org/kitodo/production/services/dataeditor/DataEditorService.java @@ -131,14 +131,13 @@ public static String getTitleValue(LogicalDivision element, String metadataTitle .flatMap(metadataGroup -> metadataGroup.getMetadata().stream()) .collect(Collectors.toList()); } - String metadataTitle = metadata.stream() + return metadata.stream() .filter(currentMetadata -> Objects.equals(currentMetadata.getKey(), metadataPath[lastIndex])) .filter(MetadataEntry.class::isInstance).map(MetadataEntry.class::cast) .map(MetadataEntry::getValue) .filter(value -> !value.isEmpty()) .findFirst() .orElse(""); - return metadataTitle; } /** diff --git a/Kitodo/src/main/webapp/WEB-INF/templates/includes/metadataEditor/logicalStructure.xhtml b/Kitodo/src/main/webapp/WEB-INF/templates/includes/metadataEditor/logicalStructure.xhtml index d89470ddaa8..5339212ce60 100644 --- a/Kitodo/src/main/webapp/WEB-INF/templates/includes/metadataEditor/logicalStructure.xhtml +++ b/Kitodo/src/main/webapp/WEB-INF/templates/includes/metadataEditor/logicalStructure.xhtml @@ -25,7 +25,6 @@ - @@ -132,8 +131,6 @@ rendered="#{DataEditorForm.structurePanel.nodeLabelOption.contains('+') and !logicalNode.linked}" /> - diff --git a/Kitodo/src/test/java/org/kitodo/production/forms/dataeditor/DataEditorFormTest.java b/Kitodo/src/test/java/org/kitodo/production/forms/dataeditor/DataEditorFormTest.java index 81acba322d8..cd275e21c1d 100644 --- a/Kitodo/src/test/java/org/kitodo/production/forms/dataeditor/DataEditorFormTest.java +++ b/Kitodo/src/test/java/org/kitodo/production/forms/dataeditor/DataEditorFormTest.java @@ -15,7 +15,6 @@ import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import java.util.Arrays; import java.util.Collection; import java.util.LinkedList; import java.util.List; @@ -76,7 +75,7 @@ public void shouldCheckIfMediaIsSelected() { @Test public void shouldGetStructuralElementTitle() { // define which metadata keys to use as title - Collection metadataKeys = Arrays.asList(TITLE_METADATA_KEY); + Collection metadataKeys = List.of(TITLE_METADATA_KEY); // prepare test structure LogicalDivision structure = new LogicalDivision(); MetadataEntry titleMetadata = new MetadataEntry(); diff --git a/Kitodo/src/test/resources/kitodo_config.properties b/Kitodo/src/test/resources/kitodo_config.properties index 7c6bdbfa4a3..fdd97355e43 100644 --- a/Kitodo/src/test/resources/kitodo_config.properties +++ b/Kitodo/src/test/resources/kitodo_config.properties @@ -39,7 +39,6 @@ metadataLanguage.list=Deutsch-de&English-en # ----------------------------------- # backup of metadata configuration # ----------------------------------- -metsEditor.titleMetadata=TitleDocMain numberOfMetaBackups=2 directory.modules=modules/ elasticsearch.port=9205