This repository has been archived by the owner on May 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
04-subject.json
110 lines (110 loc) · 2.57 KB
/
04-subject.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
[
{
"op": "core/column-addition",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"baseColumnName": "dc:subject@xml:lang",
"expression": "grel:value.replace(/^de.+/,'ger').replace(/^en.+/,'eng').replace(/^fr.+/,'fre')",
"onError": "set-to-blank",
"newColumnName": "subject@lang",
"columnInsertIndex": 2
},
{
"op": "core/column-addition",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"baseColumnName": "dc:subject",
"expression": "grel:value",
"onError": "set-to-blank",
"newColumnName": "subject/topic",
"columnInsertIndex": 2
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "text",
"name": "subject/topic",
"columnName": "subject/topic",
"query": ",",
"mode": "text",
"caseSensitive": false,
"invert": false
}
],
"mode": "row-based"
},
"columnName": "subject/topic",
"expression": "grel:value.replace(/,$/,'')",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"columnName": "subject/topic",
"expression": "grel:value.replace(',',';').replace('; ',';')",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "text",
"name": "subject/topic",
"columnName": "subject/topic",
"query": ";",
"mode": "text",
"caseSensitive": false,
"invert": false
}
],
"mode": "row-based"
},
"columnName": "subject@lang",
"expression": "grel:forEach(cells['subject/topic'].value.split(';'), v, value).join(';')",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
},
{
"op": "core/multivalued-cell-split",
"columnName": "subject/topic",
"keyColumnName": "id",
"mode": "separator",
"separator": ";",
"regex": false
},
{
"op": "core/multivalued-cell-split",
"columnName": "subject@lang",
"keyColumnName": "id",
"mode": "separator",
"separator": ";",
"regex": false
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [],
"mode": "record-based"
},
"columnName": "subject/topic",
"expression": "value.trim()",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
}
]