|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.w3c.jigsaw.pics.SampleLabelService
The internal representation of a LabelService. A LabelService is an object which should be able to deliver labels for any URL. This implementation doesn't use any fancy database (it should), it uses the file system as a Database, in fact.
Each service is assigned a directory, and for each requested labels, this directory is looked up for the appropriate URL. So if you want to label http://www.w3.org/pub/WWW you have to create, under this service directory a file named http/www.w3.org/pub/WWW/label. To label its Overview.html document define the http/www.w3.org/pub/WWW/Overview.html-label file. The label itself is the content of the file.
Constructor Summary | |
SampleLabelService(SampleLabelBureau b,
java.lang.String name)
|
Method Summary | |
void |
dump(java.lang.StringBuffer into,
int format)
Dump this service description into the given buffer. |
java.io.File |
filify(java.net.URL u,
boolean generic)
Filify an URL. |
LabelInterface |
getGenericLabel(java.net.URL url)
Get the most speicific generic label for an URL. |
LabelInterface[] |
getGenericTreeLabels(java.net.URL url)
Get the generic tree labels for given URL. |
java.lang.String |
getName()
Get this service name. |
LabelInterface |
getSpecificLabel(java.net.URL url)
Get the specific label for the given URL. |
LabelInterface[] |
getTreeLabels(java.net.URL url)
Get the tree labels for the given URL. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public SampleLabelService(SampleLabelBureau b, java.lang.String name) throws org.w3c.jigsaw.pics.UnknownServiceException
Method Detail |
public java.io.File filify(java.net.URL u, boolean generic)
u
- The URL to filify.generic
- Filify for generic labels if true.public java.lang.String getName()
public void dump(java.lang.StringBuffer into, int format)
into
- The StringBuffer to dump the service to.public LabelInterface getSpecificLabel(java.net.URL url)
url
- The URL whose label is searched.public LabelInterface getGenericLabel(java.net.URL url)
url
- The URL whose generic label is to be retreived.public LabelInterface[] getTreeLabels(java.net.URL url)
url
- The URL whose tree labels are to be retreived.public LabelInterface[] getGenericTreeLabels(java.net.URL url)
url
- The URL whose tree labels are to be retreived.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |