| java.lang.Object org.w3c.jigsaw.pics.SampleLabelService
SampleLabelService | public class SampleLabelService implements LabelServiceInterface(Code) | | 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.
|
dump | public void dump(StringBuffer into, int format)(Code) | | Dump this service description into the given buffer.
Parameters: into - The StringBuffer to dump the service to. |
filify | public File filify(URL u, boolean generic)(Code) | | Filify an URL.
This methods takes an URL as input, and returns an uniq File object
relative to the given SampleLabelService directory.
Parameters: u - The URL to filify. Parameters: generic - Filify for generic labels if true. |
getGenericLabel | public LabelInterface getGenericLabel(URL url)(Code) | | Get the most speicific generic label for an URL.
Parameters: url - The URL whose generic label is to be retreived. An object conforming to the LabelInterface, ornull if none was found. |
getGenericTreeLabels | public LabelInterface[] getGenericTreeLabels(URL url)(Code) | | Get the generic tree labels for given URL.
Parameters: url - The URL whose tree labels are to be retreived. An array of SampleLabel, each of which conforms to the LabelInterface. |
getName | public String getName()(Code) | | Get this service name.
A String instance, being the service name. |
getSpecificLabel | public LabelInterface getSpecificLabel(URL url)(Code) | | Get the specific label for the given URL.
Parameters: url - The URL whose label is searched. |
getTreeLabels | public LabelInterface[] getTreeLabels(URL url)(Code) | | Get the tree labels for the given URL.
Parameters: url - The URL whose tree labels are to be retreived. An array of SampleLabel, each comforming to the LabelInterface. |
|
|