(this function may be incorporated into the notifyOfDateChange Juggler in a future release)
Description
The juggler examines the date of all source files. If a URL is considered changed then the file it points to is downloaded. The downloaded file is added to the output product of the juggler.
Configuration Variables
userHostAndPassword"user@tiny.mitre.org{password}anonymous@nts-bart.mitre.org{user@mitre.org}user@denali.ccs.neu.edu{password}The above string is an example of the userHostAndPassword variable. Each entry contains a user name, host name, and password. The password is contained inside of brackets. The '}' character is used as the token delimiter to extract all the entries.
The contents of this variable are used by the Juggler to connect to remote FTP hosts. This list must contain an entry for every host that the Juggler is supposed to connect with. There can only be one entry per host.
somethingChangedMessage - see notifyOfChange
nothingChangedMessage - see notifyOfChange
Product
The juggler produces a VectorProduct containing a FileRef for each downloaded file. The id of the product is the string contained in the somethingChanged variable. The description of the product contains the number of new files followed by the phrase, "items, checked on ", followed by the date on which the product was created.
How it works
The NotifyOfDateChangeFTP juggler accepts an input product and runs it through AsFlatURLList in order to extract all the URLs contained within it. The juggler then calculates a CRC for each URL by setting it equal to the time that the product containing the URL was last modified. The juggler then compares it to the previously calculated CRC. If the CRC's are different, or if the CRC is being calculated for the first time (meaning that there is no previously calculated CRC available for comparison), the file pointed to by the URL is downloaded and a FileRef for the file is added to a vector of FileRefs. The juggler then creates a new VectorProduct and the vector of new FileRefs becomes its content.
Revised 10/9/97