DLESE Tools
v1.6.0

org.dlese.dpc.oai.harvester.structs
Class ScheduledHarvest

java.lang.Object
  extended by org.dlese.dpc.oai.harvester.structs.ScheduledHarvest
All Implemented Interfaces:
Serializable, Comparable

public final class ScheduledHarvest
extends Object
implements 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:
Serialized Form

Constructor Summary
ScheduledHarvest()
          Constructor for the ScheduledHarvest object
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
 
Method Summary
 int compareTo(Object o)
          Compare for sorting purposes
 boolean equals(Object o)
          Checks equality of two ScheduledHarvest objects.
 String getAllowDupDir()
          Gets the allowDupDir attribute of the ScheduledHarvest object
 String getBackupOne()
          Gets the backupOne attribute of the ScheduledHarvest object
 String getBackupThree()
          Gets the backupThree attribute of the ScheduledHarvest object
 String getBackupTwo()
          Gets the backupTwo attribute of the ScheduledHarvest object
 String getBaseURL()
          Gets the baseURL attribute of the ScheduledHarvest object
static String getDateStamp()
          Return a string for the current time and date, sutiable for display in log files and output to standout:
 boolean getDefaultDir()
          Gets the defaultDir attribute of the ScheduledHarvest object
 boolean getDoZipResult()
          Determine if the harvested files should be zipped
 String getEnabledDisabled()
          Gets the enabledDisabled attribute of the ScheduledHarvest object
 boolean getHarvestAll()
          Gets the harvestAll attribute of the ScheduledHarvest object
 File getHarvestDir()
          Gets the harvestDir attribute of the ScheduledHarvest object
 String getHarvestingInterval()
          Gets the harvestingInterval attribute of the ScheduledHarvest object
 String getIntervalGranularity()
          Gets the intervalGranularity attribute of the ScheduledHarvest object
 String getIntervalGranularityLabel()
          Gets the intervalGranularityLabel attribute of the ScheduledHarvest object
 boolean getIsZipPresent()
          Gets the isZipPresent attribute of the ScheduledHarvest object
 Date getLastHarvestTime()
          Gets the lastHarvestTime attribute of the ScheduledHarvest object
 String getMetadataPrefix()
          Gets the metadataPrefix attribute of the ScheduledHarvest object
 int getNumHarvestedLast()
          Gets the numHarvestedLast attribute of the ScheduledHarvest object
 String getRepositoryName()
          Gets the repositoryName attribute of the ScheduledHarvest object
 String getRepositoryNameEscaped()
          RepositoryName with quotes escaped for use in JavaScript literals.
 String getRunAtTime()
          Gets the time of day to begin the regular harvests in 24 hour time, for example 23:15.
 String getRunAtTimeDisplay()
          Gets the time of day this scheduled harvest is set to run, for display, for example 1:00 PM.
 String getSetSpec()
          Gets the setSpec attribute of the ScheduledHarvest object
 String getSetSpecHtml()
          Gets the setSpecHtml attribute of the ScheduledHarvest object
 boolean getSplitBySet()
          Gets the splitBySet attribute of the ScheduledHarvest object
 Long getUid()
          Gets the uid attribute of the ScheduledHarvest object
 boolean getWarnR()
          Gets the warnR attribute of the ScheduledHarvest object
 String getZipLatest()
          Gets the zipLatest attribute of the ScheduledHarvest object
 void setAllowDupDir(String v)
          Sets the allowDupDir attribute of the ScheduledHarvest object
 void setBackupOne(String bOne)
          Sets the backupOne attribute of the ScheduledHarvest object
 void setBackupThree(String bThree)
          Sets the backupThree attribute of the ScheduledHarvest object
 void setBackupTwo(String bTwo)
          Sets the backupTwo attribute of the ScheduledHarvest object
 void setBaseURL(String val)
          Sets the baseURL attribute of the ScheduledHarvest object
static void setDebug(boolean db)
          Sets the debug attribute object
 void setDefaultDir(boolean def)
          Sets the defaultDir attribute of the ScheduledHarvest object
 void setEnabledDisabled(String val)
          Sets the enabledDisabled attribute of the ScheduledHarvest object
 void setHarvestAll(boolean h)
          Sets the harvestAll attribute of the ScheduledHarvest object
 void setHarvestDir(File hd)
          Sets the harvestDir attribute of the ScheduledHarvest object
 void setHarvestingInterval(String val)
          Sets the harvestingInterval attribute of the ScheduledHarvest object
 void setIntervalGranularity(String val)
          Sets the intervalGranularity attribute of the ScheduledHarvest object
 void setIsZipPresent(boolean isZip)
          Sets the isZipPresent attribute of the ScheduledHarvest object
 void setLastHarvestTime(Date val)
          Sets the lastHarvestTime attribute of the ScheduledHarvest object
 void setMetadataPrefix(String val)
          Sets the metadataPrefix attribute of the ScheduledHarvest object
 void setNumHarvestedLast(int n)
          Sets the numHarvestedLast attribute of the ScheduledHarvest object
 void setRepositoryName(String val)
          Sets the repositoryName attribute of the ScheduledHarvest object
 void setRunAtTime(String runAtTime)
          Sets the time of day to begin the regular harvests, in 24 hour time for example 23:15.
 void setSetSpec(String val)
          Sets the setSpec attribute of the ScheduledHarvest object
 void setSplitBySet(boolean spl)
          Sets the splitBySet attribute of the ScheduledHarvest object
 void setUid(Long val)
          Sets the uid attribute of the ScheduledHarvest object
 void setWarnR(boolean w)
          Sets the warnR attribute of the ScheduledHarvest object
 void setZipLatest(String z)
          Sets the zipLatest attribute of the ScheduledHarvest object
 String toString()
          Provides a String representataion for this ScheduledHarvest.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 immediately
