@natlibfi/marc-record-merge 6.0.0-beta.1 → 6.0.0-beta.11

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 (263) hide show
  1. package/.github/CODEOWNERS +9 -0
  2. package/.github/dependabot.yml +41 -0
  3. package/.github/workflows/melinda-node-tests.yml +60 -0
  4. package/LICENSE +21 -0
  5. package/README.md +122 -2
  6. package/dist/index.js +56 -42
  7. package/dist/index.js.map +1 -1
  8. package/dist/index.spec.js +59 -0
  9. package/dist/index.spec.js.map +1 -0
  10. package/dist/reducers/copy.js +254 -80
  11. package/dist/reducers/copy.js.map +1 -1
  12. package/dist/reducers/copy.spec.js +57 -72
  13. package/dist/reducers/copy.spec.js.map +1 -1
  14. package/dist/reducers/copy2.spec.js +67 -0
  15. package/dist/reducers/copy2.spec.js.map +1 -0
  16. package/dist/reducers/index.js +13 -24
  17. package/dist/reducers/index.js.map +1 -1
  18. package/dist/reducers/select.js +63 -58
  19. package/dist/reducers/select.js.map +1 -1
  20. package/dist/reducers/select.spec.js +45 -92
  21. package/dist/reducers/select.spec.js.map +1 -1
  22. package/dist/reducers/select2.spec.js +58 -0
  23. package/dist/reducers/select2.spec.js.map +1 -0
  24. package/package.json +33 -32
  25. package/src/index.js +50 -32
  26. package/src/index.spec.js +45 -0
  27. package/src/reducers/copy.js +262 -80
  28. package/src/reducers/copy.spec.js +50 -48
  29. package/src/reducers/copy2.spec.js +55 -0
  30. package/src/reducers/index.js +3 -30
  31. package/src/reducers/select.js +53 -39
  32. package/src/reducers/select.spec.js +41 -56
  33. package/src/reducers/select2.spec.js +49 -0
  34. package/test-fixtures/index/01/base.json +24 -0
  35. package/test-fixtures/index/01/merged.json +24 -0
  36. package/test-fixtures/index/01/metadata.json +8 -0
  37. package/test-fixtures/index/01/source.json +40 -0
  38. package/test-fixtures/index/02/base.json +24 -0
  39. package/test-fixtures/index/02/merged.json +24 -0
  40. package/test-fixtures/index/02/metadata.json +7 -0
  41. package/test-fixtures/index/02/source.json +40 -0
  42. package/test-fixtures/reducers/copy/{01/base.json → 01 - copy/01/base.json } +1 -1
  43. package/test-fixtures/reducers/copy/{01 → 01 - copy/01}/merged.json +0 -0
  44. package/test-fixtures/reducers/copy/01 - copy/01/metadata.json +4 -0
  45. package/test-fixtures/reducers/copy/{01 → 01 - copy/01}/source.json +0 -0
  46. package/test-fixtures/reducers/copy/{02/source.json → 01 - copy/02/base.json} +0 -0
  47. package/test-fixtures/reducers/copy/{02 → 01 - copy/02}/merged.json +0 -0
  48. package/test-fixtures/reducers/copy/01 - copy/02/metadata.json +4 -0
  49. package/test-fixtures/reducers/copy/{02/base.json → 01 - copy/02/source.json } +1 -1
  50. package/test-fixtures/reducers/copy/{03/base.json → 01 - copy/03/base.json } +1 -1
  51. package/test-fixtures/reducers/copy/{03 → 01 - copy/03}/merged.json +0 -0
  52. package/test-fixtures/reducers/copy/01 - copy/03/metadata.json +4 -0
  53. package/test-fixtures/reducers/copy/{03 → 01 - copy/03}/source.json +0 -0
  54. package/test-fixtures/reducers/copy/{05/base.json → 01 - copy/04/base.json } +1 -1
  55. package/test-fixtures/reducers/copy/{04/merged.json → 01 - copy/04/merged.json } +1 -1
  56. package/test-fixtures/reducers/copy/01 - copy/04/metadata.json +4 -0
  57. package/test-fixtures/reducers/copy/{04/source.json → 01 - copy/04/source.json } +1 -1
  58. package/test-fixtures/reducers/copy/{04/base.json → 01 - copy/05/base.json } +1 -1
  59. package/test-fixtures/reducers/copy/01 - copy/05/merged.json +77 -0
  60. package/test-fixtures/reducers/copy/01 - copy/05/metadata.json +4 -0
  61. package/test-fixtures/reducers/copy/01 - copy/05/source.json +62 -0
  62. package/test-fixtures/reducers/copy/01 - copy/06/base.json +24 -0
  63. package/test-fixtures/reducers/copy/01 - copy/06/merged.json +39 -0
  64. package/test-fixtures/reducers/copy/01 - copy/06/metadata.json +4 -0
  65. package/test-fixtures/reducers/copy/01 - copy/06/source.json +24 -0
  66. package/test-fixtures/reducers/copy/01 - copy/07/base.json +39 -0
  67. package/test-fixtures/reducers/copy/01 - copy/07/merged.json +39 -0
  68. package/test-fixtures/reducers/copy/01 - copy/07/metadata.json +5 -0
  69. package/test-fixtures/reducers/copy/01 - copy/07/source.json +24 -0
  70. package/test-fixtures/reducers/copy/01 - copy/08/base.json +28 -0
  71. package/test-fixtures/reducers/copy/01 - copy/08/merged.json +28 -0
  72. package/test-fixtures/reducers/copy/01 - copy/08/metadata.json +4 -0
  73. package/test-fixtures/reducers/copy/01 - copy/08/source.json +24 -0
  74. package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/01/base.json +17 -0
  75. package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/01/merged.json +20 -0
  76. package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/01/metadata.json +6 -0
  77. package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/01/source.json +20 -0
  78. package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/02/base.json +9 -0
  79. package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/02/merged.json +20 -0
  80. package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/02/metadata.json +6 -0
  81. package/test-fixtures/reducers/copy/02 - doNotCopyIfFieldPresent/02/source.json +20 -0
  82. package/test-fixtures/reducers/copy/03 - compareTagsOnly/01/base.json +24 -0
  83. package/test-fixtures/reducers/copy/03 - compareTagsOnly/01/merged.json +24 -0
  84. package/test-fixtures/reducers/copy/03 - compareTagsOnly/01/metadata.json +5 -0
  85. package/test-fixtures/reducers/copy/03 - compareTagsOnly/01/source.json +24 -0
  86. package/test-fixtures/reducers/copy/03 - compareTagsOnly/02/base.json +24 -0
  87. package/test-fixtures/reducers/copy/03 - compareTagsOnly/02/merged.json +100 -0
  88. package/test-fixtures/reducers/copy/03 - compareTagsOnly/02/metadata.json +5 -0
  89. package/test-fixtures/reducers/copy/03 - compareTagsOnly/02/source.json +100 -0
  90. package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/01/base.json +24 -0
  91. package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/01/merged.json +24 -0
  92. package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/01/metadata.json +5 -0
  93. package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/01/source.json +24 -0
  94. package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/02/base.json +24 -0
  95. package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/02/merged.json +39 -0
  96. package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/02/metadata.json +5 -0
  97. package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/02/source.json +24 -0
  98. package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/03/metadata.json +6 -0
  99. package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/04/base.json +20 -0
  100. package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/04/merged.json +31 -0
  101. package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/04/metadata.json +5 -0
  102. package/test-fixtures/reducers/copy/04 - compareWithoutIndicators/04/source.json +20 -0
  103. package/test-fixtures/reducers/copy/05 - copyUnless/01/base.json +9 -0
  104. package/test-fixtures/reducers/copy/05 - copyUnless/01/merged.json +24 -0
  105. package/test-fixtures/reducers/copy/05 - copyUnless/01/metadata.json +5 -0
  106. package/test-fixtures/reducers/copy/05 - copyUnless/01/source.json +47 -0
  107. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/01/base.json +24 -0
  108. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/01/merged.json +39 -0
  109. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/01/metadata.json +5 -0
  110. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/01/source.json +24 -0
  111. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/02/base.json +24 -0
  112. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/02/merged.json +24 -0
  113. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/02/metadata.json +5 -0
  114. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/02/source.json +24 -0
  115. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/03/base.json +28 -0
  116. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/03/merged.json +43 -0
  117. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/03/metadata.json +5 -0
  118. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/03/source.json +24 -0
  119. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/04/base.json +28 -0
  120. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/04/merged.json +28 -0
  121. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/04/metadata.json +5 -0
  122. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/04/source.json +24 -0
  123. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/05/base.json +20 -0
  124. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/05/merged.json +35 -0
  125. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/05/metadata.json +5 -0
  126. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/05/source.json +24 -0
  127. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/06/base.json +20 -0
  128. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/06/merged.json +35 -0
  129. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/06/metadata.json +5 -0
  130. package/test-fixtures/reducers/copy/06 - subfieldsMustBeIdentical/06/source.json +24 -0
  131. package/test-fixtures/reducers/copy/07 - excludeSubfields/01/base.json +39 -0
  132. package/test-fixtures/reducers/copy/07 - excludeSubfields/01/merged.json +39 -0
  133. package/test-fixtures/reducers/copy/07 - excludeSubfields/01/metadata.json +8 -0
  134. package/test-fixtures/reducers/copy/{05/source.json → 07 - excludeSubfields/01/source.json } +1 -1
  135. package/test-fixtures/reducers/copy/07 - excludeSubfields/02/base.json +39 -0
  136. package/test-fixtures/reducers/copy/{05/merged.json → 07 - excludeSubfields/02/merged.json } +5 -5
  137. package/test-fixtures/reducers/copy/07 - excludeSubfields/02/metadata.json +5 -0
  138. package/test-fixtures/reducers/copy/07 - excludeSubfields/02/source.json +43 -0
  139. package/test-fixtures/reducers/copy/08 - dropSubfields/01/base.json +35 -0
  140. package/test-fixtures/reducers/copy/08 - dropSubfields/01/merged.json +54 -0
  141. package/test-fixtures/reducers/copy/08 - dropSubfields/01/metadata.json +5 -0
  142. package/test-fixtures/reducers/copy/08 - dropSubfields/01/source.json +43 -0
  143. package/test-fixtures/reducers/copy/08 - dropSubfields/02/base.json +43 -0
  144. package/test-fixtures/reducers/copy/08 - dropSubfields/02/merged.json +58 -0
  145. package/test-fixtures/reducers/copy/08 - dropSubfields/02/metadata.json +5 -0
  146. package/test-fixtures/reducers/copy/08 - dropSubfields/02/source.json +32 -0
  147. package/test-fixtures/reducers/copy/08 - dropSubfields/03/base.json +43 -0
  148. package/test-fixtures/reducers/copy/08 - dropSubfields/03/merged.json +58 -0
  149. package/test-fixtures/reducers/copy/08 - dropSubfields/03/metadata.json +5 -0
  150. package/test-fixtures/reducers/copy/08 - dropSubfields/03/source.json +32 -0
  151. package/test-fixtures/reducers/copy/08 - dropSubfields/04/base.json +43 -0
  152. package/test-fixtures/reducers/copy/08 - dropSubfields/04/merged.json +43 -0
  153. package/test-fixtures/reducers/copy/08 - dropSubfields/04/metadata.json +5 -0
  154. package/test-fixtures/reducers/copy/08 - dropSubfields/04/source.json +32 -0
  155. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/01/base.json +9 -0
  156. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/01/merged.json +20 -0
  157. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/01/metadata.json +6 -0
  158. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/01/source.json +20 -0
  159. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/02/base.json +9 -0
  160. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/02/merged.json +20 -0
  161. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/02/metadata.json +6 -0
  162. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/02/source.json +20 -0
  163. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/03/base.json +9 -0
  164. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/03/merged.json +31 -0
  165. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/03/metadata.json +6 -0
  166. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/03/source.json +31 -0
  167. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/04/base.json +9 -0
  168. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/04/merged.json +42 -0
  169. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/04/metadata.json +6 -0
  170. package/test-fixtures/reducers/copy/09 - swapSubfieldCode/04/source.json +42 -0
  171. package/test-fixtures/reducers/copy/10 - swapTag/01/base.json +17 -0
  172. package/test-fixtures/reducers/copy/10 - swapTag/01/merged.json +28 -0
  173. package/test-fixtures/reducers/copy/10 - swapTag/01/metadata.json +6 -0
  174. package/test-fixtures/reducers/copy/10 - swapTag/01/source.json +20 -0
  175. package/test-fixtures/reducers/copy/11 - compareWithoutTag/01/base.json +28 -0
  176. package/test-fixtures/reducers/copy/11 - compareWithoutTag/01/merged.json +28 -0
  177. package/test-fixtures/reducers/copy/11 - compareWithoutTag/01/metadata.json +6 -0
  178. package/test-fixtures/reducers/copy/11 - compareWithoutTag/01/source.json +20 -0
  179. package/test-fixtures/reducers/copy/11 - compareWithoutTag/02/base.json +28 -0
  180. package/test-fixtures/reducers/copy/11 - compareWithoutTag/02/merged.json +39 -0
  181. package/test-fixtures/reducers/copy/11 - compareWithoutTag/02/metadata.json +6 -0
  182. package/test-fixtures/reducers/copy/11 - compareWithoutTag/02/source.json +31 -0
  183. package/test-fixtures/reducers/copy/11 - compareWithoutTag/03/base.json +28 -0
  184. package/test-fixtures/reducers/copy/11 - compareWithoutTag/03/merged.json +28 -0
  185. package/test-fixtures/reducers/copy/11 - compareWithoutTag/03/metadata.json +7 -0
  186. package/test-fixtures/reducers/copy/11 - compareWithoutTag/03/source.json +20 -0
  187. package/test-fixtures/reducers/copy/11 - compareWithoutTag/04/base.json +17 -0
  188. package/test-fixtures/reducers/copy/11 - compareWithoutTag/04/merged.json +28 -0
  189. package/test-fixtures/reducers/copy/11 - compareWithoutTag/04/metadata.json +7 -0
  190. package/test-fixtures/reducers/copy/11 - compareWithoutTag/04/source.json +31 -0
  191. package/test-fixtures/reducers/copy/11 - compareWithoutTag/05/base.json +28 -0
  192. package/test-fixtures/reducers/copy/11 - compareWithoutTag/05/merged.json +28 -0
  193. package/test-fixtures/reducers/copy/11 - compareWithoutTag/05/metadata.json +7 -0
  194. package/test-fixtures/reducers/copy/11 - compareWithoutTag/05/source.json +28 -0
  195. package/test-fixtures/reducers/metadata.json +4 -0
  196. package/test-fixtures/reducers/select/01/metadata.json +5 -0
  197. package/test-fixtures/reducers/select/02/metadata.json +4 -0
  198. package/test-fixtures/reducers/select/03/metadata.json +4 -0
  199. package/test-fixtures/reducers/select/04/metadata.json +5 -0
  200. package/test-fixtures/reducers/select/05/metadata.json +4 -0
  201. package/test-fixtures/reducers/select/06/base.json +4 -0
  202. package/test-fixtures/reducers/select/06/merged.json +4 -0
  203. package/test-fixtures/reducers/select/06/metadata.json +4 -0
  204. package/test-fixtures/reducers/select/06/source.json +4 -0
  205. package/test-fixtures/reducers/select/07/metadata.json +5 -0
  206. package/test-fixtures/reducers/select/08/metadata.json +4 -0
  207. package/test-fixtures/reducers/select/09/metadata.json +4 -0
  208. package/test-fixtures/reducers/select/10/metadata.json +5 -0
  209. package/test-fixtures/reducers/select/11/metadata.json +4 -0
  210. package/test-fixtures/reducers/select/12/metadata.json +5 -0
  211. package/test-fixtures/reducers/select/13/metadata.json +4 -0
  212. package/test-fixtures/reducers/select/14/base.json +24 -0
  213. package/test-fixtures/reducers/select/14/merged.json +24 -0
  214. package/test-fixtures/reducers/select/14/metadata.json +4 -0
  215. package/test-fixtures/reducers/select/14/source.json +24 -0
  216. package/.drone.yml +0 -92
  217. package/.nyc_output/7ecda3cd-9f84-4416-a466-fa1e5889c6a3.json +0 -1
  218. package/.nyc_output/processinfo/7ecda3cd-9f84-4416-a466-fa1e5889c6a3.json +0 -1
  219. package/.nyc_output/processinfo/index.json +0 -1
  220. package/LICENSE.txt +0 -165
  221. package/coverage/base.css +0 -224
  222. package/coverage/block-navigation.js +0 -79
  223. package/coverage/copy.js.html +0 -344
  224. package/coverage/favicon.png +0 -0
  225. package/coverage/index.html +0 -126
  226. package/coverage/lcov-report/base.css +0 -224
  227. package/coverage/lcov-report/block-navigation.js +0 -79
  228. package/coverage/lcov-report/copy.js.html +0 -344
  229. package/coverage/lcov-report/favicon.png +0 -0
  230. package/coverage/lcov-report/index.html +0 -126
  231. package/coverage/lcov-report/prettify.css +0 -1
  232. package/coverage/lcov-report/prettify.js +0 -2
  233. package/coverage/lcov-report/select.js.html +0 -431
  234. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  235. package/coverage/lcov-report/sorter.js +0 -170
  236. package/coverage/lcov.info +0 -195
  237. package/coverage/prettify.css +0 -1
  238. package/coverage/prettify.js +0 -2
  239. package/coverage/select.js.html +0 -431
  240. package/coverage/sort-arrow-sprite.png +0 -0
  241. package/coverage/sorter.js +0 -170
  242. package/test-fixtures/reducers/copy/01/pattern.txt +0 -1
  243. package/test-fixtures/reducers/copy/02/pattern.txt +0 -1
  244. package/test-fixtures/reducers/copy/03/pattern.txt +0 -1
  245. package/test-fixtures/reducers/copy/04/pattern.txt +0 -1
  246. package/test-fixtures/reducers/copy/05/pattern.txt +0 -1
  247. package/test-fixtures/reducers/select/01/expected-error.txt +0 -1
  248. package/test-fixtures/reducers/select/01/pattern.txt +0 -1
  249. package/test-fixtures/reducers/select/02/pattern.txt +0 -1
  250. package/test-fixtures/reducers/select/03/pattern.txt +0 -1
  251. package/test-fixtures/reducers/select/04/pattern.txt +0 -1
  252. package/test-fixtures/reducers/select/05/pattern.txt +0 -1
  253. package/test-fixtures/reducers/select/06/pattern.txt +0 -1
  254. package/test-fixtures/reducers/select/07/equalityFunction.txt +0 -1
  255. package/test-fixtures/reducers/select/07/pattern.txt +0 -1
  256. package/test-fixtures/reducers/select/08/pattern.txt +0 -1
  257. package/test-fixtures/reducers/select/09/pattern.txt +0 -1
  258. package/test-fixtures/reducers/select/10/equalityFunction.txt +0 -1
  259. package/test-fixtures/reducers/select/10/pattern.txt +0 -1
  260. package/test-fixtures/reducers/select/11/pattern.txt +0 -1
  261. package/test-fixtures/reducers/select/12/equalityFunction.txt +0 -1
  262. package/test-fixtures/reducers/select/12/pattern.txt +0 -1
  263. package/test-fixtures/reducers/select/13/pattern.txt +0 -1
