[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] non-existent dates and oai-pmh sets

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 

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.


David Newman

[1] https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FEPrints_3.4.3%23Known_Issues&data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cf68c2b774bb643aa498508d99f24143f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637715799670630240%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=qNAZXntUBcOuDXKp4Bh4UwXwHnQ6CCK3dmdEt6pBmmg%3D&reserved=0


On 03/11/2021 22:44, Tomasz Neugebauer via Eprints-tech wrote:
> *CAUTION:* This e-mail originated outside the University of Southampton.
> Hello everyone,
> I have a couple of questions.
> First question, it's about setting an embargo expiry date (and 
> choosing other dates).? It was recently brought to my attention that 
> it is possible to set "non-existent" dates, for example, February 31st 
> or April 31st.? I'm not sure if I hadn't thought about this before, or 
> if I didn't really think of this as an issue, but I suppose this 
> raises the question of:
> If the embargo expiry date (e.g: April 31st) never happens, then does 
> the embargo ever expire? ?The question is, has anyone thought this 
> issue serious enough to build-in some error checking for this, or 
> attempted to modify the date-picker interface that exists in EPrintsto 
> address this issue?
> Second question, it's about limiting what is inside an OAI-PMH set.? 
> Based on my understanding, we can use something like this in the 
> oai.pl configuration to create a set that is both (1) limited to 
> un-embargoed (open access) items AND (2) items limited by type:
> $oai->{custom_sets} = [
> { spec => "openaire", name => "OpenAIRE Set - OA article conference 
> book monograph",
> filters=> [
> {meta_fields=>["full_text_status"], value=>"public"},
> {meta_fields =>[qw( type )], merge => "ANY", value => "article 
> conference_item book_section monograph book" }
> ]
> }
> ];
> How can I confirm if this is working correctly?? In other words, how 
> can I test if an item in the repository is part of an OAI-PMH set?? Is 
> there a URL syntax where I could pass the eprintid and the set name to 
> find out if it is part of the set?
> Thanks!
> Tomasz
> ________________________________________________
> Tomasz Neugebauer
> Senior Librarian | Biblioth?caire titulaire
> Digital Projects & Systems Development Librarian / Biblioth?caire des 
> Projets Num?riques & D?veloppement de Syst?mes
> Concordia University / Universit? Concordia
> Tel. / T?l. 514-848-2424 ext. / poste 7738
> Email / courriel: tomasz.neugebauer at concordia.ca 
> <mailto:tomasz.neugebauer at concordia.ca>
> Mailing address / adresse postale:?1455 De Maisonneuve Blvd. 
> W.,?LB-540-03, Montreal, Quebec H3G 1M8
> Street address / adresse municipale: 1400?De Maisonneuve Blvd. 
> W.,?LB-540-03, Montreal, Quebec H3G 1M8
> _library.concordia.ca_
> *** Options:http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive:https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cf68c2b774bb643aa498508d99f24143f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637715799670630240%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=4JUZ%2F%2Fh9PBPZJmNcXlbBYyw1UgcWWW2JZyggsGZ6yUA%3D&amp;reserved=0
> *** EPrints community wiki:https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cf68c2b774bb643aa498508d99f24143f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637715799670630240%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=VHRGG3iJrMwbFcTj2L967%2FU%2F8I%2FxEQDkpGW%2F5YO1E58%3D&amp;reserved=0

This email has been checked for viruses by AVG.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20211103/00473e1e/attachment-0001.html