    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class w3c.jigsaw.pics.DataBaseBureauResource

    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
                                                               |
                                                               +----w3c.jigsaw.pics.DataBaseBureauResource

public class DataBaseBureauResource
extends LabelBureauResource

An HTTP interface to query a DataBase Label bureau. This conforms to the PICS protocol specification. This resource accept PUT request to register labels and GET request to deliver PICS labels or information about the services. In the future the label will be store in PICS format.

##

DataBaseBureauResource()

##

handle(Request, URLDecoder)
  handle get request.
put(Request)
  Used to register labels in the DataBaseBureau.

##

DataBaseBureauResource

     public DataBaseBureauResource()

##

put

     public Reply put(Request request)

  Used to register labels in the DataBaseBureau. Here is the detailed PUT request specification :
  PUT uri HTTP1.x
  service=service url&
  url=the url to label&
  label=the label in the alternative format&
  generic=[true|false]& (is the label generic?)
  overwrite=[true|false]& (overwrite existing label?)
  createservice=[true|false] (create service?)

  Parameters:
    request - The request to handle.
  Returns:
    Reply witch can have the followings codes values :
    - HTTP.CREATED (label registered)
    - HTTP.CONTINUE (url already labeled)
    - HTTP.SERVICE_UNAVAILABLE (service doesn't exist in this bureau)
    - HTTP.INTERNAL_SERVER_ERROR
    - HTTP.BAD_REQUEST (may be a malformed url)
  Overrides:
    put in class FileResource

handle

     public Reply handle(Request request,
                         URLDecoder data) throws HTTPException

  handle get request. Here is the detailed get request specification :
  HTTP1.0 /GET
  opt=[generic|normal|tree|generic+tree|insert|delete|list|services]&
  s=the label service&
  u=the url to label&
  label=the label in the alternative format&
  generic=[true|false] (is the label generic?)

  - opt=[generic|normal|tree|generic+tree] :
    classic PICS request. Require : s, u.
  - opt=insert :
    register label for url (u) in the service (s). Require : s, u, label, generic.
  - opt=delete :
    delete label for url (u) in the service (s). Require : s, u.
  - opt=services :
    This request return the services list in the reply :
    http://www.service1.com& http://www.service2.com
  - opt=list :
    this request return a HTML reply witch is the labels list of the service (s). Require : s.

  Overrides:
    handle in class LabelBureauResource

    All Packages  Class Hierarchy  This Package  Previous  Next  Index