@natlibfi/marc-record-merge 6.0.0-beta.4 → 6.0.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/README.md +24 -10
  2. package/dist/reducers/copy.js +101 -35
  3. package/dist/reducers/copy.js.map +1 -1
  4. package/dist/reducers/copy.spec.js +18 -20
  5. package/dist/reducers/copy.spec.js.map +1 -1
  6. package/dist/reducers/select.js +10 -2
  7. package/dist/reducers/select.js.map +1 -1
  8. package/dist/reducers/select.spec.js +6 -8
  9. package/dist/reducers/select.spec.js.map +1 -1
  10. package/package.json +9 -11
  11. package/src/reducers/copy.js +93 -36
  12. package/src/reducers/copy.spec.js +21 -13
  13. package/src/reducers/select.js +7 -4
  14. package/src/reducers/select.spec.js +7 -3
  15. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/01/base.json +0 -0
  16. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/01/merged.json +0 -0
  17. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/01/metadata.json +1 -2
  18. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/01/source.json +0 -0
  19. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/02/base.json +0 -0
  20. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/02/merged.json +0 -0
  21. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/02/metadata.json +1 -2
  22. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/02/source.json +0 -0
  23. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/03/base.json +0 -0
  24. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/03/merged.json +0 -0
  25. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/03/metadata.json +1 -2
  26. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/03/source.json +0 -0
  27. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/04/base.json +0 -0
  28. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/04/merged.json +0 -0
  29. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/04/metadata.json +1 -2
  30. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/04/source.json +0 -0
  31. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/05/base.json +0 -0
  32. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/05/merged.json +0 -0
  33. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/05/metadata.json +1 -2
  34. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/05/source.json +0 -0
  35. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/06/base.json +0 -0
  36. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/06/merged.json +0 -0
  37. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/06/metadata.json +1 -2
  38. package/test-fixtures/reducers/copy/{basic copy → 01 - copy}/06/source.json +0 -0
  39. package/test-fixtures/reducers/copy/01 - copy/07/base.json +39 -0
  40. package/test-fixtures/reducers/copy/01 - copy/07/merged.json +39 -0
  41. package/test-fixtures/reducers/copy/01 - copy/07/metadata.json +5 -0
  42. package/test-fixtures/reducers/copy/01 - copy/07/source.json +24 -0
  43. package/test-fixtures/reducers/copy/01 - copy/08/base.json +28 -0
  44. package/test-fixtures/reducers/copy/01 - copy/08/merged.json +28 -0
  45. package/test-fixtures/reducers/copy/01 - copy/08/metadata.json +4 -0
  46. package/test-fixtures/reducers/copy/01 - copy/08/source.json +24 -0
  47. package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/01/base.json +17 -0
  48. package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/01/merged.json +20 -0
  49. package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/01/metadata.json +6 -0
  50. package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/01/source.json +20 -0
  51. package/test-fixtures/reducers/copy/{copyUnless/01 → 02 - doNotCopyIfFieldPresent/02}/base.json +0 -0
  52. package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/02/merged.json +20 -0
  53. package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/02/metadata.json +6 -0
  54. package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/02/source.json +20 -0
  55. package/test-fixtures/reducers/copy/{compareTagsOnly → 03 - compareTagsOnly}/01/base.json +0 -0
  56. package/test-fixtures/reducers/copy/{compareTagsOnly → 03 - compareTagsOnly}/01/merged.json +0 -0
  57. package/test-fixtures/reducers/copy/{compareTagsOnly/01/metadata.json → 03 - compareTagsOnly/01/metadata.json } +1 -2
  58. package/test-fixtures/reducers/copy/{compareTagsOnly → 03 - compareTagsOnly}/01/source.json +0 -0
  59. package/test-fixtures/reducers/copy/{compareTagsOnly → 03 - compareTagsOnly}/02/base.json +0 -0
  60. package/test-fixtures/reducers/copy/{compareTagsOnly → 03 - compareTagsOnly}/02/merged.json +0 -0
  61. package/test-fixtures/reducers/copy/{compareTagsOnly/02/metadata.json → 03 - compareTagsOnly/02/metadata.json } +1 -2
  62. package/test-fixtures/reducers/copy/{compareTagsOnly → 03 - compareTagsOnly}/02/source.json +0 -0
  63. package/test-fixtures/reducers/copy/{compareWithoutIndicators → 04 - compareWithoutIndicators}/01/base.json +0 -0
  64. package/test-fixtures/reducers/copy/{compareWithoutIndicators → 04 - compareWithoutIndicators}/01/merged.json +0 -0
  65. package/test-fixtures/reducers/copy/{compareWithoutIndicators/01/metadata.json → 04 - compareWithoutIndicators/01/metadata.json } +1 -2
  66. package/test-fixtures/reducers/copy/{compareWithoutIndicators → 04 - compareWithoutIndicators}/01/source.json +0 -0
  67. package/test-fixtures/reducers/copy/{compareWithoutIndicators → 04 - compareWithoutIndicators}/02/base.json +0 -0
  68. package/test-fixtures/reducers/copy/{compareWithoutIndicators → 04 - compareWithoutIndicators}/02/merged.json +0 -0
  69. package/test-fixtures/reducers/copy/{compareWithoutIndicators/02/metadata.json → 04 - compareWithoutIndicators/02/metadata.json } +1 -2
  70. package/test-fixtures/reducers/copy/{compareWithoutIndicators → 04 - compareWithoutIndicators}/02/source.json +0 -0
  71. package/test-fixtures/reducers/copy/05 - copyUnless/01/base.json +9 -0
  72. package/test-fixtures/reducers/copy/{copyUnless → 05 - copyUnless}/01/merged.json +0 -0
  73. package/test-fixtures/reducers/copy/{copyUnless/01/metadata.json → 05 - copyUnless/01/metadata.json } +1 -2
  74. package/test-fixtures/reducers/copy/{copyUnless → 05 - copyUnless}/01/source.json +0 -0
  75. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical → 06 - subfieldsMustBeIdentical}/01/base.json +0 -0
  76. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical → 06 - subfieldsMustBeIdentical}/01/merged.json +0 -0
  77. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical/01/metadata.json → 06 - subfieldsMustBeIdentical/01/metadata.json } +1 -2
  78. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical → 06 - subfieldsMustBeIdentical}/01/source.json +0 -0
  79. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical → 06 - subfieldsMustBeIdentical}/02/base.json +0 -0
  80. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical → 06 - subfieldsMustBeIdentical}/02/merged.json +0 -0
  81. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical/02/metadata.json → 06 - subfieldsMustBeIdentical/02/metadata.json } +1 -2
  82. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical → 06 - subfieldsMustBeIdentical}/02/source.json +0 -0
  83. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical → 06 - subfieldsMustBeIdentical}/03/base.json +0 -0
  84. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical → 06 - subfieldsMustBeIdentical}/03/merged.json +0 -0
  85. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical/03/metadata.json → 06 - subfieldsMustBeIdentical/03/metadata.json } +1 -2
  86. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical → 06 - subfieldsMustBeIdentical}/03/source.json +0 -0
  87. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical → 06 - subfieldsMustBeIdentical}/04/base.json +0 -0
  88. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical → 06 - subfieldsMustBeIdentical}/04/merged.json +0 -0
  89. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical/04/metadata.json → 06 - subfieldsMustBeIdentical/04/metadata.json } +1 -2
  90. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical → 06 - subfieldsMustBeIdentical}/04/source.json +0 -0
  91. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical → 06 - subfieldsMustBeIdentical}/05/base.json +0 -0
  92. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical → 06 - subfieldsMustBeIdentical}/05/merged.json +0 -0
  93. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical/05/metadata.json → 06 - subfieldsMustBeIdentical/05/metadata.json } +1 -2
  94. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical → 06 - subfieldsMustBeIdentical}/05/source.json +0 -0
  95. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical → 06 - subfieldsMustBeIdentical}/06/base.json +0 -0
  96. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical → 06 - subfieldsMustBeIdentical}/06/merged.json +0 -0
  97. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical/06/metadata.json → 06 - subfieldsMustBeIdentical/06/metadata.json } +1 -2
  98. package/test-fixtures/reducers/copy/{subfieldsMustBeIdentical → 06 - subfieldsMustBeIdentical}/06/source.json +0 -0
  99. package/test-fixtures/reducers/copy/{excludeSubfields → 07 - excludeSubfields}/01/base.json +0 -0
  100. package/test-fixtures/reducers/copy/{excludeSubfields → 07 - excludeSubfields}/01/merged.json +0 -0
  101. package/test-fixtures/reducers/copy/07 - excludeSubfields/01/metadata.json +8 -0
  102. package/test-fixtures/reducers/copy/{excludeSubfields → 07 - excludeSubfields}/01/source.json +0 -0
  103. package/test-fixtures/reducers/copy/07 - excludeSubfields/02/base.json +39 -0
  104. package/test-fixtures/reducers/copy/07 - excludeSubfields/02/merged.json +58 -0
  105. package/test-fixtures/reducers/copy/07 - excludeSubfields/02/metadata.json +5 -0
  106. package/test-fixtures/reducers/copy/07 - excludeSubfields/02/source.json +43 -0
  107. package/test-fixtures/reducers/copy/{dropSubfields → 08 - dropSubfields}/01/base.json +0 -0
  108. package/test-fixtures/reducers/copy/{dropSubfields → 08 - dropSubfields}/01/merged.json +0 -0
  109. package/test-fixtures/reducers/copy/{dropSubfields/01/metadata.json → 08 - dropSubfields/01/metadata.json } +1 -2
  110. package/test-fixtures/reducers/copy/{dropSubfields → 08 - dropSubfields}/01/source.json +0 -0
  111. package/test-fixtures/reducers/copy/{dropSubfields → 08 - dropSubfields}/02/base.json +0 -0
  112. package/test-fixtures/reducers/copy/{dropSubfields/02/merged.json → 08 - dropSubfields/02/merged.json } +1 -1
  113. package/test-fixtures/reducers/copy/{dropSubfields/02/metadata.json → 08 - dropSubfields/02/metadata.json } +2 -3
  114. package/test-fixtures/reducers/copy/{dropSubfields/03/source.json → 08 - dropSubfields/02/source.json } +2 -2
  115. package/test-fixtures/reducers/copy/{dropSubfields → 08 - dropSubfields}/03/base.json +0 -0
  116. package/test-fixtures/reducers/copy/{dropSubfields/03/merged.json → 08 - dropSubfields/03/merged.json } +1 -1
  117. package/test-fixtures/reducers/copy/{dropSubfields/03/metadata.json → 08 - dropSubfields/03/metadata.json } +2 -3
  118. package/test-fixtures/reducers/copy/{dropSubfields/04/source.json → 08 - dropSubfields/03/source.json } +2 -2
  119. package/test-fixtures/reducers/copy/{dropSubfields → 08 - dropSubfields}/04/base.json +0 -0
  120. package/test-fixtures/reducers/copy/{dropSubfields → 08 - dropSubfields}/04/merged.json +0 -0
  121. package/test-fixtures/reducers/copy/{dropSubfields/04/metadata.json → 08 - dropSubfields/04/metadata.json } +1 -2
  122. package/test-fixtures/reducers/copy/{dropSubfields/02/source.json → 08 - dropSubfields/04/source.json } +2 -2
  123. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/01/base.json +9 -0
  124. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/01/merged.json +20 -0
  125. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/01/metadata.json +6 -0
  126. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/01/source.json +20 -0
  127. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/02/base.json +9 -0
  128. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/02/merged.json +20 -0
  129. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/02/metadata.json +6 -0
  130. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/02/source.json +20 -0
  131. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/03/base.json +9 -0
  132. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/03/merged.json +31 -0
  133. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/03/metadata.json +6 -0
  134. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/03/source.json +31 -0
  135. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/04/base.json +9 -0
  136. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/04/merged.json +42 -0
  137. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/04/metadata.json +6 -0
  138. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/04/source.json +42 -0
  139. package/test-fixtures/reducers/copy/10 - swapTag/01/base.json +17 -0
  140. package/test-fixtures/reducers/copy/10 - swapTag/01/merged.json +28 -0
  141. package/test-fixtures/reducers/copy/10 - swapTag/01/metadata.json +6 -0
  142. package/test-fixtures/reducers/copy/10 - swapTag/01/source.json +20 -0
  143. package/test-fixtures/reducers/metadata.json +1 -2
  144. package/.drone.yml +0 -92
  145. package/test-fixtures/reducers/copy/excludeSubfields/01/metadata.json +0 -9
