Class DomainHistory
- java.lang.Object
-
- dk.netarkivet.harvester.datamodel.DomainHistory
-
public class DomainHistory extends java.lang.Object
Container for the historical information available for a domain.
-
-
Constructor Summary
Constructors Constructor Description DomainHistory()
Create new DomainHistory instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHarvestInfo(HarvestInfo hi)
Add new harvestinformation to the domainHistory.static HarvestInfo
getBestHarvestInfoExpectation(java.lang.String configName, DomainHistory history)
Return the most recent harvestresult for the configuration identified by name that was a complete harvest of the domain.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.
-
-
-
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 definitioncfgName
- 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
-
getBestHarvestInfoExpectation
public static HarvestInfo getBestHarvestInfoExpectation(java.lang.String configName, DomainHistory history)
Return the most recent harvestresult for the configuration identified by name that was a complete harvest of the domain.- Parameters:
configName
- The name of the configurationhistory
- The domainHistory for a domain- Returns:
- the most recent harvestresult for the configuration identified by name that was a complete harvest of the domain.
-
-