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-titleInfo.json
114 lines (114 loc) · 3 KB
/
04-titleInfo.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
111
112
113
114
[
{
"op": "core/column-addition",
"engineConfig": {
"facets": [],
"mode": "record-based"
},
"baseColumnName": "dc:title@xml:lang",
"expression": "grel:value.replace(/^de.+/,'ger').replace(/^en.+/,'eng').replace(/^fr.+/,'fre')",
"onError": "set-to-blank",
"newColumnName": "titleInfo@lang",
"columnInsertIndex": 2
},
{
"op": "core/column-addition",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "dc:language",
"expression": "value",
"columnName": "dc:language",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "deu",
"l": "deu"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "record-based"
},
"baseColumnName": "dc:title@xml:lang",
"expression": "grel:if(and(isNonBlank(value), value != 'de-DE'), 'translated', null)",
"onError": "set-to-blank",
"newColumnName": "titleInfo@type",
"columnInsertIndex": 2
},
{
"op": "core/column-addition",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"baseColumnName": "dc:title",
"expression": "grel:value.split(': ')[0].replace(/:$/,'')",
"onError": "set-to-blank",
"newColumnName": "titleInfo/title",
"columnInsertIndex": 2
},
{
"op": "core/column-addition",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"baseColumnName": "dc:title",
"expression": "grel:value.split(': ')[1].replace(/:$/,'').trim()",
"onError": "set-to-blank",
"newColumnName": "titleInfo/subTitle",
"columnInsertIndex": 2
},
{
"op": "core/column-addition",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"baseColumnName": "dc:title",
"expression": "grel:with(['a', 'das', 'dem', 'den', 'der', 'des', 'die', 'ein', 'eine', 'einem', 'einen', 'einer', 'eines', 'the'],x,if(inArray(x,value.split(' ')[0].toLowercase()),value.split(' ')[0] + ' ',''))",
"onError": "set-to-blank",
"newColumnName": "titleInfo/nonsort",
"columnInsertIndex": 2
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "titleInfo/nonsort",
"expression": "isBlank(value)",
"columnName": "titleInfo/nonsort",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": false,
"l": "false"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "titleInfo/title",
"expression": "grel:value.split(' ').slice(1).join(' ')",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
}
]