.

Harvest::Object::Manage - encapsulate object management information

DESCRIPTION

``Management'' information is information about an object that the Harvest code uses in order to control the indexing process. It is seperate from the Object payload, to allow the format of that payload to be easily changed.

The information is different from that encapsulated by Harvest::Object::Headers in that it is stored in the database from one run to the next, whereas the header information is discarded after an object is succesfully fetched.

METHODS

$manage = new Harvest::Object::Manage

Make a new management data object

$manage->addurlref(@urls)

Add a new set of URLs to the list of URL references in this object. No checks for identical URLs are currently performed

$manage->urlref

Return the list of URL references for the object - the reference will be returned as a '\n' seperated list of URLs.

$manage->delurlref

Delete the current list of url references.

$manage->lmt([$lmt])

Set the Last Modification Time of the object to the value in $lmt, if defined. Returns the old (or current, if $lmt was undefined) value.

The LMT is the time that the object on the server was last modified, according to the server, and will probably be set from protocol headers.

$manage->update([$update])

Set the Update Time of the object to the value in $update, if defined. Returns the old (or current, if $update was undefined) value.

The Update Time is the time that the object's database entry was last updated by the gatherer.

$manage->ttl([$ttl])

Set the Time to Live of the object to the value in $ttl, if defined. Returns the old (or current, if $ttl was undefined) value.

The Time to Live is the length of time from the time that the object was last updated, that the contents of the record can be considered to be still valid.

$manage->outofdate

Returns true if the object has expired. An object has expired if the time it was last updated, plus its time to live, is less than the current time.

Objects with a time to live of zero are assumed to have infinite life, and so are never expired.

$manage->md5([$md5])

Set the MD5 hash of the object to the value in $md5, if defined. Returns the old (or current, if $md5 was undefined) value.

The MD5 hash is the hash of the data that the object represents. It is used for duplicate detection.

$manage->pack

Return a packed string representation of the object.

$manage->unpack($string);

Unpack a string and set up the object to reflect its values.