EPrints Technical Mailing List Archive
Message: #08790
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] non-existent dates and oai-pmh sets
- To: John Salter <J.Salter@leeds.ac.uk>, "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>, David R Newman <drn@ecs.soton.ac.uk>
- Subject: Re: [EP-tech] non-existent dates and oai-pmh sets
- From: Tomasz Neugebauer <Tomasz.Neugebauer@concordia.ca>
- Date: Mon, 8 Nov 2021 19:47:02 +0000
CAUTION: This e-mail originated outside the University of Southampton.
Thank you, John for that! It worked for me, so I was able to validate/test correctly.
Also, thank you to David for the explanations about the date.
Based on what you wrote, since we don't have the "dates, dates, dates bazaar" plugin, and we are about to upgrade our repository to 3.4.3, so that should resolve this issue of 'invalid' dates being allowed into the repository. What worries me is this part:
"If you had your own validation triggers set for individual date fields, then these would have stopped working without a second patch to fix this.
Both these patches can be found at the EPrints 3.4.3 release wiki page [1]."
I think we do make some checks on that (embargo period not exceeding a certain amount), so I need to test that. If it is broken, I will try to
install the patch from the release page.
Tomasz
________________________________________________
Tomasz Neugebauer
Tel. / Tél. 514-848-2424 ext. / poste 7738
Mailing address / adresse postale: 1455 De Maisonneuve Blvd. W., LB-540-03, Montreal, Quebec H3G 1M8 library.concordia.ca From: John Salter <J.Salter@leeds.ac.uk>
Sent: Thursday, November 4, 2021 5:11 AM To: eprints-tech@ecs.soton.ac.uk <eprints-tech@ecs.soton.ac.uk>; David R Newman <drn@ecs.soton.ac.uk>; Tomasz Neugebauer <Tomasz.Neugebauer@concordia.ca> Subject: RE: [EP-tech] non-existent dates and oai-pmh sets Attention This email originates from outside the concordia.ca domain. // Ce courriel provient de l'exterieur du domaine de concordia.ca
Hi Tomasz, For the OAI-PMH question, you can add 'from' and 'until' parameters to the request - based on the last_mod date of the record in question e.g.:
The from/until params should be in the format: 2021-11-01T00:00:00Z
Automatic sets get listed on the item page* but it appears that the custom sets don't get listed. I'll have to revisit the OAI-PMH specs to see if this is an allowed behaviour…
Cheers, John
* e.g. EPrint 631 is part of our 'irus-orcid' set: https://eprints.whiterose.ac.uk/cgi/oai2?verb=ListIdentifiers&metadataPrefix=oai_dc&set=irus-orcid&from=2021-11-01T00:00:00Z&until=2021-11-02T00:00:00Z but the irus-orcid set isn't listed on https://eprints.whiterose.ac.uk/cgi/oai2?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai:eprints.whiterose.ac.uk:631
From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of David R Newman via Eprints-tech
Hi Tomasz,
Validation for dates has been added in EPrints 3.4.3, which prevent invalid dates being set. Unfortunately, a couple of bugs have been found post release:
1. Multiple values not supported by EPrints::MetaField::Date validate function 2. Bespoke validations no longer supported for Date MetaField
Both of these issues would not be a problem in a vanilla EPrints archive but if you use the Dates, Dates, Dates Bazaar plugin, you will need to apply a patch to fix this. If you had your own validation triggers set for individual date fields, then these would have stopped working without a second patch to fix this. Both these patches can be found at the EPrints 3.4.3 release wiki page [1].
A further addition to the Date MetaField in 3.4.3 is the ability to define a bespoke function under $c->{worfklow_datepicker} that defines the HTML markup as a XML::LibXML::DocumentFragment. This HTML markup could include client-side (i.e. _javascript_) validation/restrictions to prevent invalid dates from being set (e.g. if you change the month to February, its does not allow 30th or 31st to be set for the date).
Alternatively there is a Datepicker MetaField available in the daterangepicker ingredient [2]. However, this uses a single text field rather than multiple field separately storing year, month and day in separate database columns. So it is not ideal if you want to transform an existing Date MetaField into a Datepicker MetaField.
On you second question. There is no URL syntax to test if an item is in a particular OAI-PMH set. I think that statement is true for all OAI-PMH not just specific to EPrints. I am not sure there is any straightforward way to perform your test, bar writing your own client script to download just the identifiers for a whole OAI-PMH set, 100 identifiers at a time, as OAI-PMH is designed to work. After downloading each tranche check whether the item in question is present. The initial request for identifiers in a set would be a bit like:
This will then give you a resumption token to get the next 100 until there are no more identifiers left.
Regards
David Newman
[1] https://wiki.eprints.org/w/EPrints_3.4.3#Known_Issues [2] https://github.com/eprints/daterangepicker/blob/master/plugins/EPrints/MetaField/Datepicker.pm
On 03/11/2021 22:44, Tomasz Neugebauer via Eprints-tech wrote:
|
- Follow-Ups:
- Re: [EP-tech] non-existent dates and oai-pmh sets
- From: Tomasz Neugebauer <Tomasz.Neugebauer@concordia.ca>
- Re: [EP-tech] non-existent dates and oai-pmh sets
- References:
- [EP-tech] non-existent dates and oai-pmh sets
- From: Tomasz Neugebauer <Tomasz.Neugebauer@concordia.ca>
- Re: [EP-tech] non-existent dates and oai-pmh sets
- From: David R Newman <drn@ecs.soton.ac.uk>
- Re: [EP-tech] non-existent dates and oai-pmh sets
- From: John Salter <J.Salter@leeds.ac.uk>
- Re: [EP-tech] non-existent dates and oai-pmh sets
- From: Tomasz Neugebauer <Tomasz.Neugebauer@concordia.ca>
- [EP-tech] non-existent dates and oai-pmh sets
- Prev by Date: [EP-tech] Customizing item display
- Next by Date: Re: [EP-tech] Customizing item display
- Previous by thread: [EP-tech] Sort view with creators_name and corp_creators
- Index(es):