In this section, the new resource model of Jigsaw 2.0 will be presented, along with a tutorial on how to create and edit a resource in Jigsaw.
A resource is the basic object served by Jigsaw. It encapsulate a "real"
object like a file (text, image or whatever) or a generated content (by a
cgi-script or a servlet). This object is accessible within the server according
to its URL. To be able to serve this object, Jigsaw needs to know a protocol
that can serve this object. All the informations about the resource are stored
in "Frames". Those frames may be of different kinds: protocol frames, describing
the way to serve this resource for a specific protocol (ex:
HTTPFrame
), or describing the resource itself (ex: a metada
frame encoded in RDF). The combination of an HTTPFrame and a basic resource
corresponds to the HTTPResource of the Jigsaw 1.0.
Basically, there are not many things in the resource itself as all the information is stored in the frames. There are two kinds of resource, the containers and the leafs. A basic resource will only have the identifier and last-modified attributes. A container will have also an indexer attribute to select the indexer used to index this the resources contained. There are extra attributes for:
org.w3c.jigsaw.resources.DirectoryResource
extensible
negotiable
org.w3c.tools.resources.FileResource
filename
To configure a resource, you have to add frames and edit the attributes of this resource. If the resource is a container, you can also add resources to it.
Using JigAdmin, click on the resource in the tree, on the right part of the window, you will have some buttons (usually, two if the resource is a leaf, three if it is a container) located at the top. These button are used to select the helpers. To edit the frames, click on "frames" and the corresponding helper will appear below the button bar.
At the bottom of the window, a new tree browser will appear, containing the resource. if you open it, you will see all the frames attached to it. To add a new frame to the resource, click on the resource (highlight in a pinkish color) then click on "back to add frame menu", or, if you did not open the little tree, add directly the frame by selecting (or typing) the frame class.
To edit the attributes of a frame, just click on the frame, its own attribute helper will show up in the top part of the window.
A filter is now a frame of a protocol frame. If you want to add a CounterFilter to a HTTPFrame:
org.w3c.jigsaw.filters.CounterFilter
Now you can click on the new filter added and edit its attributes.
Using JigAdmin, click on the resource in the tree, then select
the Attributes helper. You will then have, in the attributes helper, the
descrition of attributes on the left hand size, and the editable fields on
the right hand side. To understand the meaning of the attributes names for
each resource, see the reference documentation.
For example, the meaning of the "negotiable" attribute of
org.w3c.jigsaw.resources.DirectoryResource
is:
negotiable
There is also a specific tutorial on the edition of the attributes.
$Id: resource.html,v 1.10 1998/04/02 09:31:36 yves Exp $