Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When putting a string in metadata sidecar that has the pattern #{...} it will be evaluated using the Spring Expression Language. Inside an expression, you can reference the metadata using R(<Dotted key>) or record(<Dotted key>) for example R('Descriptive.Title') or record('Descriptive.Title').

Info

The R takes an optional second argument, which is the default value when the metadata field is not present.

Merging

When the templated sidecar is evaluated against a record it will result for example in the following metadata sidecar

...

Level

Case

Effect

Example Expression

Example Output

Top

SimpleField

String

R('Descriptive.Title')

My title

Top

ListField

List of Strings

R('Descriptive.Keywords')

["A", "B", "C"]

Top

MapField

Map of Strings

R('Structural.Versioning')

{"Status": "HEAD", "Version": "2"}

Top

MultiItemField

Map of List of Strings

R('Descriptive.Authors')

{"Authors": ["Cedric"], "Director": ["Alice", "Bob"]}

Top

Others

Not allowed

Sub

Child of ListField

List of Strings

R('Descriptive.Keywords.Keyword')

["A", "B", "C"]

Sub

Child of MultiItemField

List of Strings

R('Descriptive.Authors.Director')

["Alice", "Bob"]

Sub

Child of MapField

String

R('Structural.Versioning.Status')

HEAD

Sub

Other

Not allowed

...

Output after evaluating the expression

...