public class HarvestedCollection extends 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 List<Integer> |
findAll(Context c)
Find all collections that are set up for harvesting
return: list of collection id's
|
static List<Integer> |
findByStatus(Context c,
int status)
Find all collections with the specified status flag.
|
static Integer |
findNewestHarvest(Context c)
Find the collection that was harvested most recently.
|
static Integer |
findOldestHarvest(Context c)
Find the collection that was harvested the longest time ago.
|
static List<Integer> |
findReady(Context c)
Find all collections that are ready for harvesting
return: list of collection id's
|
int |
getCollectionId() |
Date |
getHarvestDate() |
String |
getHarvestMessage() |
String |
getHarvestMetadataConfig() |
Date |
getHarvestStartTime() |
int |
getHarvestStatus() |
int |
getHarvestType() |
String |
getOaiSetId() |
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(String message) |
void |
setHarvestMetadataConfig(String mdConfigId) |
void |
setHarvestParams(int type,
String oaiSource,
String oaiSetId,
String mdConfigId)
A function to set all harvesting-related parameters at once
|
void |
setHarvestResult(Date date,
String message) |
void |
setHarvestStartTime(Date date) |
void |
setHarvestStatus(int status)
Sets the current status of the collection.
|
void |
setHarvestType(int type) |
void |
setOaiSetId(String oaiSetId) |
void |
setOaiSource(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 SQLException
SQLExceptionpublic static HarvestedCollection find(Context c, int collectionId) throws SQLException
SQLExceptionpublic static HarvestedCollection create(Context c, int collectionId) throws SQLException
SQLExceptionpublic static boolean isHarvestable(Context c, int collectionId) throws SQLException
SQLExceptionpublic boolean isHarvestable()
throws SQLException
SQLExceptionpublic static boolean isReady(Context c, int collectionId) throws SQLException
SQLExceptionpublic boolean isReady()
throws SQLException
SQLExceptionpublic static List<Integer> findAll(Context c) throws SQLException
SQLExceptionpublic static List<Integer> findReady(Context c) throws SQLException
SQLExceptionpublic static List<Integer> findByStatus(Context c, int status) throws SQLException
c - status - see HarvestInstance.STATUS_...SQLExceptionpublic static Integer findOldestHarvest(Context c) throws SQLException
SQLExceptionpublic static Integer findNewestHarvest(Context c) throws SQLException
SQLExceptionpublic void setHarvestParams(int type,
String oaiSource,
String oaiSetId,
String mdConfigId)
public void setHarvestType(int type)
public void setHarvestStatus(int status)
status - a HarvestInstance.STATUS_... constantpublic void setOaiSource(String oaiSource)
public void setOaiSetId(String oaiSetId)
public void setHarvestMetadataConfig(String mdConfigId)
public void setHarvestMessage(String message)
public void setHarvestStartTime(Date date)
public int getCollectionId()
public int getHarvestType()
public int getHarvestStatus()
public String getOaiSource()
public String getOaiSetId()
public String getHarvestMetadataConfig()
public String getHarvestMessage()
public Date getHarvestDate()
public Date getHarvestStartTime()
public void delete()
throws SQLException
SQLExceptionpublic void update()
throws SQLException,
IOException,
AuthorizeException
Copyright © 2013 DuraSpace. All Rights Reserved.