Class ScheduledHarvest
java.lang.Object
org.dlese.dpc.oai.harvester.structs.ScheduledHarvest
- All Implemented Interfaces:
Serializable,Comparable
Data structure that holds the info needed to configure a regular-occuring harvest of a particular
repository.
- Version:
- $Id: ScheduledHarvest.java,v 1.20.2.1 2012/09/28 23:53:50 jweather Exp $
- Author:
- John Weatherley
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for the ScheduledHarvest objectScheduledHarvest(String repositoryName, String setSpec, String baseURL, String metadataPrefix, String harvestingInterval, String intervalGranularity, String runAtTime, String enabledDisabled, File harvestDir, boolean spl, boolean isZip, boolean def, boolean doZip, String dupAllow) Constructor for the ScheduledHarvest object -
Method Summary
Modifier and TypeMethodDescriptionintCompare for sorting purposesbooleanChecks equality of two ScheduledHarvest objects.Gets the allowDupDir attribute of the ScheduledHarvest objectGets the backupOne attribute of the ScheduledHarvest objectGets the backupThree attribute of the ScheduledHarvest objectGets the backupTwo attribute of the ScheduledHarvest objectGets the baseURL attribute of the ScheduledHarvest objectstatic StringReturn a string for the current time and date, sutiable for display in log files and output to standout:booleanGets the defaultDir attribute of the ScheduledHarvest objectbooleanDetermine if the harvested files should be zippedGets the enabledDisabled attribute of the ScheduledHarvest objectbooleanGets the harvestAll attribute of the ScheduledHarvest objectGets the harvestDir attribute of the ScheduledHarvest objectGets the harvestingInterval attribute of the ScheduledHarvest objectGets the intervalGranularity attribute of the ScheduledHarvest objectGets the intervalGranularityLabel attribute of the ScheduledHarvest objectbooleanGets the isZipPresent attribute of the ScheduledHarvest objectGets the lastHarvestTime attribute of the ScheduledHarvest objectGets the metadataPrefix attribute of the ScheduledHarvest objectintGets the numHarvestedLast attribute of the ScheduledHarvest objectGets the repositoryName attribute of the ScheduledHarvest objectRepositoryName with quotes escaped for use in JavaScript literals.Gets the time of day to begin the regular harvests in 24 hour time, for example 23:15.Gets the time of day this scheduled harvest is set to run, for display, for example 1:00 PM.Gets the setSpec attribute of the ScheduledHarvest objectGets the setSpecHtml attribute of the ScheduledHarvest objectbooleanGets the splitBySet attribute of the ScheduledHarvest objectgetUid()Gets the uid attribute of the ScheduledHarvest objectbooleangetWarnR()Gets the warnR attribute of the ScheduledHarvest objectGets the zipLatest attribute of the ScheduledHarvest objectvoidSets the allowDupDir attribute of the ScheduledHarvest objectvoidsetBackupOne(String bOne) Sets the backupOne attribute of the ScheduledHarvest objectvoidsetBackupThree(String bThree) Sets the backupThree attribute of the ScheduledHarvest objectvoidsetBackupTwo(String bTwo) Sets the backupTwo attribute of the ScheduledHarvest objectvoidsetBaseURL(String val) Sets the baseURL attribute of the ScheduledHarvest objectstatic voidsetDebug(boolean db) Sets the debug attribute objectvoidsetDefaultDir(boolean def) Sets the defaultDir attribute of the ScheduledHarvest objectvoidsetEnabledDisabled(String val) Sets the enabledDisabled attribute of the ScheduledHarvest objectvoidsetHarvestAll(boolean h) Sets the harvestAll attribute of the ScheduledHarvest objectvoidsetHarvestDir(File hd) Sets the harvestDir attribute of the ScheduledHarvest objectvoidSets the harvestingInterval attribute of the ScheduledHarvest objectvoidSets the intervalGranularity attribute of the ScheduledHarvest objectvoidsetIsZipPresent(boolean isZip) Sets the isZipPresent attribute of the ScheduledHarvest objectvoidsetLastHarvestTime(Date val) Sets the lastHarvestTime attribute of the ScheduledHarvest objectvoidsetMetadataPrefix(String val) Sets the metadataPrefix attribute of the ScheduledHarvest objectvoidsetNumHarvestedLast(int n) Sets the numHarvestedLast attribute of the ScheduledHarvest objectvoidsetRepositoryName(String val) Sets the repositoryName attribute of the ScheduledHarvest objectvoidsetRunAtTime(String runAtTime) Sets the time of day to begin the regular harvests, in 24 hour time for example 23:15.voidsetSetSpec(String val) Sets the setSpec attribute of the ScheduledHarvest objectvoidsetSplitBySet(boolean spl) Sets the splitBySet attribute of the ScheduledHarvest objectvoidSets the uid attribute of the ScheduledHarvest objectvoidsetWarnR(boolean w) Sets the warnR attribute of the ScheduledHarvest objectvoidSets the zipLatest attribute of the ScheduledHarvest objecttoString()Provides a String representataion for this ScheduledHarvest.
-
Constructor Details
-
ScheduledHarvest
public ScheduledHarvest()Constructor for the ScheduledHarvest object -
ScheduledHarvest
public ScheduledHarvest(String repositoryName, String setSpec, String baseURL, String metadataPrefix, String harvestingInterval, String intervalGranularity, String runAtTime, String enabledDisabled, File harvestDir, boolean spl, boolean isZip, boolean def, boolean doZip, String dupAllow) Constructor for the ScheduledHarvest object- Parameters:
repositoryName- Name of the repository.setSpec- setSpec to be harvested, or null for none.baseURL- BaseURL.metadataPrefix- MetadataPrefix.harvestingInterval- Interval for harvesting.intervalGranularity- Interval granularity.runAtTime- The time of day to begin the harvest in 24 hour time for example 23:15, or null to schedule immediatelyenabledDisabled- One of exactly enabled or disabled.harvestDir- Description of the Parameterspl- Description of the ParameterisZip- Description of the Parameterdef- Description of the ParameterdoZip- True to zip the resulting harvestdupAllow- Description of the Parameter
-
-
Method Details
-
getUid
Gets the uid attribute of the ScheduledHarvest object- Returns:
- The uid value
-
getWarnR
public boolean getWarnR()Gets the warnR attribute of the ScheduledHarvest object- Returns:
- The warnR value
-
getAllowDupDir
Gets the allowDupDir attribute of the ScheduledHarvest object- Returns:
- The allowDupDir value
-
getDefaultDir
public boolean getDefaultDir()Gets the defaultDir attribute of the ScheduledHarvest object- Returns:
- The defaultDir value
-
getNumHarvestedLast
public int getNumHarvestedLast()Gets the numHarvestedLast attribute of the ScheduledHarvest object- Returns:
- The numHarvestedLast value
-
getBackupOne
Gets the backupOne attribute of the ScheduledHarvest object- Returns:
- The backupOne value
-
getZipLatest
Gets the zipLatest attribute of the ScheduledHarvest object- Returns:
- The zipLatest value
-
getBackupTwo
Gets the backupTwo attribute of the ScheduledHarvest object- Returns:
- The backupTwo value
-
getBackupThree
Gets the backupThree attribute of the ScheduledHarvest object- Returns:
- The backupThree value
-
getIsZipPresent
public boolean getIsZipPresent()Gets the isZipPresent attribute of the ScheduledHarvest object- Returns:
- The isZipPresent value
-
getRepositoryName
Gets the repositoryName attribute of the ScheduledHarvest object- Returns:
- The repositoryName value
-
getRepositoryNameEscaped
RepositoryName with quotes escaped for use in JavaScript literals.- Returns:
- The repositoryNameEscaped value
-
getHarvestDir
Gets the harvestDir attribute of the ScheduledHarvest object- Returns:
- The harvestDir value
-
getSplitBySet
public boolean getSplitBySet()Gets the splitBySet attribute of the ScheduledHarvest object- Returns:
- The splitBySet value
-
getBaseURL
Gets the baseURL attribute of the ScheduledHarvest object- Returns:
- The baseURL value
-
getDoZipResult
public boolean getDoZipResult()Determine if the harvested files should be zipped- Returns:
- True if the harvested files should be zipped
-
getSetSpec
Gets the setSpec attribute of the ScheduledHarvest object- Returns:
- The setSpec value
-
getSetSpecHtml
Gets the setSpecHtml attribute of the ScheduledHarvest object- Returns:
- The setSpecHtml value
-
getMetadataPrefix
Gets the metadataPrefix attribute of the ScheduledHarvest object- Returns:
- The metadataPrefix value
-
getHarvestingInterval
Gets the harvestingInterval attribute of the ScheduledHarvest object- Returns:
- The harvestingInterval value
-
getIntervalGranularity
Gets the intervalGranularity attribute of the ScheduledHarvest object- Returns:
- The intervalGranularity value
-
getIntervalGranularityLabel
Gets the intervalGranularityLabel attribute of the ScheduledHarvest object- Returns:
- The intervalGranularityLabel value
-
getEnabledDisabled
Gets the enabledDisabled attribute of the ScheduledHarvest object- Returns:
- The enabledDisabled value
-
getLastHarvestTime
Gets the lastHarvestTime attribute of the ScheduledHarvest object- Returns:
- The lastHarvestTime value
-
getHarvestAll
public boolean getHarvestAll()Gets the harvestAll attribute of the ScheduledHarvest object- Returns:
- The harvestAll value
-
getRunAtTimeDisplay
Gets the time of day this scheduled harvest is set to run, for display, for example 1:00 PM.- Returns:
- The time for display, or null if not set
-
getRunAtTime
Gets the time of day to begin the regular harvests in 24 hour time, for example 23:15.- Returns:
- The hour and minute in 24 hour time, for example 23:15, or null to schedule immediately
-
setRunAtTime
Sets the time of day to begin the regular harvests, in 24 hour time for example 23:15.- Parameters:
runAtTime- The hour and minute in 24 hour time, for example 23:15
-
setHarvestAll
public void setHarvestAll(boolean h) Sets the harvestAll attribute of the ScheduledHarvest object- Parameters:
h- The new harvestAll value
-
setAllowDupDir
Sets the allowDupDir attribute of the ScheduledHarvest object- Parameters:
v- The new allowDupDir value
-
setNumHarvestedLast
public void setNumHarvestedLast(int n) Sets the numHarvestedLast attribute of the ScheduledHarvest object- Parameters:
n- The new numHarvestedLast value
-
setUid
Sets the uid attribute of the ScheduledHarvest object- Parameters:
val- The new uid value
-
setDefaultDir
public void setDefaultDir(boolean def) Sets the defaultDir attribute of the ScheduledHarvest object- Parameters:
def- The new defaultDir value
-
setBackupOne
Sets the backupOne attribute of the ScheduledHarvest object- Parameters:
bOne- The new backupOne value
-
setZipLatest
Sets the zipLatest attribute of the ScheduledHarvest object- Parameters:
z- The new zipLatest value
-
setBackupTwo
Sets the backupTwo attribute of the ScheduledHarvest object- Parameters:
bTwo- The new backupTwo value
-
setBackupThree
Sets the backupThree attribute of the ScheduledHarvest object- Parameters:
bThree- The new backupThree value
-
setIsZipPresent
public void setIsZipPresent(boolean isZip) Sets the isZipPresent attribute of the ScheduledHarvest object- Parameters:
isZip- The new isZipPresent value
-
setWarnR
public void setWarnR(boolean w) Sets the warnR attribute of the ScheduledHarvest object- Parameters:
w- The new warnR value
-
setHarvestDir
Sets the harvestDir attribute of the ScheduledHarvest object- Parameters:
hd- The new harvestDir value
-
setSplitBySet
public void setSplitBySet(boolean spl) Sets the splitBySet attribute of the ScheduledHarvest object- Parameters:
spl- The new splitBySet value
-
setRepositoryName
Sets the repositoryName attribute of the ScheduledHarvest object- Parameters:
val- The new repositoryName value
-
setBaseURL
Sets the baseURL attribute of the ScheduledHarvest object- Parameters:
val- The new baseURL value
-
setSetSpec
Sets the setSpec attribute of the ScheduledHarvest object- Parameters:
val- The new setSpec value
-
setMetadataPrefix
Sets the metadataPrefix attribute of the ScheduledHarvest object- Parameters:
val- The new metadataPrefix value
-
setHarvestingInterval
Sets the harvestingInterval attribute of the ScheduledHarvest object- Parameters:
val- The new harvestingInterval value
-
setIntervalGranularity
Sets the intervalGranularity attribute of the ScheduledHarvest object- Parameters:
val- The new intervalGranularity value
-
setEnabledDisabled
Sets the enabledDisabled attribute of the ScheduledHarvest object- Parameters:
val- The new enabledDisabled value
-
setLastHarvestTime
Sets the lastHarvestTime attribute of the ScheduledHarvest object- Parameters:
val- The new lastHarvestTime value
-
toString
Provides a String representataion for this ScheduledHarvest. This method may be used for debugging to see what is in the ScheduledHarvest. This method is also used it theequals(Object)method. -
equals
Checks equality of two ScheduledHarvest objects. -
compareTo
Compare for sorting purposes- Specified by:
compareToin interfaceComparable- Parameters:
o- The object to compare to.- Returns:
- -1, 0 or 1.
-
getDateStamp
Return a string for the current time and date, sutiable for display in log files and output to standout:- Returns:
- The dateStamp value
-
setDebug
public static void setDebug(boolean db) Sets the debug attribute object- Parameters:
db- The new debug value
-