-
Notifications
You must be signed in to change notification settings - Fork 0
Subfield exclusion
natlibfi-arlehiko edited this page Sep 7, 2018
·
2 revisions
Checks that the record does not contain the configured subfields. Fixes the record by removing the configured subfields.
All rules must match for the subfield to be selected for exclusion.
An array of object with the following properties:
- tag (RegExp): Pattern to match the field's tags Mandatory
- ind1 (RegExp): Pattern to match the field's ind1 property
- ind2 (RegExp): Pattern to match the field's ind2 property
-
subfields (Array<Object>): An array of objects with the following properties (Mandatory):
- code (RegExp): Pattern to match the subfield's code Mandatory
- value (RegExp): Pattern to match the subfield's value
[{
tag: /^100$/,
subfields: [{code: /4/}]
}]
{
"leader": "foo",
"fields": [
{
"tag": "100",
"ind1": " ",
"ind2": " ",
"subfields": [
{
"code": "a",
"value": "Foo Bar"
}
]
},
{
"tag": "245",
"ind1": " ",
"ind2": " ",
"subfields": [
{
"code": "a",
"value": "Fubar"
}
]
}
]
}
{
"leader": "foo",
"fields": [
{
"tag": "100",
"ind1": " ",
"ind2": " ",
"subfields": [
{
"code": "a",
"value": "Foo Bar"
},
{
"code": "4",
"value": "att"
}
]
},
{
"tag": "245",
"ind1": " ",
"ind2": " ",
"subfields": [
{
"code": "a",
"value": "Fubar"
}
]
}
]
}
[{
tag: /^210$/,
ind2: /\s/,
subfields: [{
code: /2/,
value: /.+/
}]
}]
{
"leader": "foo",
"fields": [
{
"tag": "210",
"ind1": " ",
"ind2": " ",
"subfields": [
{
"code": "a",
"value": "Foo"
}
]
},
{
"tag": "245",
"ind1": " ",
"ind2": " ",
"subfields": [
{
"code": "a",
"value": "Fubar"
}
]
}
]
}
{
"leader": "foo",
"fields": [
{
"tag": "210",
"ind1": " ",
"ind2": " ",
"subfields": [
{
"code": "a",
"value": "Foo"
},
{
"code": "2",
"value": "dnlm"
}
]
},
{
"tag": "245",
"ind1": " ",
"ind2": " ",
"subfields": [
{
"code": "a",
"value": "Fubar"
}
]
}
]
}