Package org.dspace.harvest.service
Interface HarvestedCollectionService
- All Known Implementing Classes:
HarvestedCollectionServiceImpl
public interface HarvestedCollectionService
Service interface class for the HarvestedCollection object.
The implementation of this class is responsible for all business logic calls for the HarvestedCollection object
and is autowired by spring
- Author:
- kevinvandevelde at atmire.com
-
Method Summary
Modifier and TypeMethodDescriptioncreate(Context context, Collection collection) Create a new harvest instance row for a specified collection.voiddelete(Context context, HarvestedCollection harvestedCollection) booleanfind(Context context, Collection collection) Find the harvest settings corresponding to this collectionFind all collections that are set up for harvestingfindByStatus(Context context, int status) Find all collections with the specified status flag.findNewestHarvest(Context context) Find the collection that was harvested most recently.findOldestHarvest(Context context) Find the collection that was harvested the longest time ago.Find all collections that are ready for harvestingbooleanisHarvestable(Context context, Collection collection) Returns whether the specified collection is harvestable, i.e. whether its harvesting options are set up correctly.booleanisHarvestable(HarvestedCollection harvestedCollection) Returns whether this harvest instance is actually harvestable, i.e. whether its settings options are set up correctly.booleanisReady(Context context, Collection collection) Returns whether the specified collection is ready for immediate harvest.booleanisReady(HarvestedCollection harvestedCollection) Returns whether the specified collection is ready for immediate harvest.voidupdate(Context context, HarvestedCollection harvestedCollection) verifyOAIharvester(String oaiSource, String oaiSetId, String metaPrefix, boolean testORE) Test the given harvest settings
-
Method Details
-
find
Find the harvest settings corresponding to this collection- Parameters:
context- The relevant DSpace Context.collection- target collection- Returns:
- a HarvestInstance object corresponding to this collection's settings, null if not found.
- Throws:
SQLException- if database error
-
create
Create a new harvest instance row for a specified collection.- Parameters:
context- The relevant DSpace Context.collection- target collection- Returns:
- a new HarvestInstance object
- Throws:
SQLException- if database error
-
isHarvestable
Returns whether the specified collection is harvestable, i.e. whether its harvesting options are set up correctly. This is distinct from "ready", since this collection may be in process of being harvested.- Parameters:
context- The relevant DSpace Context.collection- target collection- Returns:
- is collection harvestable?
- Throws:
SQLException- if database error
-
isHarvestable
Returns whether this harvest instance is actually harvestable, i.e. whether its settings options are set up correctly. This is distinct from "ready", since this collection may be in process of being harvested.- Parameters:
harvestedCollection- collection to be harvested- Returns:
- is collection harvestable?
- Throws:
SQLException- if database error
-
isReady
Returns whether the specified collection is ready for immediate harvest.- Parameters:
context- The relevant DSpace Context.collection- collection to be harvested- Returns:
- is collection ready for immediate harvest?
- Throws:
SQLException- if database error
-
isReady
Returns whether the specified collection is ready for immediate harvest.- Parameters:
harvestedCollection- collection to be harvested- Returns:
- is collection ready for immediate harvest?
- Throws:
SQLException- if database error
-
findAll
Find all collections that are set up for harvesting- Parameters:
context- The relevant DSpace Context.- Returns:
- list of collection id's
- Throws:
SQLException- if database error
-
findReady
Find all collections that are ready for harvesting- Parameters:
context- The relevant DSpace Context.- Returns:
- list of collection id's
- Throws:
SQLException- if database error
-
findByStatus
Find all collections with the specified status flag.- Parameters:
context- The relevant DSpace Context.status- see HarvestInstance.STATUS_...- Returns:
- all collections with the specified status flag
- Throws:
SQLException- if database error
-
findOldestHarvest
Find the collection that was harvested the longest time ago.- Parameters:
context- The relevant DSpace Context.- Returns:
- collection that was harvested the longest time ago
- Throws:
SQLException- if database error
-
findNewestHarvest
Find the collection that was harvested most recently.- Parameters:
context- The relevant DSpace Context.- Returns:
- collection that was harvested most recently
- Throws:
SQLException- if database error
-
delete
- Throws:
SQLException
-
update
- Throws:
SQLException
-
exists
- Throws:
SQLException
-
verifyOAIharvester
List<String> verifyOAIharvester(String oaiSource, String oaiSetId, String metaPrefix, boolean testORE) Test the given harvest settings- Parameters:
oaiSource- the address of the OAI-PMH provideroaiSetId- OAI set identifiermetaPrefix- OAI metadataPrefixtestORE- whether the method should also check the PMH provider for ORE support- Returns:
- list of errors encountered during verification. An empty list indicates a "success" condition.
-