public class PersistentJobData extends Object implements JobInfo
Modifier and Type | Class and Description |
---|---|
protected static class |
PersistentJobData.XmlState
Helper class for returning the OK-state back to the caller.
|
Constructor and Description |
---|
PersistentJobData(File crawlDir)
Constructor for class PersistentJobData.
|
Modifier and Type | Method and Description |
---|---|
boolean |
exists()
Returns true, if harvestInfo exists in crawDir, otherwise false.
|
static boolean |
existsIn(File crawlDir)
Returns true if the given directory exists and contains a harvestInfo file.
|
String |
getAudience()
Return the audience information in this xml.
|
String |
getChannel()
Return the job's harvest channel name.
|
String |
getHarvestFilenamePrefix()
If not set in persistentJobData, fall back to the standard way.
|
String |
getharvestName()
Return the harvestname in this xml.
|
int |
getJobHarvestNum()
Return the job harvestNum.
|
Long |
getJobID()
Return the harvestInfo jobID.
|
String |
getJobSubmitDate()
Return the submit date of the job in this xml.
|
long |
getMaxBytesPerDomain()
Return the job maxBytesPerDomain value.
|
long |
getMaxObjectsPerDomain()
Return the job maxObjectsPerDomain value.
|
String |
getOrderXMLName()
Return the job orderXMLName.
|
Long |
getOrigHarvestDefinitionID()
Return the job origHarvestDefinitionID.
|
String |
getPerformer()
Return the performer information in this xml.
|
String |
getScheduleName()
Return the schedulename in this xml.
|
String |
getVersion()
Return the version of the xml.
|
void |
write(Job harvestJob,
HarvestDefinitionInfo hdi)
Write information about given Job to XML-structure.
|
public PersistentJobData(File crawlDir)
crawlDir
- The directory where the harvestInfo can be foundArgumentNotValid
- if crawlDir is null or does not exist.public boolean exists()
public static boolean existsIn(File crawlDir)
crawlDir
- A directory that may contain harvestInfo file.public void write(Job harvestJob, HarvestDefinitionInfo hdi)
harvestJob
- the given Jobhdi
- Information about the harvestJob.IOFailure
- if any failure occurs while persisting data, or if the file has already been written.public String getChannel()
IOFailure
- if no harvestInfo exists or it is invalid.public int getJobHarvestNum()
IOFailure
- if no harvestInfo exists or it is invalid.public Long getOrigHarvestDefinitionID()
getOrigHarvestDefinitionID
in interface JobInfo
IOFailure
- if no harvestInfo exists or it is invalid.public long getMaxBytesPerDomain()
IOFailure
- if no harvestInfo exists or it is invalid.public long getMaxObjectsPerDomain()
IOFailure
- if no harvestInfo exists or it is invalid.public String getOrderXMLName()
IOFailure
- if no harvestInfo exists or it is invalid.public String getVersion()
IOFailure
- if no harvestInfo exists or it is invalid.public String getHarvestFilenamePrefix()
getHarvestFilenamePrefix
in interface JobInfo
public String getharvestName()
IOFailure
- if no harvestInfo exists or it is invalid.public String getScheduleName()
IOFailure
- if no harvestInfo exists or it is invalid.public String getJobSubmitDate()
IOFailure
- if no harvestInfo exists or it is invalid.public String getPerformer()
IOFailure
- if no harvestInfo exists or it is invalid.public String getAudience()
IOFailure
- if no harvestInfo exists or it is invalid.Copyright © 2005–2016 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.