All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.w3c.jigsaw.pics.LabelBureauResource

java.lang.Object
   |
   +----org.w3c.tools.resources.AttributeHolder
           |
           +----org.w3c.tools.resources.Resource
                   |
                   +----org.w3c.tools.resources.FramedResource
                           |
                           +----org.w3c.jigsaw.pics.LabelBureauResource

public class LabelBureauResource
extends FramedResource
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.


Variable Index

 o ATTR_BUREAU_DEBUG
Attribute index - debug flag.
 o ATTR_BUREAU_IDENTIFIER
Attribute index - Our label bureau identifier.
 o ATTR_BUREAU_SERVICES
Attribute index - Our label bureau identifier.
 o bureau
Our loaded label 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 getDebugFlag()
 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 getServices()
Get the service list
 o getTreeLabels(Request, int, String[], String[], URLDecoder)
Get tree labels.
 o initialize(Object[])
Initialize the frames of that framed resource.
 o makePICSErrorReply(Request, String)
 o makePICSReply(Request, StringBuffer)
Build a PICS reply out of the given content.
 o setValue(int, Object)
Set some of this resource attribute.

Variables

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

 o ATTR_BUREAU_SERVICES
 protected static int ATTR_BUREAU_SERVICES
Attribute index - Our label bureau identifier.

 o ATTR_BUREAU_DEBUG
 protected static int ATTR_BUREAU_DEBUG
Attribute index - debug flag.

 o bureau
 protected LabelBureauInterface bureau
Our loaded label bureau:

Constructors

 o LabelBureauResource
 public LabelBureauResource()

Methods

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

 o getServices
 public String[] getServices()
Get the service list

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

 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 makePICSErrorReply
 protected Reply makePICSErrorReply(Request request,
                                    String msg)
 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.

Parameters:
request - the incomminmg request
format - the pics format
urls - the urls to label
services - the services to ask
data - the URLDecoder
Returns:
A Reply instance
Throws: HTTPException
if processing the request failed.
 o getNormalLabels
 protected Reply getNormalLabels(Request request,
                                 int format,
                                 String urls[],
                                 String services[],
                                 URLDecoder data) throws HTTPException
Get the normal (generic or specific) labels.

Parameters:
request - the incomminmg request
format - the pics format
urls - the urls to label
services - the services to ask
data - the URLDecoder
Returns:
A Reply instance
Throws: HTTPException
if processing the request failed.
 o getTreeLabels
 protected Reply getTreeLabels(Request request,
                               int format,
                               String urls[],
                               String services[],
                               URLDecoder data) throws HTTPException
Get tree labels.

Parameters:
request - the incomminmg request
format - the pics format
urls - the urls to label
services - the services to ask
data - the URLDecoder
Returns:
A Reply instance
Throws: HTTPException
if processing the request failed.
 o getGenericTreeLabels
 protected Reply getGenericTreeLabels(Request request,
                                      int format,
                                      String urls[],
                                      String services[],
                                      URLDecoder data) throws HTTPException
Get generic tree labels.

Parameters:
request - the incomminmg request
format - the pics format
urls - the urls to label
services - the services to ask
data - the URLDecoder
Returns:
A Reply instance
Throws: HTTPException
if processing the request failed.
 o setValue
 public void setValue(int idx,
                      Object value)
Set some of this resource attribute.

Overrides:
setValue in class FramedResource
 o initialize
 public void initialize(Object values[])
Initialize the frames of that framed resource.

Overrides:
initialize in class FramedResource

All Packages  Class Hierarchy  This Package  Previous  Next  Index