.

Harvest::Object - represents ``objects'' being gathered

SYNOPSIS

...

DESCRIPTION

Object is a class for storing details about an object that is being gathered. It contains references to a number of other objects, and so should be flattened before being stored to disk, or passed to other programs.

METHODS

$object = new Object ($rootnode,$url)

Create a new ``root'' object. $rootnode should be a unique string which identifies the ``RootNode'' definition associated with the URL, $url should be either a string or a URI::URL object which contains the URL that the object represents.

The ``FILTER'' rootnode is a special case, which identifies objects which are being fetched for use purely by the filtering code.

$object = new Object($parent, $url)

Create a new object which is a child of the given parent.

$parent is a Object. $url is either a string or a URI::URL object.

$obj1->include($obj2);

Import the meta and management data from $obj2 into the structure of $obj1

$object->url();

Return the URL of the object.

$object->newurl();

Set a new URL for the object, but preserve other information.

$object->rootnode

Return the rootnode of the object.

$self->depth

Return the depth of the object.

$self->headers

Return the Harvest::Object::Headers object which encapsulates the protocol headers sent when this object was transfered.

$self->manage

Return the Harvest::Object::Manage object which contains management information for this object

$self->metadata

Return the object which contains the metadata representation of this object.

$self->setmeta($metadata)

Set the metadata representation of this object to that given in the $metadata variable

$self->parent

Return the string representation of the URL of the parent of this object

$self->filter([$arg])

If $arg is set then set the filter attribute to the value of $arg. Returns the old (or current) value.

The filter attribute indicates whether the object is being fetched for a filter