lib/BIDM/Tagset.pm


NAME

MTk::BIDMTagset


DESCRIPTION

A BIDMTagset holds the set of tags parsed from an Asset's html representation.

$tagset->add_tag($tag)

Add a tag to the tag set.

$tagset->parse()

Parse the tagset into a RIG object hierarchy. Returns the BIDM::RIGObject subclass representing this object. We assume currently that there is one RIG object per tagset (and one tagset per html page).

Approach: iterate through the tag list, passing to each the current object that we've parsed out. When we start, the current object is undefined. The parsing of the first tag will cause the current object to be defined.

$tagset->store_in_db($db, $id)

Store the tagset in the Tag table in the given database. $id is the asset id.

$tagset->load_from_db($db, $id)

Load the tags for asset $id from the database. Create the BIDM::Tag objects for each and store in this tagset.

$tagset->response($val)

Set or get the response member. This is used to retain the HTTP headers from the retrieval of this tagset from the web.