Skip to content

Map availability to licenseType using value mapping #24

@twagoo

Description

@twagoo

Currently, license type has a rather specific (post)processing logic: a rather limited set of concepts have their values mapped directly. If no value is mapped, the value of availability is adopted. This allows for explicit 'overrides' of the availability level (pub/aca/res). See LicenseTypePostNormalizer.java:

    public List<String> process(final String value, CMDIData cmdiData) {
        if (value != null) {
            final String normalizedVal = normalize(value);
            //Availability variants can be normalized with multiple values, in vocabulary they are separated with ;
            if (normalizedVal != null) {
                return Arrays.asList(normalizedVal.split(";"));
            }
        }
        //no (normalized) value - get from availability facet
        return transferValuesFromAvailability(cmdiData);
    }

To reduce the complexity of the new value mapping implementation (see clarin-eric/VLO#93), we would like to get rid of the option to 'map if no match' (controlled by the doesProcessNoValue method of AbstractPostNormalizer)

With the new value mapping implementation, we can achieve the following with a cross-facet mapping from availability to licenseType with:

  • Map values 'pub', 'aca' and 'res' in availability to the same values in licenseType
  • Remove source value: NO
  • Override existing value: NO

Implement this to see if this actually works.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions