Skip to content

Commit

Permalink
Include pull request feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaslow committed Nov 15, 2024
1 parent 4026432 commit 195855c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
<f:selectItem itemLabel="#{msgs.typ}" itemValue="type" />
<f:selectItem itemLabel="#{msgs.title}" itemValue="title" />
<f:selectItem itemLabel="#{msgs.typ} - #{msgs.title}" itemValue="type+title" />
<!--<f:selectItem itemLabel="#{msgs.typ} - #{msgs.count}" itemValue="type+count" />-->
<p:ajax event="change" update="@(.ui-tree, .stripe)"/>
</p:selectOneMenu>
<p:outputPanel styleClass="logicalStructureMenuWrapper">
Expand Down Expand Up @@ -132,8 +131,6 @@
rendered="#{DataEditorForm.structurePanel.nodeLabelOption.contains('+') and !logicalNode.linked}" />
<h:outputText value="#{DataEditorForm.getStructureElementTitle(logicalNode.dataObject)}"
rendered="#{DataEditorForm.structurePanel.nodeLabelOption.contains('title') and !logicalNode.linked}"/>
<!--<h:outputText value="1234"
rendered="#{DataEditorForm.structurePanel.nodeLabelOption.contains('count') and !logicalNode.linked}"/> -->
<h:outputText value="[#{logicalNode.pageRange}]"
rendered="#{DataEditorForm.structurePanel.showPageRangeInLogicalTree and logicalNode.pageRange ne null}"
styleClass="pageRange"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -76,7 +75,7 @@ public void shouldCheckIfMediaIsSelected() {
@Test
public void shouldGetStructuralElementTitle() {
// define which metadata keys to use as title
Collection<String> metadataKeys = Arrays.asList(TITLE_METADATA_KEY);
Collection<String> metadataKeys = List.of(TITLE_METADATA_KEY);
// prepare test structure
LogicalDivision structure = new LogicalDivision();
MetadataEntry titleMetadata = new MetadataEntry();
Expand Down
1 change: 0 additions & 1 deletion Kitodo/src/test/resources/kitodo_config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 195855c

Please sign in to comment.