|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.harvester.datamodel.extendedfield.ExtendableEntity
dk.netarkivet.harvester.datamodel.HarvestDefinition
dk.netarkivet.harvester.datamodel.PartialHarvest
public class PartialHarvest
This class contains the specific properties and operations of harvest definitions which are not snapshot harvest definitions. I.e. this class models definitions of event and selective harvests.
Field Summary |
---|
Fields inherited from class dk.netarkivet.harvester.datamodel.HarvestDefinition |
---|
audience, channelId, comments, edition, harvestDefName, isActive, numEvents, oid, submissionDate |
Fields inherited from class dk.netarkivet.harvester.datamodel.extendedfield.ExtendableEntity |
---|
extendedFieldValues |
Constructor Summary | |
---|---|
PartialHarvest(java.util.List<DomainConfiguration> domainConfigurations,
Schedule schedule,
java.lang.String harvestDefName,
java.lang.String comments,
java.lang.String audience)
Create new instance of a PartialHavest configured according to the properties of the supplied DomainConfiguration. |
Method Summary | |
---|---|
void |
addDomainConfiguration(DomainConfiguration newConfiguration)
Add a new domainconfiguration to this PartialHarvest. |
void |
addSeeds(java.util.Set<java.lang.String> seeds,
java.lang.String templateName,
long maxBytes,
int maxObjects)
Takes a seed list and creates any necessary domains, configurations, and seedlists to enable them to be harvested with the given template and other parameters. |
void |
addSeedsFromFile(java.io.File seedsFile,
java.lang.String templateName,
long maxBytes,
int maxObjects)
This method is a duplicate of the addSeeds method but for seedsFile parameter |
java.util.Iterator<DomainConfiguration> |
getDomainConfigurations()
Returns a List of domain configurations for this harvest definition. |
java.util.Collection<DomainConfiguration> |
getDomainConfigurationsAsList()
|
long |
getMaxBytes()
Always returns no limit. |
long |
getMaxCountObjects()
Always returns no limit. |
java.util.Date |
getNextDate()
Get the next date this harvest definition should be run. |
Schedule |
getSchedule()
Returns the schedule defined for this harvest definition. |
boolean |
isSnapShot()
Returns whether this HarvestDefinition represents a snapshot harvest. |
void |
removeDomainConfiguration(SparseDomainConfiguration dcKey)
Remove domainconfiguration from this partialHarvest. |
void |
reset()
Reset the harvest definition to no harvests and next date being the first possible for the schedule. |
boolean |
runNow(java.util.Date now)
Check if this harvest definition should be run, given the time now. |
void |
setDomainConfigurations(java.util.List<DomainConfiguration> configs)
Set the list of configurations that this PartialHarvest uses. |
void |
setNextDate(java.util.Date nextDate)
Set the next date this harvest definition should be run. |
void |
setSchedule(Schedule schedule)
Set the schedule to be used for this harvestdefinition. |
Methods inherited from class dk.netarkivet.harvester.datamodel.HarvestDefinition |
---|
createFullHarvest, createPartialHarvest, equals, getActive, getAudience, getChannelId, getComments, getEdition, getExtendedFieldType, getName, getNumEvents, getOid, getSubmissionDate, hashCode, hasID, setActive, setAudience, setChannelId, setComments, setEdition, setNumEvents, setOid, setSubmissionDate, toString |
Methods inherited from class dk.netarkivet.harvester.datamodel.extendedfield.ExtendableEntity |
---|
addExtendedFieldValue, addExtendedFieldValues, getExtendedFieldValue, getExtendedFieldValues, setExtendedFieldValues, updateExtendedFieldValue |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PartialHarvest(java.util.List<DomainConfiguration> domainConfigurations, Schedule schedule, java.lang.String harvestDefName, java.lang.String comments, java.lang.String audience)
domainConfigurations
- a list of domain configurationsschedule
- the harvest definition scheduleharvestDefName
- the name of the harvest definitioncomments
- commentsaudience
- The intended audience for this harvest (could be null)Method Detail |
---|
public Schedule getSchedule()
public void setSchedule(Schedule schedule)
schedule
- A schedule for when to try harvesting.public java.util.Date getNextDate()
public void setNextDate(java.util.Date nextDate)
nextDate
- The next date the harvest definition should be run.
May be null, meaning never again.public void removeDomainConfiguration(SparseDomainConfiguration dcKey)
dcKey
- domainConfiguration keypublic void addDomainConfiguration(DomainConfiguration newConfiguration)
newConfiguration
- A new DomainConfigurationpublic java.util.Iterator<DomainConfiguration> getDomainConfigurations()
getDomainConfigurations
in class HarvestDefinition
public java.util.Collection<DomainConfiguration> getDomainConfigurationsAsList()
public void setDomainConfigurations(java.util.List<DomainConfiguration> configs)
configs
- Listpublic void reset()
public boolean runNow(java.util.Date now)
runNow
in class HarvestDefinition
now
- The current time
public boolean isSnapShot()
isSnapShot
in class HarvestDefinition
public long getMaxCountObjects()
getMaxCountObjects
in class HarvestDefinition
public long getMaxBytes()
getMaxBytes
in class HarvestDefinition
public void addSeeds(java.util.Set<java.lang.String> seeds, java.lang.String templateName, long maxBytes, int maxObjects)
seeds
- a list of the seeds to be addedtemplateName
- the name of the template to be usedmaxBytes
- Maximum number of bytes to harvest per domainmaxObjects
- Maximum number of objects to harvest per domainfor details
public void addSeedsFromFile(java.io.File seedsFile, java.lang.String templateName, long maxBytes, int maxObjects)
seedsFile
- a newline-separated File containing the seeds to be addedtemplateName
- the name of the template to be usedmaxBytes
- Maximum number of bytes to harvest per domainmaxObjects
- Maximum number of objects to harvest per domain
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |