noah/rules/siegen/hbz.json

85 lines
2.3 KiB
JSON

[
{
"op": "core/column-addition-by-fetching-urls",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "dc:identifier",
"expression": "isBlank(value)",
"columnName": "dc:identifier",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": false,
"l": "false"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"baseColumnName": "dc:identifier",
"urlExpression": "grel:'https://lobid.org/resources/search?q=' + forEach(value.split('␞'),v,'urn:\"'+v+'\"').join('+OR+')",
"onError": "set-to-blank",
"newColumnName": "hbz",
"columnInsertIndex": 11,
"delay": 0,
"cacheResponses": true,
"httpHeadersJson": [
{
"name": "authorization",
"value": ""
},
{
"name": "user-agent",
"value": "OpenRefine 3.4.1 [437dc4d]"
},
{
"name": "accept",
"value": "*/*"
}
],
"description": "Create column hbz at index 11 by fetching URLs based on column dc:identifier using expression grel:'https://lobid.org/resources/search?q=' + forEach(value.split('␞'),v,'urn:\"'+v+'\"').join('+OR+')"
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "dc:identifier",
"expression": "isBlank(value)",
"columnName": "dc:identifier",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": false,
"l": "false"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "hbz",
"expression": "grel:forNonBlank(value.parseJson().member[0].hbzId,v,v,null)",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10,
"description": "Text transform on cells in column lobid using expression grel:forNonBlank(value.parseJson().member[0].hbzId,v,v,null)"
}
]