You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original comment by Toni Sissala (GitHub: toni-sissala).
In regards to the lookup order, the profiles only specify distDate, so indeed that should be preferred.
The lookup order will be reversed.
It would be better to parse the ISO date and then extract the year from that.
Could you elaborate how would this be better?
The source data is a string (it is a string in the DB and OAI-PMH Repo Handler receives it as a string inside a JSON object), so parsing it as a date would require to first load it as a date-object and then extract the year and cast it as a string, which seems a bit overkill, since the date format is enforced by CMV profile and will always begin with ‘YYYY’ (the first four characters represents the year).
Profile states that distDate/@date format is:
Ideally 'YYYY-MM-DDThh:mm:ssZ' format, but can accept 'YYYY-MM-DD', 'YYYY-MM' or 'YYYY' as date format.
Parsing as a date will be even more complex if the source could also be in other formats ('YYYY-MM-DD', ‘YYYY-MM’, ‘YYYY’) as every format needs to be specified separately.
Add primary lookup location for Publisher. The previous lookup
location will remain as a secondary.
Format the value of publicationYear to only contain a year. Change
lookup order so that primary is
study.publication_years.attr_distribution_date.value, secondary is
study.publication_years.value.
Include property Date and use
study.publication_years.attr_distribution_date.value as source.
Require kuha_oai_pmh_repo_handler 1.0.2 in setup.py and requirements.txt.
Bump version to TBD.
Add changelog entry for TBD and write about the changes.
Original report on BitBucket by Toni Sissala (GitHub: toni-sissala).
publicationYear is supposed to be in format YYYY. The aggregator renders a full datestamp if available in source data.
Format the value by taking only the four characters of the source string:
If the source datestamp would be in a different format, this will yield invalid results.
The distDate/@date format is enforced by CMV profile, and should give us correct results.
Should the order of lookup be reversed?
The text was updated successfully, but these errors were encountered: