|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.w3c.jigsaw.pics.SampleLabelBureau
public class SampleLabelBureau
This class implements a label bureau. The database for labels is provided by the underlying file system. The organisation is as follows:
The LabelBureau is attached to some directory D. For each service it handles, you have to create a subdirectory, according to the service name (its identifying URL). So for example, if you want to provide ratings as www.rating.com, you will have to create a D/www.rating.com directory.
Uner this service directory, for each site you want to label, you have to create a sub-directory. In our example, if our rating service wants to label www.w3.org, you will have to create a D/www.rating.com/www.w3.org directory. This directory should reflect the space of the labeled server (ie having the same file hierarchy), and each file should be the label itself (as transmited).
In our example, if the LabelBureau wants to find the label by www.rating.com for http://www.w3.org/pub/WWW/Overview.html, it will look for the file D/www.rating.com/http/www.w3.org/pub/WWW/Overview.html-label .
So, we really use the underlying file system as a database for labels.
FIXME: the LabelBureau should be an interface, same stands for the LabelService and Label classes.
Field Summary |
---|
Fields inherited from interface org.w3c.jigsaw.pics.LabelBureauInterface |
---|
FMT_FULL, FMT_MINIMAL, FMT_SHORT, FMT_SIGNED |
Constructor Summary | |
---|---|
SampleLabelBureau(java.io.File directory)
Create a new LabelBureau. |
Method Summary | |
---|---|
java.lang.String |
getIdentifier()
Get this label bureau directory. |
LabelServiceInterface |
getLabelService(java.lang.String url)
Lookup for the given service in this bureau. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SampleLabelBureau(java.io.File directory)
directory
- This bureau root directory.LabelServiceInterface
Method Detail |
---|
public java.lang.String getIdentifier()
getIdentifier
in interface LabelBureauInterface
public LabelServiceInterface getLabelService(java.lang.String url)
getLabelService
in interface LabelBureauInterface
name
- The service name.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |