Rewrite KnownMetadataPrefixesOaiPmhBundlesStreamSource to just use Instant for `from` and `until`, even for day-granularity OAI-PMH servers
The OAI-PMH 2 specification says:
Dates and times are uniformly encoded using ISO8601 and are expressed in UTC throughout the protocol. When time is included, the special UTC designator ("Z") must be used. UTC is implied for dates although no timezone designator is specified. For example, 1957-03-20T20:30:00Z is UTC 8:30:00 PM on March 20th 1957. UTCdatetime is used in both protocol requests and protocol replies, in the way described in the following sections.
As the day-granularity type is supposed to use UTC / Zulu time, convertions from an internal Instant
representation should be correct with respect to the specification.
The rewrite shall include changes to org.gesis.dda.harvester.oaipmh.impl.HarvestSpecificationBuilder
, introducing a method public void setIntervalTpye(HarvestingIntervalType intervalType)
. That new method in turn can then be programmatically used in KnownMetadataPrefixesOaiPmhBundlesStreamSource
by querying oaiClient.identify().getGranularity().
As a result, using KnownMetadataPrefixesOaiPmhBundlesStreamSource
shall become easier, as its clients no longer have the burden of deciding for the granularity type and by implication abstracting away if-then-elsing between second-granularity Instant and day-granularity LocalDate.
When this rewrite is finished, it is a good time to extract KnownMetadataPrefixesOaiPmhBundlesStreamSource
into the YOAI library.