public class HarvestedCollection
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
STATUS_BUSY |
static int |
STATUS_OAI_ERROR |
static int |
STATUS_QUEUED |
static int |
STATUS_READY |
static int |
STATUS_UNKNOWN_ERROR |
static int |
TYPE_DMD |
static int |
TYPE_DMDREF |
static int |
TYPE_FULL |
static int |
TYPE_NONE |
| Modifier and Type | Method and Description |
|---|---|
static HarvestedCollection |
create(Context c,
int collectionId)
Create a new harvest instance row for a specified collection.
|
void |
delete() |
static void |
exists(Context c) |
static HarvestedCollection |
find(Context c,
int collectionId)
Find the harvest settings corresponding to this collection
|
static java.util.List<java.lang.Integer> |
findAll(Context c)
Find all collections that are set up for harvesting
return: list of collection id's
|
static java.util.List<java.lang.Integer> |
findByStatus(Context c,
int status)
Find all collections with the specified status flag.
|
static java.lang.Integer |
findNewestHarvest(Context c)
Find the collection that was harvested most recently.
|
static java.lang.Integer |
findOldestHarvest(Context c)
Find the collection that was harvested the longest time ago.
|
static java.util.List<java.lang.Integer> |
findReady(Context c)
Find all collections that are ready for harvesting
return: list of collection id's
|
int |
getCollectionId() |
java.util.Date |
getHarvestDate() |
java.lang.String |
getHarvestMessage() |
java.lang.String |
getHarvestMetadataConfig() |
java.util.Date |
getHarvestStartTime() |
int |
getHarvestStatus() |
int |
getHarvestType() |
java.lang.String |
getOaiSetId() |
java.lang.String |
getOaiSource() |
boolean |
isHarvestable()
Returns whether this harvest instance is actually harvestable, i.e.
|
static boolean |
isHarvestable(Context c,
int collectionId)
Returns whether the specified collection is harvestable, i.e.
|
boolean |
isReady() |
static boolean |
isReady(Context c,
int collectionId)
Returns whether the specified collection is ready for immediate harvest.
|
void |
setHarvestMessage(java.lang.String message) |
void |
setHarvestMetadataConfig(java.lang.String mdConfigId) |
void |
setHarvestParams(int type,
java.lang.String oaiSource,
java.lang.String oaiSetId,
java.lang.String mdConfigId)
A function to set all harvesting-related parameters at once
|
void |
setHarvestResult(java.util.Date date,
java.lang.String message) |
void |
setHarvestStartTime(java.util.Date date) |
void |
setHarvestStatus(int status)
Sets the current status of the collection.
|
void |
setHarvestType(int type) |
void |
setOaiSetId(java.lang.String oaiSetId) |
void |
setOaiSource(java.lang.String oaiSource) |
void |
update() |
public static final int TYPE_NONE
public static final int TYPE_DMD
public static final int TYPE_DMDREF
public static final int TYPE_FULL
public static final int STATUS_READY
public static final int STATUS_BUSY
public static final int STATUS_QUEUED
public static final int STATUS_OAI_ERROR
public static final int STATUS_UNKNOWN_ERROR
public static void exists(Context c) throws java.sql.SQLException
java.sql.SQLExceptionpublic static HarvestedCollection find(Context c, int collectionId) throws java.sql.SQLException
java.sql.SQLExceptionpublic static HarvestedCollection create(Context c, int collectionId) throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean isHarvestable(Context c, int collectionId) throws java.sql.SQLException
java.sql.SQLExceptionpublic boolean isHarvestable()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean isReady(Context c, int collectionId) throws java.sql.SQLException
java.sql.SQLExceptionpublic boolean isReady()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.util.List<java.lang.Integer> findAll(Context c) throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.util.List<java.lang.Integer> findReady(Context c) throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.util.List<java.lang.Integer> findByStatus(Context c, int status) throws java.sql.SQLException
c - status - see HarvestInstance.STATUS_...java.sql.SQLExceptionpublic static java.lang.Integer findOldestHarvest(Context c) throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.Integer findNewestHarvest(Context c) throws java.sql.SQLException
java.sql.SQLExceptionpublic void setHarvestParams(int type,
java.lang.String oaiSource,
java.lang.String oaiSetId,
java.lang.String mdConfigId)
public void setHarvestType(int type)
public void setHarvestStatus(int status)
status - a HarvestInstance.STATUS_... constantpublic void setOaiSource(java.lang.String oaiSource)
public void setOaiSetId(java.lang.String oaiSetId)
public void setHarvestMetadataConfig(java.lang.String mdConfigId)
public void setHarvestResult(java.util.Date date,
java.lang.String message)
public void setHarvestMessage(java.lang.String message)
public void setHarvestStartTime(java.util.Date date)
public int getCollectionId()
public int getHarvestType()
public int getHarvestStatus()
public java.lang.String getOaiSource()
public java.lang.String getOaiSetId()
public java.lang.String getHarvestMetadataConfig()
public java.lang.String getHarvestMessage()
public java.util.Date getHarvestDate()
public java.util.Date getHarvestStartTime()
public void delete()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void update()
throws java.sql.SQLException,
java.io.IOException,
AuthorizeException
java.sql.SQLExceptionjava.io.IOExceptionAuthorizeExceptionCopyright © 2013 DuraSpace. All Rights Reserved.