@@ -0,0 +1,17 @@
1
+ {
2
+ "leader": "01331cam a22003494i 4500",
3
+ "fields": [
4
+ {
5
+ "tag": "001",
6
+ "value": "007346734"
7
+ },
8
+ {
9
+ "tag": "100",
10
+ "ind1": " ",
11
+ "ind2": " ",
12
+ "subfields": [
13
+ {"code": "a", "value": "test"}
14
+ ]
15
+ }
16
+ ]
17
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "leader": "01331cam a22003494i 4500",
3
+ "fields": [
4
+ {
5
+ "tag": "001",
6
+ "value": "007346734"
7
+ },
8
+ {
9
+ "tag": "100",
10
+ "ind1": " ",
11
+ "ind2": " ",
12
+ "subfields": [
13
+ {
14
+ "code": "a",
15
+ "value": "test"
16
+ }
17
+ ]
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "description": "Copy field 010 if f100 not present: f100 present",
3
+ "tagPatternRegExp": "^010$",
4
+ "doNotCopyIfFieldPresent": "^100$",
5
+ "only": false
6
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "leader": "01331cam a22003494i 4500",
3
+ "fields": [
4
+ {
5
+ "tag": "001",
6
+ "value": "007346734"
7
+ },
8
+ {
9
+ "tag": "010",
10
+ "ind1": " ",
11
+ "ind2": " ",
12
+ "subfields": [
13
+ {
14
+ "code": "a",
15
+ "value": "##2002021346"
16
+ }
17
+ ]
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "leader": "01331cam a22003494i 4500",
3
+ "fields": [
4
+ {
5
+ "tag": "001",
6
+ "value": "007346734"
7
+ },
8
+ {
9
+ "tag": "010",
10
+ "ind1": " ",
11
+ "ind2": " ",
12
+ "subfields": [
13
+ {
14
+ "code": "a",
15
+ "value": "##2002021346"
16
+ }
17
+ ]
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "description": "Copy field 010 if f100 not present: f100 not present",
3
+ "tagPatternRegExp": "^010$",
4
+ "doNotCopyIfFieldPresent": "^100$",
5
+ "only": false
6
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "leader": "01331cam a22003494i 4500",
3
+ "fields": [
4
+ {
5
+ "tag": "001",
6
+ "value": "007346734"
7
+ },
8
+ {
9
+ "tag": "010",
10
+ "ind1": " ",
11
+ "ind2": " ",
12
+ "subfields": [
13
+ {
14
+ "code": "a",
15
+ "value": "##2002021346"
16
+ }
17
+ ]
18
+ }
19
+ ]
20
+ }
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "description": "Field is copied from source only if it is missing in base, a different instance is not copied",
3
3
  "tagPatternRegExp": "^018$",
4
- "compareTagsOnly": true,
5
- "disabled": false
4
+ "compareTagsOnly": true
6
5
  }
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "description": "for repeatable fields, 2x each 260/264",
3
3
  "tagPatternRegExp": "^(260|264)$",
4
- "compareTagsOnly": true,
5
- "disabled": false
4
+ "compareTagsOnly": true
6
5
  }
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "description": "Copy fields 010 compare without indicators - same field no copy",
3
3
  "tagPatternRegExp": "^010$",
4
- "compareWithoutIndicators": true,
5
- "disabled": false
4
+ "compareWithoutIndicators": true
6
5
  }
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "description": "Copy fields 010 compare with indicators - different field copy",
3
3
  "tagPatternRegExp": "^010$",
4
- "compareWithoutIndicators": false,
5
- "disabled": false
4
+ "compareWithoutIndicators": false
6
5
  }
@@ -0,0 +1,9 @@
1
+ {
2
+ "leader": "01331cam a22003494i 4500",
3
+ "fields": [
4
+ {
5
+ "tag": "001",
6
+ "value": "007346734"
7
+ }
8
+ ]
9
+ }
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "description": "Copy fields unless contains subfields - {code: 9, value: MALLI<DROP>}",
3
3
  "tagPatternRegExp": "^010$",
4
- "copyUnless": [{"code": "9", "value": "MALLI<DROP>"}],
5
- "disabled": false
4
+ "copyUnless": [{"code": "9", "value": "MALLI<DROP>"}]
6
5
  }
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "description": "subfieldsMustBeIdentical: true - fields 010 are not identical => fields are copied",
3
3
  "tagPatternRegExp": "^010$",
4
- "subfieldsMustBeIdentical": true,
5
- "disabled": false
4
+ "subfieldsMustBeIdentical": true
6
5
  }
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "description": "subfieldsMustBeIdentical: true - fields 010 identical => fields are not copied",
3
3
  "tagPatternRegExp": "^010$",
4
- "subfieldsMustBeIdentical": true,
5
- "disabled": false
4
+ "subfieldsMustBeIdentical": true
6
5
  }
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "description": "subfieldsMustBeIdentical: true - source subfields are subset of base subfields",
3
3
  "tagPatternRegExp": "^010$",
4
- "subfieldsMustBeIdentical": true,
5
- "disabled": false
4
+ "subfieldsMustBeIdentical": true
6
5
  }
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "description": "subfieldsMustBeIdentical: false - source subfields are subset of base subfields",
3
3
  "tagPatternRegExp": "^010$",
4
- "subfieldsMustBeIdentical": false,
5
- "disabled": false
4
+ "subfieldsMustBeIdentical": false
6
5
  }
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "description": "subfieldsMustBeIdentical: true - base subfields are subset of source subfields",
3
3
  "tagPatternRegExp": "^010$",
4
- "subfieldsMustBeIdentical": true,
5
- "disabled": false
4
+ "subfieldsMustBeIdentical": true
6
5
  }
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "description": "subfieldsMustBeIdentical: false - base subfields are subset of source subfields",
3
3
  "tagPatternRegExp": "^010$",
4
- "subfieldsMustBeIdentical": false,
5
- "disabled": false
4
+ "subfieldsMustBeIdentical": false
6
5
  }
