goobi/goobi-production — pull request #189 by matthias-ronge (2014-07-29 14:50:53+00:00)
Title: Merge: Allow to map several metadata fields into one (#168)

A possibility to map several metadata fields into one was added. Therefore, the OPAC beautifyer definitions have been extended by an additional and optional parameter `mode`. Leaving out `mode` retains the customary behaivour.

The OPAC beautifier can be configured in `goobi_opac.xml`. Up to now, the following behaviour was already provided:
```xml

```
If the record contained a field as named by the setvalue tag and subtag values, and if all of the condition constructs inside the setvalue construct were fulfilled, where `value` is a Java regular expression which must match the whole field content (i.e., the above example equals `/^deu?$/` in Perl notation) of the field named in the condition construct, the field named by setvalue construct was changed to the value named there. Setting the following `mode` attributes is optional and will continue to provide the same behaviour:
```xml

```

**Extensions:**
* It is now possible to alternately use the `mode="find"` in the `condition` construct which will try just to *find* a sequence of characters in the condition’s field, instead of matching against the whole field content. (I.e., the above example then equals `/deu?/` in Perl notation.)
* It is now possible use the result of the (last, if several) condition checked in the setvalue’s value attribute. There are two options:
* `{@}` may be used as placeholder for a concatenation of all find results **or**
* `{1}`, `{2}`, `{3}`, … may be used to insert match groups.
* It is now possible to set the setvalue mode to `prepend` or `append`.
* If the setvalue tag doesn’t exist, it will be created, so it is possible to create fictious fields
* Since the underlying Apache Commons Configuration API likes to trim the attribute value, `␣` (U+2423) may be used as placeholder for a white space.

**Examples:**

```xml

```