Skip to content

Commit d43e768

Browse files
committed
MODLD-630: Do not set RESOURCE_PREFERRED flag when resource is created from Bib
1 parent c619016 commit d43e768

File tree

2 files changed

+5
-19
lines changed

2 files changed

+5
-19
lines changed

src/main/java/org/folio/marc4ld/service/marc2ld/bib/mapper/custom/ConceptFormMapper.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import static org.folio.ld.dictionary.PropertyDictionary.LABEL;
88
import static org.folio.ld.dictionary.PropertyDictionary.LINK;
99
import static org.folio.ld.dictionary.PropertyDictionary.NAME;
10-
import static org.folio.ld.dictionary.PropertyDictionary.RESOURCE_PREFERRED;
1110
import static org.folio.ld.dictionary.ResourceTypeDictionary.CONCEPT;
1211
import static org.folio.ld.dictionary.ResourceTypeDictionary.FORM;
1312
import static org.folio.ld.dictionary.ResourceTypeDictionary.IDENTIFIER;
@@ -94,8 +93,7 @@ protected void addSubResource(Resource resource, char code) {
9493
LABEL.getValue(), List.of(CODE_TO_LCCN_MAP.get(code))
9594
), Collections.emptyMap());
9695
var form = createResource(Set.of(FORM), Map.of(
97-
NAME.getValue(), List.of(CODE_TO_LABEL_MAP.get(code)),
98-
RESOURCE_PREFERRED.getValue(), List.of("true")
96+
NAME.getValue(), List.of(CODE_TO_LABEL_MAP.get(code))
9997
), Map.of(MAP, lccn));
10098
var conceptForm = createResource(Set.of(CONCEPT, FORM), Map.of(
10199
NAME.getValue(), List.of(CODE_TO_LABEL_MAP.get(code))

src/test/java/org/folio/marc4ld/mapper/field008/Marc2LdConceptFormIT.java

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -120,25 +120,13 @@ void shouldMapConceptForm() {
120120
return focusEdges -> {
121121
assertThat(focusEdges).hasSize(4);
122122
validateEdge(focusEdges.getFirst(), predicate, List.of(FORM),
123-
Map.of(
124-
"http://bibfra.me/vocab/lite/name", List.of("Catalogs"),
125-
"http://library.link/vocab/resourcePreferred", List.of("true")
126-
), "Catalogs");
123+
Map.of("http://bibfra.me/vocab/lite/name", List.of("Catalogs")), "Catalogs");
127124
validateEdge(focusEdges.get(1), predicate, List.of(FORM),
128-
Map.of(
129-
"http://bibfra.me/vocab/lite/name", List.of("Indexes"),
130-
"http://library.link/vocab/resourcePreferred", List.of("true")
131-
), "Indexes");
125+
Map.of("http://bibfra.me/vocab/lite/name", List.of("Indexes")), "Indexes");
132126
validateEdge(focusEdges.get(2), predicate, List.of(FORM),
133-
Map.of(
134-
"http://bibfra.me/vocab/lite/name", List.of("Calendars"),
135-
"http://library.link/vocab/resourcePreferred", List.of("true")
136-
), "Calendars");
127+
Map.of("http://bibfra.me/vocab/lite/name", List.of("Calendars")), "Calendars");
137128
validateEdge(focusEdges.get(3), predicate, List.of(FORM),
138-
Map.of(
139-
"http://bibfra.me/vocab/lite/name", List.of("Comics (Graphic works)"),
140-
"http://library.link/vocab/resourcePreferred", List.of("true")
141-
), "Comics (Graphic works)");
129+
Map.of("http://bibfra.me/vocab/lite/name", List.of("Comics (Graphic works)")), "Comics (Graphic works)");
142130
};
143131
}
144132
}

0 commit comments

Comments
 (0)