Explode Plugin allows to modify the meta-data inside a clustered record for a given meta-search target (as returned by Pazpar2), by taking a single meta-data field and producing multiple meta-data fields based on the regular expression provided as a part of the target configuration (in the "explode" property). The regular expression must include "named groups" which are are then turned into meta data elements (group name becomes the name of the meta-data element and the group match becomes the value). The plugin may be used for regex based citation parsing. (The names comes from a PHP function "explode").
Example:
Given the following record (returned by Pazpar2)
<record> ... <md-citation>58 Antitrust L.J. 355 (1989 1990)</md-citation> ... </record>
And the following "exploding" regex:
<explode>md-citation:(\\d+)\\b(?<journal-title>.+?\\s(?=\\d))</explode>
Note, the regex is defined in the 'explode' element of the target configuration with the following syntax:
md-element-name:regex[:::another-md-element-name:antother-regex]
The record after "explosion" becomes:
<record> ... <md-citation>58 Antitrust L.J. 355 (1989 1990)</md-citation> <md-journal-title>Antitrust L.J.</md-journal-title> ... </record>
Explode Plugin must be placed after the relay plugin in a chain. It usually only makes sense for the record and show chains:
chains.record = relay,explode chains.show = relay,explode