10.9.3. Harvesting API
The org.dspace.search package also provides a 'harvesting' API. This allows callers to extract information
about items modified within a particular timeframe, and within a particular scope (all of DSpace, or a community or
collection.) Currently this is used by the Open Archives Initiative metadata harvesting protocol application, and the
e-mail subscription code.
The Harvest.harvest is invoked with the required scope and start and end dates. Either date can be omitted. The
dates should be in the ISO8601, UTC time zone format used elsewhere in the DSpace system.
HarvestedItemInfo objects are returned. These objects are simple containers with basic information about the
items falling within the given scope and date range. Depending on parameters passed to the harvest method, the
containers and item fields may have been filled out with the IDs of communities and collections containing an
item, and the corresponding Item object respectively. Electing not to have these fields filled out means the harvest
operation executes considerable faster.
In case it is required, Harvest also offers a method for creating a single HarvestedItemInfo object, which
might make things easier for the caller.
沒有留言:
張貼留言