dk.netarkivet.harvester.datamodel
Class DomainHistory

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

public class DomainHistory
extends java.lang.Object

Container for the historical information available for a domain.


Constructor Summary
DomainHistory()
          Create new DomainHistory instance.
 
Method Summary
 void addHarvestInfo(HarvestInfo hi)
          Add new harvestinformation to the domainHistory.
 java.util.Iterator<HarvestInfo> getHarvestInfo()
          Get all harvest information domain history.
 HarvestInfo getMostRecentHarvestInfo(java.lang.String cfgName)
          Gets the most recent harvestinfo for a specific DomainConfiguration.
 HarvestInfo getSpecifiedHarvestInfo(java.lang.Long oid, java.lang.String cfgName)
          Gets the newest harvestinfo for a specific HarvestDefinition and DomainConfiguration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomainHistory

public DomainHistory()
Create new DomainHistory instance.

Method Detail

getHarvestInfo

public java.util.Iterator<HarvestInfo> getHarvestInfo()
Get all harvest information domain history.

Returns:
Iterator of harvest information registered for this domain. The information is sorted by date with the most recent information as the first entry.

getMostRecentHarvestInfo

public HarvestInfo getMostRecentHarvestInfo(java.lang.String cfgName)
Gets the most recent harvestinfo for a specific DomainConfiguration.

Parameters:
cfgName - name of the configuration
Returns:
the most recent harvest info or null if no matching harvestinfo found

getSpecifiedHarvestInfo

public HarvestInfo getSpecifiedHarvestInfo(java.lang.Long oid,
                                           java.lang.String cfgName)
Gets the newest harvestinfo for a specific HarvestDefinition and DomainConfiguration.

Parameters:
oid - id of the harvest definition
cfgName - the name of the domain configuration
Returns:
the harvest info or null if no matching harvestinfo found

addHarvestInfo

public void addHarvestInfo(HarvestInfo hi)
Add new harvestinformation to the domainHistory.

Parameters:
hi - the harvest information to add