@@ -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
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "leader": "01331cam a22003494i 4500",
3
+ "fields": [
4
+ {
5
+ "tag": "001",
6
+ "value": "007346734"
7
+ },
8
+ {
9
+ "tag": "018",
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
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "leader": "01331cam a22003494i 4500",
3
+ "fields": [
4
+ {
5
+ "tag": "001",
6
+ "value": "007346734"
7
+ },
8
+ {
9
+ "tag": "018",
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
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "description": "Field is copied from source only if it is missing in base, a different instance is not copied",
3
+ "tagPatternRegExp": "^018$",
4
+ "compareTagsOnly": true
5
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "leader": "01331cam a22003494i 4500",
3
+ "fields": [
4
+ {
5
+ "tag": "001",
6
+ "value": "007346734"
7
+ },
8
+ {
9
+ "tag": "018",
10
+ "ind1": " ",
11
+ "ind2": " ",
12
+ "subfields": [
13
+ {
14
+ "code": "c",
15
+ "value": "##2002021348"
16
+ },
17
+ {
18
+ "code": "d",
19
+ "value": "##2002021358"
20
+ }
21
+ ]
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,24 @@
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": "010a_base"
16
+ },
17
+ {
18
+ "code": "b",
19
+ "value": "010b_base"
20
+ }
21
+ ]
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,100 @@
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": "010a_base"
16
+ },
17
+ {
18
+ "code": "b",
19
+ "value": "010b_base"
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ "tag": "260",
25
+ "ind1": " ",
26
+ "ind2": " ",
27
+ "subfields": [
28
+ {
29
+ "code": "a",
30
+ "value": "[Åbo] :"
31
+ },
32
+ {
33
+ "code": "b",
34
+ "value": "[Åbo akademi],"
35
+ },
36
+ {
37
+ "code": "c",
38
+ "value": "1985."
39
+ }
40
+ ]
41
+ },
42
+ {
43
+ "tag": "260",
44
+ "ind1": " ",
45
+ "ind2": " ",
46
+ "subfields": [
47
+ {
48
+ "code": "a",
49
+ "value": "Västerås :"
50
+ },
51
+ {
52
+ "code": "b",
53
+ "value": "Byggpaul,"
54
+ },
55
+ {
56
+ "code": "c",
57
+ "value": "cop. 1985."
58
+ }
59
+ ]
60
+ },
61
+ {
62
+ "tag": "264",
63
+ "ind1": " ",
64
+ "ind2": " ",
65
+ "subfields": [
66
+ {
67
+ "code": "a",
68
+ "value": "[Stockholm] :"
69
+ },
70
+ {
71
+ "code": "b",
72
+ "value": "Rabén & Sjögren,"
73
+ },
74
+ {
75
+ "code": "c",
76
+ "value": "1982."
77
+ }
78
+ ]
79
+ },
80
+ {
81
+ "tag": "264",
82
+ "ind1": " ",
83
+ "ind2": " ",
84
+ "subfields": [
85
+ {
86
+ "code": "a",
87
+ "value": "Hki :"
88
+ },
89
+ {
90
+ "code": "b",
91
+ "value": "Maanmittaushallitus :"
92
+ },
93
+ {
94
+ "code": "c",
95
+ "value": "1988."
96
+ }
97
+ ]
98
+ }
99
+ ]
100
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "description": "for repeatable fields, 2x each 260/264",
3
+ "tagPatternRegExp": "^(260|264)$",
4
+ "compareTagsOnly": true
5
+ }
@@ -0,0 +1,100 @@
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": "010a_source"
16
+ },
17
+ {
18
+ "code": "b",
19
+ "value": "010b_source"
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ "tag": "260",
25
+ "ind1": " ",
26
+ "ind2": " ",
27
+ "subfields": [
28
+ {
29
+ "code": "a",
30
+ "value": "[Åbo] :"
31
+ },
32
+ {
33
+ "code": "b",
34
+ "value": "[Åbo akademi],"
35
+ },
36
+ {
37
+ "code": "c",
38
+ "value": "1985."
39
+ }
40
+ ]
41
+ },
42
+ {
43
+ "tag": "260",
44
+ "ind1": " ",
45
+ "ind2": " ",
46
+ "subfields": [
47
+ {
48
+ "code": "a",
49
+ "value": "Västerås :"
50
+ },
51
+ {
52
+ "code": "b",
53
+ "value": "Byggpaul,"
54
+ },
55
+ {
56
+ "code": "c",
57
+ "value": "cop. 1985."
58
+ }
59
+ ]
60
+ },
61
+ {
62
+ "tag": "264",
63
+ "ind1": " ",
64
+ "ind2": " ",
65
+ "subfields": [
66
+ {
67
+ "code": "a",
68
+ "value": "[Stockholm] :"
69
+ },
70
+ {
71
+ "code": "b",
72
+ "value": "Rabén & Sjögren,"
73
+ },
74
+ {
75
+ "code": "c",
76
+ "value": "1982."
77
+ }
78
+ ]
79
+ },
80
+ {
81
+ "tag": "264",
82
+ "ind1": " ",
83
+ "ind2": " ",
84
+ "subfields": [
85
+ {
86
+ "code": "a",
87
+ "value": "Hki :"
88
+ },
89
+ {
90
+ "code": "b",
91
+ "value": "Maanmittaushallitus :"
92
+ },
93
+ {
94
+ "code": "c",
95
+ "value": "1988."
96
+ }
97
+ ]
98
+ }
99
+ ]
100
+ }
@@ -0,0 +1,24 @@
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": "foo"
16
+ },
17
+ {
18
+ "code": "b",
19
+ "value": "bar"
20
+ }
21
+ ]
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,24 @@
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": "foo"
16
+ },
17
+ {
18
+ "code": "b",
19
+ "value": "bar"
20
+ }
21
+ ]
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "description": "Copy fields 010 compare without indicators - same field no copy",
3
+ "tagPatternRegExp": "^010$",
4
+ "compareWithoutIndicators": true
5
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "leader": "01331cam a22003494i 4500",
3
+ "fields": [
4
+ {
5
+ "tag": "001",
6
+ "value": "007346734"
7
+ },
8
+ {
9
+ "tag": "010",
10
+ "ind1": "1",
11
+ "ind2": "2",
12
+ "subfields": [
13
+ {
14
+ "code": "a",
15
+ "value": "foo"
16
+ },
17
+ {
18
+ "code": "b",
19
+ "value": "bar"
20
+ }
21
+ ]
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "leader": "01331cam a22003494i 4500",
3
+ "fields": [
4
+ {
5
+ "tag": "001",
6
+ "value": "007346734"
7
+ },
8
+ {
9
+ "tag": "010",
10
+ "ind1": "1",
11
+ "ind2": " ",
12
+ "subfields": [
13
+ {
14
+ "code": "a",
15
+ "value": "foo"
16
+ },
17
+ {
18
+ "code": "b",
19
+ "value": "bar"
20
+ }
21
+ ]
22
+ }
23
+ ]
24
+ }
@@ -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": "1",
11
+ "ind2": " ",
12
+ "subfields": [
13
+ {
14
+ "code": "a",
15
+ "value": "foo"
16
+ },
17
+ {
18
+ "code": "b",
19
+ "value": "bar"
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ "tag": "010",
25
+ "ind1": " ",
26
+ "ind2": "2",
27
+ "subfields": [
28
+ {
29
+ "code": "a",
30
+ "value": "foo"
31
+ },
32
+ {
33
+ "code": "b",
34
+ "value": "bar"
35
+ }
36
+ ]
37
+ }
38
+ ]
39
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "description": "Copy fields 010 compare with indicators - different field copy",
3
+ "tagPatternRegExp": "^010$",
4
+ "compareWithoutIndicators": false
5
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "leader": "01331cam a22003494i 4500",
3
+ "fields": [
4
+ {
5
+ "tag": "001",
6
+ "value": "007346734"
7
+ },
8
+ {
9
+ "tag": "010",
10
+ "ind1": " ",
11
+ "ind2": "2",
12
+ "subfields": [
13
+ {
14
+ "code": "a",
15
+ "value": "foo"
16
+ },
17
+ {
18
+ "code": "b",
19
+ "value": "bar"
20
+ }
21
+ ]
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "description": "Copy fields 730: omit ind 1 from comparison - same field no copy",
3
+ "tagPatternRegExp": "^730$",
4
+ "compareWithoutIndicator1": true,
5
+ "skip": true
6
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "leader": "01331cam a22003494i 4500",
3
+ "fields": [
4
+ {
5
+ "tag": "001",
6
+ "value": "007346734"
7
+ },
8
+ {
9
+ "tag": "730",
10
+ "ind1": "4",
11
+ "ind2": " ",
12
+ "subfields": [
13
+ {
14
+ "code": "a",
15
+ "value": "The End"
16
+ }
17
+ ]
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "leader": "01331cam a22003494i 4500",
3
+ "fields": [
4
+ {
5
+ "tag": "001",
6
+ "value": "007346734"
7
+ },
8
+ {
9
+ "tag": "730",
10
+ "ind1": "4",
11
+ "ind2": " ",
12
+ "subfields": [
13
+ {
14
+ "code": "a",
15
+ "value": "The End"
16
+ }
17
+ ]
18
+ },
19
+ {
20
+ "tag": "730",
21
+ "ind1": "0",
22
+ "ind2": " ",
23
+ "subfields": [
24
+ {
25
+ "code": "a",
26
+ "value": "The End"
27
+ }
28
+ ]
29
+ }
30
+ ]
31
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "description": "Copy fields 730: omit ind 2 from comparison - different field -> copy",
3
+ "tagPatternRegExp": "^730$",
4
+ "compareWithoutIndicator2foo": true
5
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "leader": "01331cam a22003494i 4500",
3
+ "fields": [
4
+ {
5
+ "tag": "001",
6
+ "value": "007346734"
7
+ },
8
+ {
9
+ "tag": "730",
10
+ "ind1": "0",
11
+ "ind2": " ",
12
+ "subfields": [
13
+ {
14
+ "code": "a",
15
+ "value": "The End"
16
+ }
17
+ ]
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "leader": "01331cam a22003494i 4500",
3
+ "fields": [
4
+ {
5
+ "tag": "001",
6
+ "value": "007346734"
7
+ }
8
+ ]
9
+ }
@@ -0,0 +1,24 @@
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
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "description": "Copy fields unless contains subfields - {code: 9, value: MALLI<DROP>}",
3
+ "tagPatternRegExp": "^010$",
4
+ "copyUnless": [{"code": "9", "value": "MALLI<DROP>"}]
5
+ }