org.dspace.harvest
Class HarvestedItem

java.lang.Object
  extended by org.dspace.harvest.HarvestedItem

public class HarvestedItem
extends Object

Author:
Alexey Maslov

Method Summary
static HarvestedItem create(Context c, int itemId, String itemOAIid)
          Create a new harvested item row for a specified item id.
 void delete()
           
static void exists(Context c)
           
static HarvestedItem find(Context c, int item_id)
          Find the harvest parameters corresponding to the specified DSpace item
 Date getHarvestDate()
           
static Item getItemByOAIId(Context context, String itemOaiID, int collectionID)
          Retrieve a DSpace Item that corresponds to this particular combination of owning collection and OAI ID.
 String getItemID()
           
 String getOaiID()
          Get the oai_id associated with this item
 void setHarvestDate(Date date)
           
 void setOaiID(String itemOaiID)
          Set the oai_id associated with this item
 void update()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

exists

public static void exists(Context c)
                   throws SQLException
Throws:
SQLException

find

public static HarvestedItem find(Context c,
                                 int item_id)
                          throws SQLException
Find the harvest parameters corresponding to the specified DSpace item

Returns:
a HarvestedItem object corresponding to this item, null if not found.
Throws:
SQLException

getItemByOAIId

public static Item getItemByOAIId(Context context,
                                  String itemOaiID,
                                  int collectionID)
                           throws SQLException
Retrieve a DSpace Item that corresponds to this particular combination of owning collection and OAI ID.

Parameters:
context -
itemOaiID - the string used by the OAI-PMH provider to identify the item
collectionID - id of the local collection that the item should be found in
Returns:
DSpace Item or null if no item was found
Throws:
SQLException

create

public static HarvestedItem create(Context c,
                                   int itemId,
                                   String itemOAIid)
                            throws SQLException
Create a new harvested item row for a specified item id.

Returns:
a new HarvestedItem object
Throws:
SQLException

getItemID

public String getItemID()

getOaiID

public String getOaiID()
Get the oai_id associated with this item


setOaiID

public void setOaiID(String itemOaiID)
Set the oai_id associated with this item


setHarvestDate

public void setHarvestDate(Date date)

getHarvestDate

public Date getHarvestDate()

delete

public void delete()
            throws SQLException
Throws:
SQLException

update

public void update()
            throws SQLException,
                   IOException,
                   AuthorizeException
Throws:
SQLException
IOException
AuthorizeException


Copyright © 2010 DuraSpace. All Rights Reserved.