Skip to content

Commit 2fdd96b

Browse files
committed
MODLD-939: Update the mapping of 019
1 parent f471215 commit 2fdd96b

File tree

7 files changed

+13
-44
lines changed

7 files changed

+13
-44
lines changed

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
- Ensure only one MARC 100/110/111/130 is present in the derived MARC, converting any additional 1XX fields to 7XX [MODLD-934](https://folio-org.atlassian.net/browse/MODLD-934)
3939
- Create MARC 600 when subject is a HUB [MODLD-538](https://folio-org.atlassian.net/browse/MODLD-538)
4040
- Handle invalid place codes in MARC 26X [MODLD-949](https://folio-org.atlassian.net/browse/MODLD-949)
41+
- Update the mapping of 019 to use NAME property instead of LOCAL_ID_VALUE property.
4142

4243
## 1.0.3 (04-09-2025)
4344
- Geographic coverage: single "geographicCoverage" edge is created for Work which contains 043 with multiple $a fields [MODLD-694](https://folio-org.atlassian.net/browse/MODLD-694)

src/main/java/org/folio/marc4ld/service/marc2ld/authority/control/AuthorityIdentifierProcessorImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,4 @@ private Map<String, List<String>> makeProperties(String data) {
6060
));
6161
}
6262
}
63+

src/main/resources/label.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ labelRules:
9494
- NAME
9595
- types: ID_LOCAL, IDENTIFIER
9696
properties:
97-
- LOCAL_ID_VALUE
97+
- NAME
9898
- types: ID_STRN, IDENTIFIER
9999
properties:
100100
- NAME

src/main/resources/marc4ld.yml

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -126,41 +126,10 @@ bibFieldRules:
126126
- types: ID_LCCN
127127
include: cancelled_instance_identifier
128128
'019':
129+
- types: ID_LOCAL
130+
include: current_instance_identifier
129131
- types: ID_LOCAL, IDENTIFIER
130-
parent: INSTANCE
131-
predicate: MAP
132-
subfields:
133-
a: LOCAL_ID_VALUE
134-
marc2ldCondition:
135-
fieldsAllOf:
136-
a: presented
137-
ld2marcCondition:
138-
edge:
139-
STATUS:
140-
anyMatch:
141-
- present: false
142-
- present: true
143-
properties:
144-
LINK: http://id.loc.gov/vocabulary/mstatus/current
145-
edges:
146-
- include: status_current
147-
- types: ID_LOCAL, IDENTIFIER
148-
parent: INSTANCE
149-
predicate: MAP
150-
subfields:
151-
z: LOCAL_ID_VALUE
152-
marc2ldCondition:
153-
fieldsAllOf:
154-
z: presented
155-
ld2marcCondition:
156-
edge:
157-
STATUS:
158-
allMatch:
159-
- present: true
160-
properties:
161-
LINK: http://id.loc.gov/vocabulary/mstatus/cancinv
162-
edges:
163-
- include: status_cancelled
132+
include: cancelled_instance_identifier
164133
'020':
165134
- types: ID_ISBN
166135
include: current_instance_identifier
@@ -1876,7 +1845,7 @@ bibSharedRules:
18761845
predicate: MAP
18771846
multiply: true
18781847
subfields:
1879-
o: LOCAL_ID_VALUE
1848+
o: NAME
18801849
- types: ID_STRN, IDENTIFIER
18811850
parent: INSTANCE
18821851
predicate: MAP

src/test/java/org/folio/marc4ld/mapper/MarcBib2LdMapperIT.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
import static org.folio.ld.dictionary.PropertyDictionary.LABEL;
5656
import static org.folio.ld.dictionary.PropertyDictionary.LANGUAGE_NOTE;
5757
import static org.folio.ld.dictionary.PropertyDictionary.LINK;
58-
import static org.folio.ld.dictionary.PropertyDictionary.LOCAL_ID_VALUE;
5958
import static org.folio.ld.dictionary.PropertyDictionary.LOCATION_OF_ORIGINALS_DUPLICATES;
6059
import static org.folio.ld.dictionary.PropertyDictionary.LOCATION_OF_OTHER_ARCHIVAL_MATERIAL;
6160
import static org.folio.ld.dictionary.PropertyDictionary.MAIN_TITLE;
@@ -397,9 +396,9 @@ private void validateLocalId(ResourceEdge edge, String number, String status) {
397396
assertThat(edge.getTarget().getLabel()).isEqualTo(number);
398397
assertThat(edge.getTarget().getTypes()).containsOnly(ID_LOCAL, IDENTIFIER);
399398
assertThat(edge.getTarget().getDoc()).hasSize(1);
400-
assertThat(edge.getTarget().getDoc().has(LOCAL_ID_VALUE.getValue())).isTrue();
401-
assertThat(edge.getTarget().getDoc().get(LOCAL_ID_VALUE.getValue())).hasSize(1);
402-
assertThat(edge.getTarget().getDoc().get(LOCAL_ID_VALUE.getValue()).get(0).asText()).isEqualTo(number);
399+
assertThat(edge.getTarget().getDoc().has(NAME.getValue())).isTrue();
400+
assertThat(edge.getTarget().getDoc().get(NAME.getValue())).hasSize(1);
401+
assertThat(edge.getTarget().getDoc().get(NAME.getValue()).get(0).asText()).isEqualTo(number);
403402
assertThat(edge.getTarget().getOutgoingEdges()).isNotEmpty();
404403
var edgeIterator = edge.getTarget().getOutgoingEdges().iterator();
405404
validateIdStatus(edgeIterator.next(), status);

src/test/java/org/folio/marc4ld/mapper/test/MonographTestUtil.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@
7676
import static org.folio.ld.dictionary.PropertyDictionary.LABEL;
7777
import static org.folio.ld.dictionary.PropertyDictionary.LINK;
7878
import static org.folio.ld.dictionary.PropertyDictionary.LINKAGE;
79-
import static org.folio.ld.dictionary.PropertyDictionary.LOCAL_ID_VALUE;
8079
import static org.folio.ld.dictionary.PropertyDictionary.LOCATION_OF_EVENT;
8180
import static org.folio.ld.dictionary.PropertyDictionary.LOCATION_OF_ORIGINALS_DUPLICATES;
8281
import static org.folio.ld.dictionary.PropertyDictionary.LOCATION_OF_OTHER_ARCHIVAL_MATERIAL;
@@ -330,15 +329,15 @@ public static Resource getSampleInstanceResource() {
330329

331330
var localId = createResource(
332331
Map.of(
333-
LOCAL_ID_VALUE, List.of("19861509")
332+
NAME, List.of("19861509")
334333
),
335334
Set.of(IDENTIFIER, ID_LOCAL),
336335
Map.of(STATUS, List.of(status("current")))
337336
).setLabel("19861509");
338337

339338
var localIdCancelled = createResource(
340339
Map.of(
341-
LOCAL_ID_VALUE, List.of("09151986")
340+
NAME, List.of("09151986")
342341
),
343342
Set.of(IDENTIFIER, ID_LOCAL),
344343
Map.of(STATUS, List.of(status("canceled or invalid")))

src/test/java/org/folio/marc4ld/test/helper/LinkingEntriesTestHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public static void validateLocalId(Resource resource, String... expectedLocalIds
157157
validateEdge(resourceEdges.get(index), MAP,
158158
List.of(IDENTIFIER, ID_LOCAL),
159159
Map.of(
160-
"http://bibfra.me/vocab/library/localId", List.of(expectedLocalId)
160+
"http://bibfra.me/vocab/lite/name", List.of(expectedLocalId)
161161
), expectedLocalId);
162162
index++;
163163
}

0 commit comments

Comments
 (0)