wiki:CMDI 1.2/Cues/Derived values/Summary

Version 6 (modified by teckart, 10 years ago) (diff)

minor changes

This page is a subpage of CMDI 1.2

Dervied Values in CMDI 1.2: Executive summary

This page provides an executive summary of the issue and proposed solution fully described in CMDI 1.2/Cues/Derived values.

Issue description

Most metadata needs to be created manually but in some cases parts of it can be derived: either from the described resource (e.g. a lot of technical metadata: file size, encoding, bit rate, ...) or from other metadata values (e.g. language code -> language name), sometimes in combination with external data (age can be derived from the combination of date of birth (metadata) and the current date (external information)). The actual derivation of values has to be carried out by the tool (i.e. the editor).

Some examples of rules that might be supported:

  • CreationDate gets populated with the current date (format yyyy-mm-dd)
  • FileSize gets populated with the file size in bytes of the referenced resource
  • LanguageName gets filled in based on the value of LanguageCode and an external lookup table
  • The value of Actor.Age becomes the difference between the current data and the value of Actor.DateOfBirth in years (floored)

Description of proposed solution

The General Component Schema is extended with one additional (optional) attribute (AutoValue) for the element/attribute specification. This attribute contains a function that is used to generate the content of the respective element/attribute.

The supported attribute only provides a kind of "hook" to extend CMDI components with a derivation functionality. There will be no concrete specification of supported functions, syntax or of the mechanism to reference content of other elements. The specific implementation is up to the community and not part of the CMDI 1.2 specification process.

General Component Schema Changes

The following changes to the General Component Schema are proposed:

New attribute for clarin_element_attributes and Attribute (really? TODO):

  • @AutoValue (optional: Derivation function with arguments)

Profile schema changes

The changes to the General Component Schema reflect in the CMDI Profile Schema as follows:

Attribute for xs:element and xs:attribute:

  • @AutoValue? (optional: Derivation function with arguments)

Instance changes

There will be no changes to CMDI instances.

Impact on tools

There is no impact on tools as long as there is no agreement about further details which are not part of this specification (including set of supported functions, syntax etc.). If there is such an agreement the following changes would be necessary:

  • Component Registry must support adding derivation functions to elements/attributes.
  • Metadata editors should provide support for the specified functions. Specifically this means that editors should automatically insert values for elements/attributes if applicable.