--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">\r
+<HTML>\r
+<HEAD>\r
+ <META NAME="GENERATOR" CONTENT="Mozilla/3.01Gold (X11; I; SunOS 5.5 sun4u) [Netscape]">\r
+ <TITLE>PICS Jigsaw administration</TITLE>\r
+</HEAD>\r
+<BODY BGCOLOR="#FFFFFF">\r
+<P>\r
+<!-- Changed by: Benoit Mahe, 25-Jun-1997 -->\r
+<P>\r
+<!-- Changed by: Anselm Baird-Smith, 4-Feb-1997 --><A HREF="http://www.w3.org/pub/WWW/" TARGET="_top_"><IMG\r
+ SRC="/icons/WWW/w3c_home.gif" ALT="w3c" BORDER=0 HEIGHT=48 WIDTH=72></A>\r
+<A HREF="http://www.w3.org/pub/WWW/Jigsaw/" TARGET="_top_"><IMG SRC="/icons/jigsaw" BORDER=0\r
+ HEIGHT=49 WIDTH=212></A>\r
+<H1>\r
+ Pics setup\r
+</H1>\r
+<P>\r
+This page describes how to setup the <B>Jigsaw</B> server for PICS support.\r
+For general administration issues, you should read the\r
+<A HREF="Overview.html">Administration guide</A>. <B>Jigsaw</B> PICS support\r
+can be handled in two ways:\r
+<OL>\r
+ <LI>\r
+ Using the server as a label bureau\r
+ <LI>\r
+ Using the server to serve labels with document\r
+</OL>\r
+<P>\r
+Both approaches deal with the following objects:\r
+<DL>\r
+ <DT>\r
+ <A HREF="../api/w3c.jigsaw.pics.LabelBureauFactory.html">LabelBureauFactory</A>\r
+ <DD>\r
+ The object responsible for creating specific instances of label databases.\r
+ <DT>\r
+ <A HREF="../api/w3c.jigsaw.pics.LabelBureauInterface.html">LabelBureauInterface</A>\r
+ <DD>\r
+ Any implementation of a label bureau.\r
+ <DT>\r
+ <A HREF="../api/w3c.jigsaw.pics.LabelServiceInterface.html">LabelServiceInterface</A>\r
+ <DD>\r
+ Any implementation of a label service.\r
+ <DT>\r
+ <A HREF="../api/w3c.jigsaw.pics.LabelInterface.html">LabelInterface</A>\r
+ <DD>\r
+ Any implementation of labels.\r
+</DL>\r
+<P>\r
+There's two implementations available in jigsaw for PICS, the\r
+<A HREF="#sample">sample implementation </A>and the\r
+<A HREF="#database">database implementation</A>.\r
+<H2>\r
+ <A NAME="sample"></A>Sample implementation configuration\r
+</H2>\r
+<P>\r
+We describe here the setting for the sample implementation, which is made\r
+of the\r
+<A HREF="../api/w3c.jigsaw.pics.SampleLabelBureau.html">SampleLabelBureau</A>,\r
+<A HREF="../api/w3c.jigsaw.pics.SampleLabelService.html">SampleLabelService</A>\r
+and <A HREF="../api/w3c.jigsaw.pics.SampleLabel.html">SampleLabel</A>. These\r
+objects use a simple database, whose implementation relies on the underlying\r
+file system:. To each sample label bureau, is associated a <I>home\r
+directory</I>. To look for labels on a given URL <I>U</I> rated by service\r
+whose identifier is <I>SURL</I> it parses it into the following components:\r
+<UL>\r
+ <LI>\r
+ The service host name (shost),\r
+ <LI>\r
+ The service port number (sport),\r
+ <LI>\r
+ The optional service path (spath),\r
+ <LI>\r
+ The target URL protocol (uproto)\r
+ <LI>\r
+ The target URL host name (uhost),\r
+ <LI>\r
+ The target URL port number (uport),\r
+ <LI>\r
+ The target URL path (upath).\r
+</UL>\r
+<P>\r
+Out of these components, it builds a file name:\r
+<DL>\r
+ <DT>\r
+ For generic labels\r
+ <DD>\r
+ <I><bureau-home-directory></I>/<I><shost>/<sport>/<spath>/<uproto>/<uhost>/<uport>/<upath></I>.gen\r
+ <DT>\r
+ For specific labels\r
+ <DD>\r
+ <I><bureau-home-directory>/<shost>/<sport>/<spath>/<uproto</I>>/<I><uhost>/<uport>/<upath></I>\r
+</DL>\r
+<P>\r
+If the <I>port</I> equals 80 (the normal http port), it is omited. The label\r
+bureau directory is a parameter of the sample label bureau implementation.\r
+As an example, if the label bureau directory is <TT>www/labels</TT> and we\r
+are looking for generic labels for <TT>http://www.w3.org/pub/WWW</TT> by\r
+the service <TT>http://www.rating.com</TT>, the sample implementation will\r
+check for a file named\r
+<TT>www/labels//http/www.rating.com/http/www.w3.org/pub/WWW.gen</TT>. If\r
+such a file exists, it should contain a label representation, in a format\r
+decribed <A HREF="#editing-labels">below</A>.\r
+<P>\r
+The rest of this document answers the following questions:\r
+<UL>\r
+ <LI>\r
+ <A HREF="#serving-labels-with-documents">How do I set up my server to serve\r
+ labels with documents ?</A>\r
+ <LI>\r
+ <A HREF="#label-bureau">How do I set up my server as a label bureau ?</A>\r
+ <LI>\r
+ <A HREF="#editing-labels">How can I edit labels, what is the label file format\r
+ ?</A>\r
+ <LI>\r
+ <A HREF="#sample-setting">Sample setting: going through a full example.</A>\r
+</UL>\r
+<H2>\r
+ <A NAME="serving-labels-with-documents"></A>Serving labels with documents\r
+</H2>\r
+<P>\r
+<B>Jigsaw</B> uses the\r
+<A HREF="../Reference/w3c.jigsaw.pics.PICSFilter.html">PICSFilter</A> to\r
+implement this part of the PICS specification (if you are not familiar with\r
+filters, you may want to have a look at the global\r
+<A HREF="Overview.html">Administration guide</A>.). This filter will process\r
+each outgoing reply by adding to it the appropriate PICS headers. It takes\r
+one parameter, named <TT>bureau</TT> which will be passed to the label bureau\r
+factory when the server needs to access the label bureau. In the two\r
+implementations of label bureau, this should be a string giving the absolute\r
+path of the label bureau database.\r
+<P>\r
+Upon each request crossing the <TT>labeled</TT> directory, the PICS filter\r
+will examine both the request, and the original reply (as built by the target\r
+resource). If PICS labels are requested, it will query the label bureau (whose\r
+home directory is given through the <TT>bureau</TT> parameter), and add to\r
+the reply the additional PICS headers.\r
+<H2>\r
+ <A NAME="label-bureau"></A>Label bureau\r
+</H2>\r
+<P>\r
+<B>Jigsaw</B> can also be used as a label bureau. This is fearly easy to\r
+setup: the label bureau itself is implemented as a specific resource, which\r
+will decode requests, make the appropriate queries to its bureau implementation,\r
+and send back the automatically generated PICS document.\r
+<P>\r
+To register a label bureau resource within your server space, follow the\r
+normal configuration steps (see the <A HREF="Overview.html">Administration\r
+guide</A> for more informations).\r
+<H2>\r
+ <A NAME="editing-labels"></A>Editing labels\r
+</H2>\r
+<P>\r
+Editing labels, right now, is done by editing the label files, as described\r
+in the first section of this document. These files have a very simple format:\r
+<PRE>lines = line lines | <empty>\r
+line = <attribute> '=' <value>\r
+attribute = <Any char except '='>\r
+value = <Any char except EOL>\r
+</PRE>\r
+<P>\r
+The following attributes are mandatory:\r
+<DL>\r
+ <DT>\r
+ For all labels:\r
+ <DL>\r
+ <DT>\r
+ <B>generic</B>\r
+ <DD>\r
+ Wether the label is generic or not\r
+ <DT>\r
+ <B>ratings</B>\r
+ <DD>\r
+ The actual ratings for the labeled document\r
+ </DL>\r
+ <DT>\r
+ For generic labels:\r
+ <DL>\r
+ <DT>\r
+ <B>for</B>\r
+ <DD>\r
+ The full URL of the labeled document\r
+ </DL>\r
+</DL>\r
+<P>\r
+The following file, is a valid label file for the\r
+<TT>http://www.w3.org/pub/WWW/Overview.html </TT>provided the label bureau\r
+home directory is <TT>/usr/www/labels</TT>:\r
+<PRE># /usr/www/labels/http/www24.w3.org/8888/http/www.w3.org/pub/WWW/Overview.html\r
+ratings=(age 12)\r
+by="abaird@w3.org"\r
+generic=false\r
+</PRE>\r
+<H2>\r
+ <A NAME="sample-setting"></A>Sample setting\r
+</H2>\r
+<P>\r
+This section describes a full example of PICS setting. We will use the following\r
+terms:\r
+<DL>\r
+ <DT>\r
+ <I>root</I>\r
+ <DD>\r
+ The server root directory (not to be confused with its space directory, which\r
+ will usually be <I>root</I>/WWW).\r
+ <DT>\r
+ <I>host</I>\r
+ <DD>\r
+ The host the server is running on, as defined by your command line, or by\r
+ the\r
+ <A HREF="../Reference/w3c.jigsaw.http.GeneralProp.html##w3c.jigsaw.host">w3c.jigsaw.host</A>\r
+ property\r
+ <DT>\r
+ <I>port</I>\r
+ <DD>\r
+ The port the server is listening to, as defined either by your command line,\r
+ or by the\r
+ <A HREF="../Reference/w3c.jigsaw.http.GeneralProp.html#w3c.jigsaw.port">w3c.jigsaw.port\r
+ </A>property.\r
+</DL>\r
+<P>\r
+When ever you encounter these italized tokens, you should replace them with\r
+your own value.\r
+<H3>\r
+ Setting up a label bureau database\r
+</H3>\r
+<P>\r
+We will first set-up a label bureau. For this we need to assign a directory\r
+to it, let's use <I>root</I>/labels for this purpose. We create this directory,\r
+empty:\r
+<PRE>mkdir <I>root</I>/labels\r
+</PRE>\r
+<P>\r
+Than we need to define some service. Let's say we want to create the\r
+<TT>www.rating.com</TT>\r
+<A HREF="http://www.w3.org/pub/WWW/PICS/services.html">service</A>, which\r
+will use the http protocol. Its identifier URL will be\r
+<TT>http://www.rating.com</TT>, so we need to create the following directories:\r
+<PRE>mkdir -p <I>root</I>/labels/http/www.rating.com\r
+</PRE>\r
+<P>\r
+Now, lets make a label for <TT>http://www.w3.org/PICS</TT> by this service.\r
+This label will be generic (so it will apply to anything below this url),\r
+and will be locate in the following file:\r
+<PRE><I>root</I>/labels/http/www.rating.com/http/www.w3.org/pub/WWW/PICS.gen\r
+</PRE>\r
+<P>\r
+What should we put in this file ? This depends on the category the\r
+<A HREF="http://www.w3.org/pub/WWW/PICS/services.html">rating service</A>\r
+defines. For the sake of simplicity, lets say that it defines only one category,\r
+namely the minimal age the surfer should be. Note that we need not be concerned\r
+by the service description here, as this is the role of the maintainer of\r
+this service (ie <TT>www.rating.com</TT>), here we just want to\r
+<I>distribute</I> labels for this service. Given all this, we can write our\r
+label file PICS.gen:\r
+<PRE>mkdir -p <I>root</I>/labels/http/www.rating.com/http/www.w3.org/pub/WWW/\r
+cd <I>root</I>/labels/http/www.rating.com/http/www.w3.org/pub/WWW/\r
+cat > PICS.gen\r
+at=1995.2.29T14:10+0300\r
+by=abaird@w3.org\r
+for=http://www.w3.org/pub/WWW/PICS\r
+generic=true\r
+ratings=(age 10)\r
+^D\r
+</PRE>\r
+<P>\r
+The set of attributes for this label can include any of the attributes defined\r
+by the <A HREF="http://www.w3.org/pub/WWW/PICS/labels.html">PICS labels\r
+specification</A>. Our <TT>ratings</TT> attribute here, state that the reader\r
+should be at least 10 to be able the PICS specification (this will prevent\r
+kids from understanding PICS, so that they can't hack it ;-). All these\r
+attributes will be send <I>as is</I> (in the appropriate syntax, though)\r
+to any clients requesting the <TT>http://www.w3.org/pub/WWW/PICS</TT> generic\r
+label.\r
+<H3>\r
+ Setting up a labeled space (serving labels with documents)\r
+</H3>\r
+<P>\r
+Here, we focus on providing labels (by our <TT>www.rating.com\r
+</TT>service) for part of our exported space. Let's say we export a\r
+<TT>labeled-space </TT>in our top directory <I>root</I>/WWW, that contains\r
+stuff to be labeled. To handle PICS in this space, we will need to set it\r
+up through the PICS filter. Use the directory resource editor to hook this\r
+filter on it (the editor is available as\r
+<TT>/Admin/Editor/labeled-space</TT>).\r
+<P>\r
+Our <TT>labeled-space</TT> is all set, we now need to install some documents\r
+in it, and label them. Let's say we have a <TT>hello.html</TT> document in\r
+this directory that we want to label with a specific label. The label will\r
+conform to our fake <TT>www.rating.com</TT> service, we want the reader to\r
+be at least 1 year:\r
+<PRE>mkdir -p <I>root</I>/labels/http/www.rating.com/http/<I>host</I>/<I>port</I>/labeled-space\r
+cd <I>root</I>/labels/http/www.rating.com/http/<I>host</I>/<I>port</I>/labeled-space\r
+cat > hello.html\r
+generic=false\r
+for=http://<I>host</I>:<I>port</I>/labeled-space/hello.html\r
+by=abaird@w3.org\r
+ratings=(age 1)\r
+</PRE>\r
+<P>\r
+We can now ask for the labeled document, and we will get the appropriate\r
+labels.\r
+<H3>\r
+ Serving labels\r
+</H3>\r
+<P>\r
+Now let's turn <B>Jigsaw</B> into a label bureau. You will first need to\r
+define the label bureau database, as stated above. The label bureau is\r
+implemented as a special resource whose class is\r
+<A HREF="../api/w3c.jigsaw.pics.LabelBureauResource.html">w3c.jigsaw.pics.LabelBureauResource</A>\r
+.The first thing you will need to do is to hook up an instance of this resource\r
+in the appropriate place of your exported space. You can do this by poping\r
+the appropriate directory resource editor, for example by pointing your browser\r
+to <TT>/Admin/Editor</TT>. Select the <I>AddResource</I> link, and give the\r
+label's bureau name (e.g. <B>ratings</B>), and its class (which will always\r
+be <B>w3c.jigsaw.pics.LabelBureauResource</B>). Then go and edit its\r
+<TT>bureau</TT> parameter, you're all set.\r
+<P>\r
+Now, the <TT>http://<I>host</I>:<I>port</I>/ratings</TT> will handle the\r
+incoming queries for label.\r
+<H2>\r
+ <A NAME="database"></A>DataBase implementation configuration\r
+</H2>\r
+<P>\r
+We describe here the setting for the implementation which use a fancy database\r
+to store labels. Instead of\r
+<A HREF="../api/w3c.jigsaw.pics.SampleLabelBureau.html">SampleLabelBureau</A>\r
+and\r
+<A HREF="../api/w3c.jigsaw.pics.SampleLabelService.html">SampleLabelService</A>,\r
+this implementation use\r
+<A HREF="../api/w3c.jigsaw.pics.DataBaseBureau.html">DataBaseBureau</A> and\r
+<A HREF="../api/w3c.jigsaw.pics.DataBaseService.html">DataBaseService.</A>\r
+<P>\r
+Configuring a DataBaseBureau is the same than configuring a SampleLabelBureau.\r
+The only difference is that the DataBaseBureau directory must have ".db"\r
+as extension. This directory must contains two files named dbs.props and\r
+dbb.props witch gives informations about the databases used.Take a look at\r
+these files : <A HREF="dbs.props.txt">dbs.props</A> &\r
+<A HREF="dbb.props.txt">dbb.props</A>. Here is a description of the two databases\r
+:\r
+<H2 ALIGN=CENTER>\r
+ <FONT SIZE=+1>the database relative to the bureau (describe by\r
+ dbs.props)</FONT>\r
+</H2>\r
+<CENTER>\r
+ <TABLE BORDER=2 CELLSPACING=3 CELLPADDING=0 WIDTH="40%" >\r
+ <TR ALIGN=CENTER VALIGN=CENTER>\r
+ <TD><FONT SIZE=+1>bureau</FONT></TD>\r
+ <TD><FONT SIZE=+1>service</FONT></TD>\r
+ </TR>\r
+ <TR ALIGN=CENTER VALIGN=CENTER>\r
+ <TD>(char)</TD>\r
+ <TD>(char)</TD>\r
+ </TR>\r
+ </TABLE>\r
+</CENTER>\r
+<H2 ALIGN=CENTER>\r
+ <FONT SIZE=+1>the database relative to the services (describe by\r
+ dbb.props)</FONT>\r
+</H2>\r
+<CENTER>\r
+ <TABLE BORDER=2 CELLSPACING=3 CELLPADDING=0 WIDTH="40%" >\r
+ <TR ALIGN=CENTER VALIGN=CENTER>\r
+ <TD><FONT SIZE=+1>service</FONT></TD>\r
+ <TD><FONT SIZE=+1>label</FONT></TD>\r
+ <TD><FONT SIZE=+1>gen</FONT></TD>\r
+ </TR>\r
+ <TR ALIGN=CENTER VALIGN=CENTER>\r
+ <TD>(char)</TD>\r
+ <TD>(char)</TD>\r
+ <TD>(int 0 or 1)</TD>\r
+ </TR>\r
+ </TABLE>\r
+</CENTER>\r
+<P>\r
+The label format in the database is the same than <A HREF="#editing-labels">the\r
+label file format of the sample implementation</A>.\r
+<P>\r
+The rest of this document answers the following questions:\r
+<UL>\r
+ <LI>\r
+ <A HREF="#serving-labels-with-documents">How do I set up my server to serve\r
+ labels with documents ?</A> (Same way than the sample implementation).\r
+ <LI>\r
+ <A HREF="#label-bureau">How do I set up my server as a label bureau ?</A>\r
+ <LI>\r
+ <A HREF="#editing-labels-database">How can I edit labels?</A>\r
+ <LI>\r
+ <A HREF="#sample-setting-database">Sample setting: going through a full\r
+ example.</A>\r
+</UL>\r
+<H2>\r
+ <A NAME="editing-labels-database"></A>Editing labels (with the database\r
+ implementation)\r
+</H2>\r
+<P>\r
+Editing labels is done by sending a PUT request to the label bureau (in a\r
+HTML form or an Applet). Here is the detailed specification of the PUT request\r
+:\r
+<UL>\r
+ <LI>\r
+ <UL>\r
+ <LI>\r
+ <UL>\r
+ <LI>\r
+ <B>PUT uri HTTP1.x </B>\r
+ <P>\r
+ <B>service=</B><I>service url</I><B>&</B>\r
+ <P>\r
+ <B>url=</B><I>the url to label</I><B>&</B>\r
+ <P>\r
+ <B>label=</B><I>the label in the <A HREF="#jigsaw-label-format">jigsaw\r
+ alternative format</A></I><B>&</B>\r
+ <P>\r
+ <B>generic=</B>[<B>true </B>| <B>false</B>]<B>&</B>\r
+ <P>\r
+ <B>overwrite=</B>[<B>true</B> | <B>false</B>]<B>&</B>\r
+ <P>\r
+ <B>createservice=</B>[<B>true </B>| f<B>alse</B>]\r
+ <P>\r
+ ('&' is a separator)\r
+ </UL>\r
+ </UL>\r
+</UL>\r
+<P>\r
+<B>DETAILS</B> :\r
+<UL>\r
+ <LI>\r
+ <B>uri </B>: the label bureau URL (<B>mandatory</B>)\r
+ <LI>\r
+ <B>service </B>: the service url (<B>mandatory</B>)\r
+ <LI>\r
+ <B>url </B>: the url to label (<B>mandatory)</B>\r
+ <LI>\r
+ <B>label </B>: the label relative to the url. (<B>mandatory</B>)\r
+ <LI>\r
+ <B>generic</B>: if true, the label is generic, default value is false. I\r
+ know that this information is already in the label, but then we don't have\r
+ to parse the label. (<B>optional</B>)\r
+ <LI>\r
+ <B>overwrite</B>: if true, overwrite existing label (if any), default value\r
+ is false. (<B>optional</B>)\r
+ <LI>\r
+ <B>createservice</B>: if true, create the service in the database if it doesn't\r
+ exists, default value is false. (<B>optional</B>)\r
+</UL>\r
+<P>\r
+The reply can have the followings http codes values :\r
+<UL>\r
+ <LI>\r
+ HTTP.CREATED (201) : label registered\r
+ <LI>\r
+ HTTP.CONTINUE (100) : url already labeled\r
+ <LI>\r
+ HTTP.SERVICE_UNAVAILABLE (503) : service doesn't exist in this bureau\r
+ <LI>\r
+ HTTP.INTERNAL_SERVER_ERROR (500)\r
+ <LI>\r
+ HTTP.BAD_REQUEST (400) : may be a malformed url\r
+</UL>\r
+<P>\r
+ <HR WIDTH="100%">\r
+<P>\r
+<A NAME="jigsaw-label-format"></A><B><FONT SIZE=+1>The jigsaw label format\r
+:</FONT></B>\r
+<PRE>lines = line lines | <empty>\r
+line = <attribute> '=' <value>\r
+attribute = <Any char except '='>\r
+value = <Any char except EOL>\r
+</PRE>\r
+<P>\r
+The following attributes are mandatory:\r
+<P>\r
+For all labels:\r
+<UL>\r
+ <LI>\r
+ <B>generic : </B>Wether the label is generic or not\r
+ <P>\r
+ <B>ratings : </B>The actual ratings for the labeled document\r
+</UL>\r
+<P>\r
+For generic labels:\r
+<UL>\r
+ <LI>\r
+ <B>for : </B>The full URL of the labeled document\r
+</UL>\r
+<P>\r
+<B>Examples</B> <B>:</B>\r
+<P>\r
+The following example is a valid generic label for http://www.example.com\r
+<UL>\r
+ <LI>\r
+ <PRE>on="1997.03.01T00-7000"\r
+for="http://www.example.com"\r
+by="bmahe@sophia.inria.fr"\r
+generic=true\r
+ratings=(s 1 v 0 l 2)\r
+</PRE>\r
+</UL>\r
+<P>\r
+The next one is a non generic label for http://www.example.com\r
+<UL>\r
+ <LI>\r
+ <PRE>on="1997.03.01T00-7000"\r
+by="bmahe@sophia.inria.fr"\r
+ratings=(s 1 v 0 l 2)\r
+</PRE>\r
+</UL>\r
+<P>\r
+<B>NOTE</B> : Jigsaw use this format, and not the regular one, because when\r
+this part of jigsaw was implemented, there was no Pics parser available and\r
+this format is easy to parse. In the future, we will use the Pics Parser.\r
+<P>\r
+ <HR WIDTH="100%">\r
+<P>\r
+<B><FONT SIZE=+1>A PUT request sample :</FONT></B>\r
+<P>\r
+The following example is a complete PUT request on the label bureau\r
+<B>http://www43.inria.fr:8007/DataBaseBureau </B>for the url\r
+<B>http://www.movies.com</B> with the rating service\r
+<B>http://www.rsac.org.</B> The label added is a non generic one.\r
+<P>\r
+<FONT SIZE=+1>PUT http://www43.inria.fr:8007/DataBaseBureau HTTP1.1<BR>\r
+service=http://www.rsac.org&url=http://www.movies.com&label=on="1997.03.01T00-7000"<BR>\r
+by="bmahe@sophia.inria.fr"<BR>\r
+ratings=(s 1 v 0 l\r
+2)&generic=false&overwrite=true&createservice=false</FONT><BR>\r
+<H2>\r
+ <A NAME="sample-setting-database"></A>Sample setting (with the database\r
+ implementation)\r
+</H2>\r
+<P>\r
+This section describes a full example of PICS setting. We will use the following\r
+terms:\r
+<DL>\r
+ <DT>\r
+ <I>root</I>\r
+ <DD>\r
+ The server root directory (not to be confused with its space directory, which\r
+ will usually be <I>root</I>/WWW).\r
+</DL>\r
+<P>\r
+When ever you encounter this italized token, you should replace it with your\r
+own value.\r
+<P>\r
+We will setup a label bureau. For this we need to assign a directory to it,\r
+let's use <I>root</I>/labels.db for this purpose. We create this directory,\r
+empty:\r
+<P>\r
+mkdir <I>root</I>/labels.db\r
+<P>\r
+Now we need to create the two databases and we have to install JDBC drivers\r
+to access it.\r
+<P>\r
+Then we need to create the files <A HREF="dbb.props.txt">dbb.props</A> and\r
+<A HREF="dbs.props.txt">dbs.props</A> in this directory.\r
+<P>\r
+Then we need to define some service. Let's say we want to create the\r
+www.rating.com\r
+<A HREF="http://www.w3.org/pub/WWW/PICS/services.html">service</A>, which\r
+will use the http protocol. Its identifier URL will be\r
+<TT>http://www.rating.com</TT>, so we need to send the following request\r
+to the label bureau:\r
+<PRE><B><FONT SIZE=+1>HTTP1.1 /PUT service=http://www.rating.com&create=true</FONT></B>\r
+</PRE>\r
+<P>\r
+Now, lets make a label for http://www.w3.org/PICS by this service. This label\r
+will be generic (so it will apply to anything below this url)\r
+<PRE><B><FONT SIZE=+1>HTTP1.1 /PUT </FONT></B>\r
+</PRE>\r
+<PRE><B><FONT SIZE=+1>service=http://www.rating.com&url=http://www.w3.org/PICS&label=on="1995.2.29T14:10+0300"</FONT></B>\r
+</PRE>\r
+<PRE><B><FONT SIZE=+1>by="abaird@w3.org"</FONT></B>\r
+</PRE>\r
+<PRE><B><FONT SIZE=+1>for="http://www.w3.org/PICS"</FONT></B>\r
+</PRE>\r
+<PRE><B><FONT SIZE=+1>generic=true</FONT></B>\r
+</PRE>\r
+<PRE><B><FONT SIZE=+1>rating=(age 10)&generic=true</FONT></B>\r
+</PRE>\r
+<P>\r
+The ends of lines are importants, because now, the database implementation\r
+use the same parser than the sample implementation.\r
+<H3>\r
+ Serving labels\r
+</H3>\r
+<P>\r
+Now let's turn <B>Jigsaw</B> into a label bureau. You will first need to\r
+define the label bureau database, as stated above. The label bureau is\r
+implemented as a special resource whose class is\r
+<A HREF="../api/w3c.jigsaw.pics.DataBaseBureauResource.html">w3c.jigsaw.pics.DataBaseBureauResource.</A>The\r
+first thing you will need to do is to hook up an instance of this resource\r
+in the appropriate place of your exported space. You can do this by poping\r
+the appropriate directory resource editor, for example by pointing your browser\r
+to <TT>/Admin/Editor</TT>. Select the <I>AddResource</I> link, and give the\r
+label's bureau name (e.g. <B>ratings</B>), and its class (which will always\r
+be <B>w3c.jigsaw.pics.DataBaseBureauResource</B>). Then go and edit its\r
+<TT>bureau</TT> parameter, you're all set.\r
+<P>\r
+Now, the <TT>http://<I>host</I>:<I>port</I>/ratings</TT> will handle the\r
+incoming queries for label.\r
+<P>\r
+ <HR>\r
+<P>\r
+<A HREF="mailto:jigsaw@w3.org">Jigsaw Team<BR>\r
+</A>$Id: pics.html,v 1.1 2010/06/15 12:20:54 smhuang Exp $\r
+</BODY></HTML>\r