@@ -0,0 +1,8 @@
1
+ {
2
+ "description": "Ignore subfields c and d in comparing identicalness - ignore one field",
3
+ "tagPatternRegExp": "^010$",
4
+ "excludeSubfields": [
5
+ "c",
6
+ "d"
7
+ ]
8
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "leader": "01331cam a22003494i 4500",
3
+ "fields": [
4
+ {
5
+ "tag": "001",
6
+ "value": "007346734"
7
+ },
8
+ {
9
+ "tag": "010",
10
+ "ind1": " ",
11
+ "ind2": " ",
12
+ "subfields": [
13
+ {
14
+ "code": "a",
15
+ "value": "##2002021346"
16
+ },
17
+ {
18
+ "code": "b",
19
+ "value": "##2002021356"
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ "tag": "010",
25
+ "ind1": " ",
26
+ "ind2": " ",
27
+ "subfields": [
28
+ {
29
+ "code": "d",
30
+ "value": "##2002021357"
31
+ },
32
+ {
33
+ "code": "e",
34
+ "value": "##2002021359"
35
+ }
36
+ ]
37
+ }
38
+ ]
39
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "leader": "01331cam a22003494i 4500",
3
+ "fields": [
4
+ {
5
+ "tag": "001",
6
+ "value": "007346734"
7
+ },
8
+ {
9
+ "tag": "010",
10
+ "ind1": " ",
11
+ "ind2": " ",
12
+ "subfields": [
13
+ {
14
+ "code": "a",
15
+ "value": "##2002021346"
16
+ },
17
+ {
18
+ "code": "b",
19
+ "value": "##2002021356"
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ "tag": "010",
25
+ "ind1": " ",
26
+ "ind2": " ",
27
+ "subfields": [
28
+ {
29
+ "code": "d",
30
+ "value": "##2002021357"
31
+ },
32
+ {
33
+ "code": "e",
34
+ "value": "##2002021359"
35
+ }
36
+ ]
37
+ },
38
+ {
39
+ "tag": "010",
40
+ "ind1": " ",
41
+ "ind2": " ",
42
+ "subfields": [
43
+ {
44
+ "code": "c",
45
+ "value": "##2002021348"
46
+ },
47
+ {
48
+ "code": "d",
49
+ "value": "##2002021358"
50
+ },
51
+ {
52
+ "code": "e",
53
+ "value": "##2002021359"
54
+ }
55
+ ]
56
+ }
57
+ ]
58
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "description": "Empty array - no exclusion",
3
+ "tagPatternRegExp": "^010$",
4
+ "excludeSubfields": []
5
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "leader": "01331cam a22003494i 4500",
3
+ "fields": [
4
+ {
5
+ "tag": "001",
6
+ "value": "007346734"
7
+ },
8
+ {
9
+ "tag": "010",
10
+ "ind1": " ",
11
+ "ind2": " ",
12
+ "subfields": [
13
+ {
14
+ "code": "a",
15
+ "value": "##2002021346"
16
+ },
17
+ {
18
+ "code": "b",
19
+ "value": "##2002021356"
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ "tag": "010",
25
+ "ind1": " ",
26
+ "ind2": " ",
27
+ "subfields": [
28
+ {
29
+ "code": "c",
30
+ "value": "##2002021348"
31
+ },
32
+ {
33
+ "code": "d",
34
+ "value": "##2002021358"
35
+ },
36
+ {
37
+ "code": "e",
38
+ "value": "##2002021359"
39
+ }
40
+ ]
41
+ }
42
+ ]
43
+ }
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "description": "Drop subfields from source before copying",
3
3
  "tagPatternRegExp": "^010$",
4
- "dropSubfields": ["c", "d"],
5
- "disabled": false
4
+ "dropSubfields": ["c", "d"]
6
5
  }
@@ -50,7 +50,7 @@
50
50
  },
51
51
  {
52
52
  "code": "9",
53
- "value": "FENNI<PASS>"
53
+ "value": "FENNI<DROP>"
54
54
  }
55
55
  ]
56
56
  }
@@ -1,6 +1,5 @@
1
1
  {
2
- "description": "Copy fields 250 drop subfields 9 unless FENNI<KEEP> or FENNI<PASS>",
2
+ "description": "Copy fields 250 drop subfields 9 unless FENNI<KEEP> or FENNI<DROP>",
3
3
  "tagPatternRegExp": "^250$",
4
- "dropSubfields": [{"code": "9", "condition": "unless", "value": "^FENNI<(?<option>KEEP|PASS)>$"}],
5
- "disabled": false
4
+ "dropSubfields": [{"code": "9", "condition": "unless", "value": "^FENNI<(?<option>KEEP|DROP)>$"}]
6
5
  }
@@ -16,7 +16,7 @@
16
16
  },
17
17
  {
18
18
  "code": "9",
19
- "value": "FENNI<PASS>"
19
+ "value": "FENNI<DROP>"
20
20
  },
21
21
  {
22
22
  "code": "9",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  {
26
26
  "code": "9",
27
- "value": "MALLI<PASS>"
27
+ "value": "MALLI<DROP>"
28
28
  }
29
29
  ]
30
30
  }
