All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.pics.LabelBureauResource

java.lang.Object
   |
   +----w3c.tools.store.AttributeHolder
           |
           +----w3c.tools.store.Resource
                   |
                   +----w3c.jigsaw.resources.HTTPResource
                           |
                           +----w3c.jigsaw.resources.FilteredResource
                                   |
                                   +----w3c.jigsaw.resources.FileResource
                                           |
                                           +----w3c.jigsaw.forms.PostableResource
                                                   |
                                                   +----w3c.jigsaw.pics.LabelBureauResource

public class LabelBureauResource
extends PostableResource
An HTTP interface to query a Label bureau. This conforms to the PICS protocol specification.

This entity defines the following parameter:

The list of parameters
Parameter name Semantics Default value Type
bureau Name of the LabelBureau database none java.lang.String

This entity also inherits the parameters from the PostableResource.

See Also:
PostableResource

Variable Index

 o APPLICATION_PICSLABEL
 o ATTR_BUREAU_IDENTIFIER
Attribute index - Our label bureau identifier.
 o bureau
Our loaded lable bureau:

Constructor Index

 o LabelBureauResource()

Method Index

 o acquireBureau()
Check that we have loaded our bureau, or load it.
 o getBureauIdentifier()
Get our label bureau identifier.
 o getGenericLabels(Request, int, String[], String[], URLDecoder)
Get the generic labels for a set of service and a set of urls.
 o getGenericTreeLabels(Request, int, String[], String[], URLDecoder)
Get generic tree labels.
 o getNormalLabels(Request, int, String[], String[], URLDecoder)
Get the normal (generic or specific) labels.
 o getTreeLabels(Request, int, String[], String[], URLDecoder)
Get tree labels.
 o handle(Request, URLDecoder)
Handle the form submission, after posted data parsing.
 o initialize(Object[])
Setup the list of allowed methods.
 o makePICSReply(Request, StringBuffer)
Build a PICS reply out of the given content.
 o parseFormat(Request, String)
Get the integer code for the String based PICS format.
 o parseURLs(String[])
Parse the URLs given in the URLDecoder, as the u field.

Variables

 o APPLICATION_PICSLABEL
 public static HttpMimeType APPLICATION_PICSLABEL
 o ATTR_BUREAU_IDENTIFIER
 protected static int ATTR_BUREAU_IDENTIFIER
Attribute index - Our label bureau identifier.

 o bureau
 protected LabelBureauInterface bureau
Our loaded lable bureau:

Constructors

 o LabelBureauResource
 public LabelBureauResource()

Methods

 o getBureauIdentifier
 public File getBureauIdentifier()
Get our label bureau identifier.

 o acquireBureau
 protected final void acquireBureau()
Check that we have loaded our bureau, or load it.

 o parseFormat
 protected int parseFormat(Request request,
                           String format) throws HTTPException
Get the integer code for the String based PICS format.

Parameters:
request - The request to be handled.
format - The string representation of the format.
Returns:
An LabelBureauInterface defined format code.
See Also:
LabelBureauInterface
 o parseURLs
 protected String[] parseURLs(String us[])
Parse the URLs given in the URLDecoder, as the u field. This method just unquote any quoted URLs, before sending them back.

Parameters:
data - The URLDecoder to get data from.
Returns:
An array of String, properly parsed.
 o makePICSReply
 protected Reply makePICSReply(Request request,
                               StringBuffer buffer)
Build a PICS reply out of the given content.

Parameters:
request - The request to reply to.
sb - The StringBuffer containing the content to send back.
 o getGenericLabels
 protected Reply getGenericLabels(Request request,
                                  int format,
                                  String urls[],
                                  String services[],
                                  URLDecoder data) throws HTTPException
Get the generic labels for a set of service and a set of urls.

 o getNormalLabels
 protected Reply getNormalLabels(Request request,
                                 int format,
                                 String urls[],
                                 String services[],
                                 URLDecoder data) throws HTTPException
Get the normal (generic or specific) labels.

 o getTreeLabels
 protected Reply getTreeLabels(Request request,
                               int format,
                               String urls[],
                               String services[],
                               URLDecoder data) throws HTTPException
Get tree labels.

 o getGenericTreeLabels
 protected Reply getGenericTreeLabels(Request request,
                                      int format,
                                      String urls[],
                                      String services[],
                                      URLDecoder data) throws HTTPException
Get generic tree labels.

 o handle
 public Reply handle(Request request,
                     URLDecoder data) throws HTTPException
Handle the form submission, after posted data parsing.

Overrides:
handle in class PostableResource
 o initialize
 public void initialize(Object values[])
Setup the list of allowed methods.

Overrides:
initialize in class PostableResource

All Packages  Class Hierarchy  This Package  Previous  Next  Index