Class SparseFullHarvest
- java.lang.Object
-
- dk.netarkivet.harvester.datamodel.extendedfield.ExtendableEntity
-
- dk.netarkivet.harvester.datamodel.SparseFullHarvest
-
public class SparseFullHarvest extends ExtendableEntity
Sparse version of FullHarvest to be used for GUI purposes only. Immutable. For GUI purposes only.- See Also:
FullHarvest
-
-
Field Summary
-
Fields inherited from class dk.netarkivet.harvester.datamodel.extendedfield.ExtendableEntity
extendedFieldValues
-
-
Constructor Summary
Constructors Constructor Description SparseFullHarvest(Long oid, String harvestDefName, String comments, int numEvents, boolean active, long edition, long maxCountObjects, long maxBytes, long maxJobRunningTime, Long previousFullHarvest, Long channelId)
Create new instance of SparseFullHarvest.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<EAV.AttributeAndType>
getAttributesAndTypes()
Get full harvest EAV attributes and attribute types.protected Long
getChannelId()
String
getComments()
Comments for harvest definition.long
getEdition()
DAO edition of harvest definition.protected int
getExtendedFieldType()
abstract method for receiving the ExtendedFieldType for concret class which inherits ExtendableEntitylong
getMaxBytes()
Get the maximum number of bytes that this fullharvest will harvest per domain, -1 for no limit.long
getMaxCountObjects()
Get the maximum number of objects that this fullharvest will harvest per domain, -1 for no limit.long
getMaxJobRunningTime()
Get the maximum number of time in seconds that each job in this fullharvest will take.String
getName()
Name of harvest definition.int
getNumEvents()
Number of times this harvest has run.Long
getOid()
ID of this harvest.Long
getPreviousHarvestDefinitionOid()
Get ID of HarvestDefinition which this is based on, or null for none.boolean
isActive()
Whether harvest is active.void
setAttributesAndTypes(List<EAV.AttributeAndType> attributesAndTypes)
Set full harvest EAV attributes and attribute types.-
Methods inherited from class dk.netarkivet.harvester.datamodel.extendedfield.ExtendableEntity
addExtendedFieldValue, addExtendedFieldValues, getExtendedFieldValue, getExtendedFieldValues, setExtendedFieldValues, updateExtendedFieldValue
-
-
-
-
Constructor Detail
-
SparseFullHarvest
public SparseFullHarvest(Long oid, String harvestDefName, String comments, int numEvents, boolean active, long edition, long maxCountObjects, long maxBytes, long maxJobRunningTime, Long previousFullHarvest, Long channelId)
Create new instance of SparseFullHarvest.- Parameters:
oid
- id of this harvest.harvestDefName
- the name of the harvest definition.comments
- comments.numEvents
- Number of times this harvest has run.active
- Whether this harvest definition is active.edition
- DAO edition of harvest.maxCountObjects
- Limit for how many objects can be harvestedmaxBytes
- Limit for how many bytes can be harvestedmaxJobRunningTime
- Limit on how much time can be used for this job. SeegetMaxJobRunningTime()
previousFullHarvest
- This id of the harvestDefinition used to create this Fullharvest definition. May be null for nonechannelId
- the channel id, or null for the default one- Throws:
ArgumentNotValid
- if oid, name or comments is null, or name is empty.
-
-
Method Detail
-
getPreviousHarvestDefinitionOid
public Long getPreviousHarvestDefinitionOid()
Get ID of HarvestDefinition which this is based on, or null for none.- Returns:
- The previous HarvestDefinition, or null for none
-
getMaxCountObjects
public long getMaxCountObjects()
Get the maximum number of objects that this fullharvest will harvest per domain, -1 for no limit.- Returns:
- Total download limit in objects per domain.
-
getMaxBytes
public long getMaxBytes()
Get the maximum number of bytes that this fullharvest will harvest per domain, -1 for no limit.- Returns:
- Total download limit in bytes per domain.
-
getMaxJobRunningTime
public long getMaxJobRunningTime()
Get the maximum number of time in seconds that each job in this fullharvest will take. 0 for no limit.- Returns:
- the maximum number of time in seconds for each job in this fullharvest.
-
getName
public String getName()
Name of harvest definition.- Returns:
- Name of harvest definition.
-
getComments
public String getComments()
Comments for harvest definition.- Returns:
- Comments for harvest definition.
-
getNumEvents
public int getNumEvents()
Number of times this harvest has run.- Returns:
- Number of times this harvest has run.
-
getOid
public Long getOid()
ID of this harvest.- Returns:
- ID of this harvest.
-
isActive
public boolean isActive()
Whether harvest is active.- Returns:
- Whether harvest is active.
-
getEdition
public long getEdition()
DAO edition of harvest definition.- Returns:
- DAO edition of harvest definition.
-
getChannelId
protected Long getChannelId()
-
getAttributesAndTypes
public List<EAV.AttributeAndType> getAttributesAndTypes()
Get full harvest EAV attributes and attribute types.- Returns:
- full harvest EAV attributes and attribute types
-
setAttributesAndTypes
public void setAttributesAndTypes(List<EAV.AttributeAndType> attributesAndTypes)
Set full harvest EAV attributes and attribute types.- Parameters:
attributesAndTypes
- full harvest EAV attributes and attribute types
-
getExtendedFieldType
protected int getExtendedFieldType()
Description copied from class:ExtendableEntity
abstract method for receiving the ExtendedFieldType for concret class which inherits ExtendableEntity- Specified by:
getExtendedFieldType
in classExtendableEntity
- Returns:
- ExtendedFieldType
-
-