@@ -50,7 +50,7 @@
50
50
  },
51
51
  {
52
52
  "code": "9",
53
- "value": "FENNI<PASS>"
53
+ "value": "FENNI<DROP>"
54
54
  }
55
55
  ]
56
56
  }
@@ -1,6 +1,5 @@
1
1
  {
2
- "description": "Copy fields 250 drop subfields 9 TESTI<KEEP> and 9 MALLI<PASS>",
2
+ "description": "Copy fields 250 drop subfields 9 TESTI<KEEP> and 9 MALLI<DROP>",
3
3
  "tagPatternRegExp": "^250$",
4
- "dropSubfields": [{"code": "9", "value": "TESTI<KEEP>"}, {"code": "9", "value": "MALLI<PASS>"}],
5
- "disabled": false
4
+ "dropSubfields": [{"code": "9", "value": "TESTI<KEEP>"}, {"code": "9", "value": "MALLI<DROP>"}]
6
5
  }
@@ -16,7 +16,7 @@
16
16
  },
17
17
  {
18
18
  "code": "9",
19
- "value": "FENNI<PASS>"
19
+ "value": "FENNI<DROP>"
20
20
  },
21
21
  {
22
22
  "code": "9",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  {
26
26
  "code": "9",
27
- "value": "MALLI<PASS>"
27
+ "value": "MALLI<DROP>"
28
28
  }
29
29
  ]
30
30
  }
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "description": "Copy fields 250 drop subfields all 9 - Does not copy 250 with no subfields left",
3
3
  "tagPatternRegExp": "^250$",
4
- "dropSubfields": [{"code": "9"}],
5
- "disabled": false
4
+ "dropSubfields": [{"code": "9"}]
6
5
  }
@@ -16,7 +16,7 @@
16
16
  },
17
17
  {
18
18
  "code": "9",
19
- "value": "FENNI<PASS>"
19
+ "value": "FENNI<DROP>"
20
20
  },
21
21
  {
22
22
  "code": "9",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  {
26
26
  "code": "9",
27
- "value": "MALLI<PASS>"
27
+ "value": "MALLI<DROP>"
28
28
  }
29
29
  ]
30
30
  }
@@ -0,0 +1,9 @@
1
+ {
2
+ "leader": "01331cam a22003494i 4500",
3
+ "fields": [
4
+ {
5
+ "tag": "001",
6
+ "value": "007346734"
7
+ }
8
+ ]
9
+ }