W3C Jigsaw
All Resources All filters

ResourceFilter

The ResourceFilter class is the basic class for all resource filters. If you are not yet familiar with filters, check Jigsaw architecture overview. Resource filters can maintain a shadow of their target attributes in order to overide them. This is how the ProcessFilter, for example, can be used to do on-the-fly MIME type conversion: it shadows its target resource content-type attribute value. This is why the generic resource editor displays the ShadowedBy... button when a filter is attached to the resource it edits.

When a resource's attribute is queried, its filters are first queried for a shadow value of the attribute. If one of the filters attached to the resource defines the attribute, its value is returned. Otherwise, the normal resource attribute value is fetched and returned.


Inherits

The ResourceFilter class inherits from the following classes:


Attributes description

The ResourceFilter defines the following attribute:


target
semantics
The target resource for the filter. This attribute gives the resource this filter instance is attached to.
type
This attribute is a computed, unsaved ObjectAttribute.
default value
This attribute defaults to the resource that unpickles the filter, which you can assume to be the filter's target resource.


Jigsaw Team
$Id: w3c.jigsaw.resources.ResourceFilter.html,v 1.1 1996/04/23 19:13:12 abaird Exp $