Package org.dspace.harvest
Class HarvestedCollection
- java.lang.Object
-
- org.dspace.harvest.HarvestedCollection
-
- All Implemented Interfaces:
ReloadableEntity<Integer>
@Entity public class HarvestedCollection extends Object implements ReloadableEntity<Integer>
- Author:
- Alexey Maslov
-
-
Field Summary
Fields Modifier and Type Field Description static intSTATUS_BUSYstatic intSTATUS_OAI_ERRORstatic intSTATUS_QUEUEDstatic intSTATUS_READYstatic intSTATUS_UNKNOWN_ERRORstatic intTYPE_DMDstatic intTYPE_DMDREFstatic intTYPE_FULLstatic intTYPE_NONE
-
Constructor Summary
Constructors Modifier Constructor Description protectedHarvestedCollection()Protected constructor, create object using:HarvestedCollectionService.create(Context, Collection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CollectiongetCollection()DategetHarvestDate()StringgetHarvestMessage()StringgetHarvestMetadataConfig()DategetHarvestStartTime()intgetHarvestStatus()intgetHarvestType()IntegergetID()The unique identifier of this entity instance.StringgetOaiSetId()StringgetOaiSource()voidsetHarvestMessage(String message)voidsetHarvestMetadataConfig(String mdConfigId)voidsetHarvestParams(int type, String oaiSource, String oaiSetId, String mdConfigId)A function to set all harvesting-related parameters at oncevoidsetHarvestStartTime(Date date)voidsetHarvestStatus(int status)Sets the current status of the collection.voidsetHarvestType(int type)voidsetLastHarvested(Date lastHarvested)voidsetOaiSetId(String oaiSetId)Sets the OAI set to harvest.voidsetOaiSource(String oaiSource)Sets the base URL of the OAI-PMH server.
-
-
-
Field Detail
-
TYPE_NONE
public static final int TYPE_NONE
- See Also:
- Constant Field Values
-
TYPE_DMD
public static final int TYPE_DMD
- See Also:
- Constant Field Values
-
TYPE_DMDREF
public static final int TYPE_DMDREF
- See Also:
- Constant Field Values
-
TYPE_FULL
public static final int TYPE_FULL
- See Also:
- Constant Field Values
-
STATUS_READY
public static final int STATUS_READY
- See Also:
- Constant Field Values
-
STATUS_BUSY
public static final int STATUS_BUSY
- See Also:
- Constant Field Values
-
STATUS_QUEUED
public static final int STATUS_QUEUED
- See Also:
- Constant Field Values
-
STATUS_OAI_ERROR
public static final int STATUS_OAI_ERROR
- See Also:
- Constant Field Values
-
STATUS_UNKNOWN_ERROR
public static final int STATUS_UNKNOWN_ERROR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HarvestedCollection
protected HarvestedCollection()
Protected constructor, create object using:HarvestedCollectionService.create(Context, Collection)
-
-
Method Detail
-
getID
public Integer getID()
Description copied from interface:ReloadableEntityThe unique identifier of this entity instance.- Specified by:
getIDin interfaceReloadableEntity<Integer>- Returns:
- the value of the primary key for this instance.
-
setHarvestParams
public void setHarvestParams(int type, String oaiSource, String oaiSetId, String mdConfigId)A function to set all harvesting-related parameters at once- Parameters:
type- harvest type (TYPE_NONE, TYPE_DMD, TYPE_DMDREF, TYPE_FULL)oaiSource- base URL of the OAI-PMH serveroaiSetId- OAI set identifiermdConfigId- harvest metadata config ID
-
setHarvestType
public void setHarvestType(int type)
-
setHarvestStatus
public void setHarvestStatus(int status)
Sets the current status of the collection.- Parameters:
status- a HarvestInstance.STATUS_... constant (STATUS_READY, STATUS_BUSY, STATUS_QUEUED, STATUS_OAI_ERROR, STATUS_UNKNOWN_ERROR)
-
setOaiSource
public void setOaiSource(String oaiSource)
Sets the base URL of the OAI-PMH server.- Parameters:
oaiSource- base URL of the OAI-PMH server
-
setOaiSetId
public void setOaiSetId(String oaiSetId)
Sets the OAI set to harvest.- Parameters:
oaiSetId- OAI set to harvest
-
setHarvestMetadataConfig
public void setHarvestMetadataConfig(String mdConfigId)
-
setLastHarvested
public void setLastHarvested(Date lastHarvested)
-
setHarvestMessage
public void setHarvestMessage(String message)
-
setHarvestStartTime
public void setHarvestStartTime(Date date)
-
getCollection
public Collection getCollection()
-
getHarvestType
public int getHarvestType()
-
getHarvestStatus
public int getHarvestStatus()
-
getOaiSource
public String getOaiSource()
-
getOaiSetId
public String getOaiSetId()
-
getHarvestMetadataConfig
public String getHarvestMetadataConfig()
-
getHarvestMessage
public String getHarvestMessage()
-
getHarvestDate
public Date getHarvestDate()
-
getHarvestStartTime
public Date getHarvestStartTime()
-
-