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.
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
availabilityis adopted. This allows for explicit 'overrides' of the availability level (pub/aca/res). SeeLicenseTypePostNormalizer.java: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
doesProcessNoValuemethod ofAbstractPostNormalizer)With the new value mapping implementation, we can achieve the following with a cross-facet mapping from
availabilitytolicenseTypewith:availabilityto the same values inlicenseTypeImplement this to see if this actually works.