Jan,

Sorry for the late response. It's been awhile since I've looked at the Proai 
code. Best as I can tell from perusing Github, the relevant bit of code is at 
https://github.com/fcrepo/proai/blob/master/src/java/proai/cache/RCDatabase.java#L773

which is basically appending some SQL conditions:
        query.append(" AND rcRecord.modDate >= " + from.getTime());
        query.append(" AND rcRecord.modDate <= " + until.getTime());

I didn't find any logic (which isn't to say that I didn't just overlook it) 
which accounts for from and until being the same date and modifying the from 
and until to be 12:00am and 11:59:59pm (or something like that).

But I'm not sure what the ISO8601 datetime representation of a simple date 
(e.g. 2013-05-21) is supposed to be. If it's something like 
2013-05-21T00:00:00, then I'd venture that Proai is behaving correctly.


On May 27, 2013, at 3:35 PM, jan schnasse <[email protected]> wrote:

> Hello,
> 
> I'm wondering if proai conforms to the oai-pmh spec part 2.7.1 Selective 
> Harvesting and Datestamps [1]. According to the spec a request with equal 
> from and until timestamps should give all records with the exact same 
> timestamp, or did I misunderstood? Proai only gives empty results in that 
> case. Here is what the spec says:
> 
> "Range limits are inclusive: from specifies a bound that must be interpreted 
> as "greater than or equal to", until specifies a bound that must be 
> interpreted as "less than or equal to". Therefore, the from argument must be 
> less than or equal to the until argument. Otherwise, a repository must issue 
> a badArgument error." [1]
> 
> And here is an example from our oai-pmh endpoint:
> 
> REQUEST
> oai-pmh?verb=ListRecords&metadataPrefix=oai_dc&from=2013-05-21&until=2013-05-21
> ANSWER
> noRecordsMatch
> 
> REQUEST
> oai-pmh?verb=ListRecords&metadataPrefix=oai_dc&from=2013-05-21&until=2013-05-22
> ANSWER
> a list of records including records from 2013-05-21
> 
> Is the proai behaviour correct?
> 
> Best
> Jan
> 
> [1]http://www.openarchives.org/OAI/openarchivesprotocol.html#SelectiveHarvestingandDatestamps


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to