Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map availability to licenseType using value mapping #24

Open
twagoo opened this issue Feb 26, 2018 · 2 comments
Open

Map availability to licenseType using value mapping #24

twagoo opened this issue Feb 26, 2018 · 2 comments
Assignees

Comments

@twagoo
Copy link
Member

twagoo commented Feb 26, 2018

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.

@twagoo twagoo self-assigned this Feb 26, 2018
@twagoo
Copy link
Member Author

twagoo commented Feb 28, 2018

Also see the document describing the Potential for reimplementation of VLO post-processors as value mapping cases

twagoo pushed a commit that referenced this issue May 30, 2018
Development post 1.2.1 release
@twagoo
Copy link
Member Author

twagoo commented Aug 7, 2018

For an updated analysis, see clarin-eric/VLO#191. We may want to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant