Edwin, > 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.
I think proai is doing it wrong in this case. Like the OAI-PMH spec says: "Repositories *must* support selective harvesting with the from and until arguments expressed at day granularity...Range limits are inclusive" [1] I'm not that experienced in mysql, but why not let mysql handle timeranges, e.g. SELECT * FROM rcRecord WHERE modDate between 2013-21-05 and 2013-21-05 ; This would also require a change of the datatype of modDate from bigint(20) to date or datetime or similar. > Gesendet: Sonntag, 02. Juni 2013 um 20:38 Uhr > Von: "Edwin Shin" <[email protected]> > An: "Support and info exchange list for Fedora users." > <[email protected]> > Betreff: Re: [fcrepo-user] proai - noRecordsMatch using equal from and until > timestamps > > 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 > ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j _______________________________________________ Fedora-commons-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
