dk.netarkivet.harvester.datamodel
Class HarvestInfo

java.lang.Object
  extended by dk.netarkivet.harvester.datamodel.HarvestInfo

public class HarvestInfo
extends java.lang.Object

Summary information about a specific harvest of a domain. This class is immutable.


Constructor Summary
HarvestInfo(java.lang.Long harvestID, java.lang.Long jobID, java.lang.String domainName, java.lang.String domainCfgName, java.util.Date date, long sizeDataRetrieved, long countObjectRetrieved, StopReason stopReason)
          Create new harvest info instance.
HarvestInfo(java.lang.Long harvestID, java.lang.String domainName, java.lang.String domainCfgName, java.util.Date date, long sizeDataRetrieved, long countObjectRetrieved, StopReason stopReason)
          Create new harvest info instance.
 
Method Summary
 boolean equals(java.lang.Object o)
          Autogenerated from IDEA.
 long getCountObjectRetrieved()
          Get the total number of objects downloaded.
 java.util.Date getDate()
          Get the date this harvest information was recorded.
 java.lang.String getDomainConfigurationName()
          Get the domain configuration name of the harvest.
 java.lang.String getDomainName()
          Get the domain name of the harvest.
 java.lang.Long getHarvestID()
          Get the id of the harvest.
(package private)  long getID()
          Get the ID of this harvestinfo.
 java.lang.Long getJobID()
          Get the id of the job, if available.
 long getSizeDataRetrieved()
          Get the total amount of data downloaded (bytes).
 StopReason getStopReason()
          Get the reason the harvest stopped.
 int hashCode()
          Autogenerated from IDEA.
(package private)  boolean hasID()
          Check if this harvestinfo has an ID set yet (doesn't happen until the DBDAO persists it).
(package private)  void setID(long id)
          Set the ID of this harvestinfo.
 java.lang.String toString()
          A human readable representation.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HarvestInfo

public HarvestInfo(java.lang.Long harvestID,
                   java.lang.String domainName,
                   java.lang.String domainCfgName,
                   java.util.Date date,
                   long sizeDataRetrieved,
                   long countObjectRetrieved,
                   StopReason stopReason)
Create new harvest info instance.

Parameters:
harvestID - The id of the harvest
domainName - The name of the Domain
domainCfgName - The name of the Domain configuration
date - The date of the harvest
sizeDataRetrieved - The number of bytes retrieved for this Domain
countObjectRetrieved - The number of objects retrieved for this Domain
stopReason - The reason why the current harvest terminated

HarvestInfo

public HarvestInfo(java.lang.Long harvestID,
                   java.lang.Long jobID,
                   java.lang.String domainName,
                   java.lang.String domainCfgName,
                   java.util.Date date,
                   long sizeDataRetrieved,
                   long countObjectRetrieved,
                   StopReason stopReason)
Create new harvest info instance.

Parameters:
harvestID - The id of the harvest
jobID - The id of the job, if available
domainName - The name of the Domain
domainCfgName - The name of the Domain configuration
date - The date of the harvest
sizeDataRetrieved - The number of bytes retrieved for this Domain
countObjectRetrieved - The number of objects retrieved for this Domain
stopReason - The reason why the current harvest terminated
Method Detail

getSizeDataRetrieved

public long getSizeDataRetrieved()
Get the total amount of data downloaded (bytes).

Returns:
the total amount of data downloaded (bytes)

getCountObjectRetrieved

public long getCountObjectRetrieved()
Get the total number of objects downloaded.

Returns:
the total number of objects downloaded

getStopReason

public StopReason getStopReason()
Get the reason the harvest stopped.

Returns:
the reason the harvest stopped

getDate

public java.util.Date getDate()
Get the date this harvest information was recorded.

Returns:
the date the harvest information was recorded

getHarvestID

public java.lang.Long getHarvestID()
Get the id of the harvest.

Returns:
the harvest ID

getJobID

public java.lang.Long getJobID()
Get the id of the job, if available.

Returns:
the job ID or null.

getDomainName

public java.lang.String getDomainName()
Get the domain name of the harvest.

Returns:
the domain name

getDomainConfigurationName

public java.lang.String getDomainConfigurationName()
Get the domain configuration name of the harvest.

Returns:
the domain configuration name

getID

long getID()
Get the ID of this harvestinfo. Only for use by DBDAO.

Returns:
the ID of this harvestinfo

setID

void setID(long id)
Set the ID of this harvestinfo. Only for use by DBDAO

Parameters:
id - the new ID of this harvestinfo

hasID

boolean hasID()
Check if this harvestinfo has an ID set yet (doesn't happen until the DBDAO persists it).

Returns:
true, if this harvestinfo has an ID set

equals

public boolean equals(java.lang.Object o)
Autogenerated from IDEA.

Overrides:
equals in class java.lang.Object
Returns:
true if object fields are equal
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Autogenerated from IDEA.

Overrides:
hashCode in class java.lang.Object
Returns:
hashcode
See Also:
Object.hashCode()

toString

public java.lang.String toString()
A human readable representation.

Overrides:
toString in class java.lang.Object
Returns:
A human readable representation