enabledDisabled - One of exactly enabled or disabled.
harvestDir - Description of the Parameter
spl - Description of the Parameter
isZip - Description of the Parameter
def - Description of the Parameter
dupAllow - Description of the Parameter
doZip - True to zip the resulting harvest
Method Detail

getUid

public Long 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

public String 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

public String getBackupOne()
Gets the backupOne attribute of the ScheduledHarvest object

Returns:
The backupOne value

getZipLatest

public String getZipLatest()
Gets the zipLatest attribute of the ScheduledHarvest object

Returns:
The zipLatest value

getBackupTwo

public String getBackupTwo()
Gets the backupTwo attribute of the ScheduledHarvest object

Returns:
The backupTwo value

getBackupThree

public String 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

public String getRepositoryName()
Gets the repositoryName attribute of the ScheduledHarvest object

Returns:
The repositoryName value

getRepositoryNameEscaped

public String getRepositoryNameEscaped()
RepositoryName with quotes escaped for use in JavaScript literals.

Returns:
The repositoryNameEscaped value

getHarvestDir

public File 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

public String 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

public String getSetSpec()
Gets the setSpec attribute of the ScheduledHarvest object

Returns:
The setSpec value

getSetSpecHtml

public String getSetSpecHtml()
Gets the setSpecHtml attribute of the ScheduledHarvest object

Returns:
The setSpecHtml value

getMetadataPrefix

public String getMetadataPrefix()
Gets the metadataPrefix attribute of the ScheduledHarvest object

Returns:
The metadataPrefix value

getHarvestingInterval

public String getHarvestingInterval()
Gets the harvestingInterval attribute of the ScheduledHarvest object

Returns:
The harvestingInterval value

getIntervalGranularity

public String getIntervalGranularity()
Gets the intervalGranularity attribute of the ScheduledHarvest object

Returns:
The intervalGranularity value

getIntervalGranularityLabel

public String getIntervalGranularityLabel()
Gets the intervalGranularityLabel attribute of the ScheduledHarvest object

Returns:
The intervalGranularityLabel value

getEnabledDisabled

public String getEnabledDisabled()
Gets the enabledDisabled attribute of the ScheduledHarvest object

Returns:
The enabledDisabled value

getLastHarvestTime

public Date 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

public String 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

public String 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

public void setRunAtTime(String runAtTime)
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

public void setAllowDupDir(String v)
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

public void setUid(Long val)
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

public void setBackupOne(String bOne)
Sets the backupOne attribute of the ScheduledHarvest object

Parameters:
bOne - The new backupOne value

setZipLatest

public void setZipLatest(String z)
Sets the zipLatest attribute of the ScheduledHarvest object

Parameters:
z - The new zipLatest value

setBackupTwo

public void setBackupTwo(String bTwo)
Sets the backupTwo attribute of the ScheduledHarvest object

Parameters:
bTwo - The new backupTwo value

setBackupThree

public void setBackupThree(String bThree)
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

public void setHarvestDir(File hd)
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

public void setRepositoryName(String val)
Sets the repositoryName attribute of the ScheduledHarvest object

Parameters:
val - The new repositoryName value

setBaseURL

public void setBaseURL(String val)
Sets the baseURL attribute of the ScheduledHarvest object

Parameters:
val - The new baseURL value

setSetSpec

public void setSetSpec(String val)
Sets the setSpec attribute of the ScheduledHarvest object

Parameters:
val - The new setSpec value

setMetadataPrefix

public void setMetadataPrefix(String val)
Sets the metadataPrefix attribute of the ScheduledHarvest object

Parameters:
val - The new metadataPrefix value

setHarvestingInterval

public void setHarvestingInterval(String val)
Sets the harvestingInterval attribute of the ScheduledHarvest object

Parameters:
val - The new harvestingInterval value

setIntervalGranularity

public void setIntervalGranularity(String val)
Sets the intervalGranularity attribute of the ScheduledHarvest object

Parameters:
val - The new intervalGranularity value

setEnabledDisabled

public void setEnabledDisabled(String val)
Sets the enabledDisabled attribute of the ScheduledHarvest object

Parameters:
val - The new enabledDisabled value

setLastHarvestTime

public void setLastHarvestTime(Date val)
Sets the lastHarvestTime attribute of the ScheduledHarvest object

Parameters:
val - The new lastHarvestTime value

toString

public String 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 the equals(Object) method.

Overrides:
toString in class Object
Returns:
String describing all data in the SetInfo.

equals

public boolean equals(Object o)
Checks equality of two ScheduledHarvest objects.

Overrides:
equals in class Object
Parameters:
o - The ScheduledHarvest to compare to this
Returns:
True iff the compared object is equal

compareTo

public int compareTo(Object o)
Compare for sorting purposes

Specified by:
compareTo in interface Comparable
Parameters:
o - The object to compare to.
Returns:
-1, 0 or 1.

getDateStamp

public static String 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

DLESE Tools
v1.6.0