This page describes how to setup the Jigsaw server for PICS support.
The rest of this document answers the following questions:
Upon each request crossing the labeled directory, the PICS filter will examine both the request, and the original reply (as built by the target resource). If PICS labels are requested, it will query the label bureau (whose home directory is given through the bureau parameter), and add to the reply the additional PICS headers.
To register a label bureau resource within your server space, follow the normal configuration steps (see the Resource Configuration guide for more informations).
lines = line lines | <empty> line = <attribute> '=' <value> attribute = <Any char except '='> value = <Any char except EOL>
The following attributes are mandatory:
Here is the list of all attributes:
by = quotedname generic = boolean for = quotedURL on = quoted-ISO-date signature-RSA-MD5 = "base64-string" until = quoted-ISO-date exp = quoted-ISO-date at = quoted-ISO-date MIC-md5 = "base64-string" md5 = "base64-string" comment = quotedname complete-label = quotedURL full = quotedURL extension = '(' mand/opt quotedURL data* ')' mand/opt :: 'optional' | 'mandatory' data :: quoted-ISO-date | quotedURL | number | quotedname | '(' data* ')' ratings = pics-ratings
Read this for more informations about Pics labels.
When ever you encounter these italized tokens, you should replace them with your own value.
We will first set-up a label bureau. For this we need to assign a directory to it, let's use root/labels for this purpose. We create this directory, empty:
create the directory root/labels
Than we need to define some service. Let's say we want to create the www.rating.com service, which will use the http protocol. Its identifier URL will be http://www.rating.com, so we need to create the following directories:
create the directory root/labels/http/www.rating.com
Now, lets make a label for http://www.w3.org/PICS by this service. This label will be generic (so it will apply to anything below this url), and will be locate in the following file:
What should we put in this file ? This depends on the category the rating service defines. For the sake of simplicity, lets say that it defines only one category, namely the minimal age the surfer should be. Note that we need not be concerned by the service description here, as this is the role of the maintainer of this service (ie www.rating.com), here we just want to distribute labels for this service. Given all this, we can write our label file PICS.gen:
create the directory root/labels/http/www.rating.com/http/www.w3.org/pub/WWW/ cd root/labels/http/www.rating.com/http/www.w3.org/pub/WWW/
And write the following in PICS.gen
on="1995.2.29T14:10+0300" by="email@example.com" for="http://www.w3.org/pub/WWW/PICS" generic=true ratings=(age 10)
The set of attributes for this label can include any of the attributes defined by the PICS labels specification. Our ratings attribute here, state that the reader should be at least 10 to be able the PICS specification (this will prevent kids from understanding PICS, so that they can't hack it ;-). All these attributes will be send as is (in the appropriate syntax, though) to any clients requesting the http://www.w3.org/pub/WWW/PICS generic label.
Here, we focus on providing labels (by our www.rating.com service) for part of our exported space. Let's say we export a labeled-space in our top directory root/WWW, that contains stuff to be labeled. To handle PICS in this space, we will need to set it up through the PICS filter. Use Jigadmin to hook this filter on labeled-space.
Our labeled-space is all set, we now need to install some documents in it, and label them. Let's say we have a hello.html document in this directory that we want to label with a specific label. The label will conform to our fake www.rating.com service, we want the reader to be at least 1 year:
create root/labels/http/www.rating.com/http/host/port/labeled-space cd root/labels/http/www.rating.com/http/host/port/labeled-space
And write the following in hello.html
generic=false for="http://host:port/labeled-space/hello.html" by="firstname.lastname@example.org" ratings=(age 1)
We can now ask for the labeled document, and we will get the appropriate labels.
Now let's turn Jigsaw into a label bureau. You will first need to define the label bureau database, as stated above. The label bureau is implemented as a special resource whose class is org.w3c.jigsaw.pics.LabelBureauResource. The first thing you will need to do is to hook up an instance of this resource in the appropriate place of your exported space. You can do this with JigAdmin by adding a LabelBureau call it LabelBureau (for example). Then go and edit its bureau parameter, you're all set.
Now, the http://host:port/LabelBureau will handle the incoming queries for label.