Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.w3c.jigsaw.pics
Class 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.

Field Summary
`protected static int` | `ATTR_BUREAU_DEBUG` Attribute index - debug flag.
`protected static int` | `ATTR_BUREAU_IDENTIFIER` Attribute index - Our label bureau identifier.
`protected static int` | `ATTR_BUREAU_SERVICES` Attribute index - Our label bureau identifier.
`protected LabelBureauInterface` | `bureau` Our loaded label bureau:

Fields inherited from class org.w3c.tools.resources.FramedResource
`ATTR_OID, attrListener, debugEvent, event_disabled, framesRef, structListener`

Fields inherited from class org.w3c.tools.resources.Resource
`ATTR_CONTEXT, ATTR_HELP_URL, ATTR_IDENTIFIER, ATTR_LAST_MODIFIED, ATTR_PARENT, ATTR_RESOURCE_FRAMES, ATTR_STORE_ENTRY, ATTR_URL`

Fields inherited from class org.w3c.tools.resources.AttributeHolder
`attributes, values`

Constructor Summary
`LabelBureauResource()`

Method Summary
`protected void` | `acquireBureau()` Check that we have loaded our bureau, or load it.
`java.io.File` | `getBureauIdentifier()` Get our label bureau identifier.
`boolean` | `getDebugFlag()`
`protected Reply` | `getGenericLabels(Request request, int format, java.lang.String[] urls, java.lang.String[] services, URLDecoder data)` Get the generic labels for a set of service and a set of urls.
`protected Reply` | `getGenericTreeLabels(Request request, int format, java.lang.String[] urls, java.lang.String[] services, URLDecoder data)` Get generic tree labels.
`protected Reply` | `getNormalLabels(Request request, int format, java.lang.String[] urls, java.lang.String[] services, URLDecoder data)` Get the normal (generic or specific) labels.
`java.lang.String[]` | `getServices()` Get the service list
`protected Reply` | `getTreeLabels(Request request, int format, java.lang.String[] urls, java.lang.String[] services, URLDecoder data)` Get tree labels.
`void` | `initialize(java.lang.Object[] values)`
`protected Reply` | `makePICSErrorReply(Request request, java.lang.String msg)`
`protected Reply` | `makePICSReply(Request request, java.lang.StringBuffer buffer)` Build a PICS reply out of the given content.
`void` | `setValue(int idx, java.lang.Object value)`

Methods inherited from class org.w3c.tools.resources.FramedResource
`addAttributeChangedListener, addStructureChangedListener, collectFramesReference, delete, disableEvent, displayEvent, enableEvent, eventDisabled, fireAttributeChangeEvent, fireStructureChangedEvent, fireStructureChangedEvent, frameAdded, frameModified, frameRemoved, getClone, getFrame, getFrame, getFrameReference, getFrameReference, getFramesReference, getOid, lookup, markModified, notifyUnload, perform, performFrames, postAttributeChangeEvent, postEvent, postStructureChangedEvent, postStructureChangedEvent, processEvent, registerFrame, registerFrameIfNone, removeAttributeChangedListener, removeStructureChangedListener, unregisterFrame`

Methods inherited from class org.w3c.tools.resources.Resource
`acceptUnload, checkMultipleLock, collectFrames, getContext, getFrame, getFrames, getHelpURL, getHelpURL, getIdentifier, getLastModified, getParent, getResourceReference, getServer, getSpace, getSpaceEntry, getStoreEntry, getURLPath, getValue, getValue, isInitialized, isUnloaded, setContext, setContext, setValue, updateAttributes`

Methods inherited from class org.w3c.tools.resources.AttributeHolder
`definesAttribute, definesAttribute, getAttributes, getBoolean, getChar, getClone, getClone, getDouble, getFloat, getInt, getLong, getString, getValue, initialize, lookupAttribute, pickleValues, print, setBoolean, setChar, setDouble, setFloat, setInt, setLong, setString, setValue`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ATTR_BUREAU_IDENTIFIER

    protected static int ATTR_BUREAU_IDENTIFIER

  Attribute index - Our label bureau identifier.

### ATTR_BUREAU_SERVICES

    protected static int ATTR_BUREAU_SERVICES

  Attribute index - Our label bureau identifier.

### ATTR_BUREAU_DEBUG

    protected static int ATTR_BUREAU_DEBUG

  Attribute index - debug flag.

### bureau

    protected LabelBureauInterface bureau

  Our loaded label bureau:

Constructor Detail

### LabelBureauResource

    public LabelBureauResource()

Method Detail

### getBureauIdentifier

    public java.io.File getBureauIdentifier()

  Get our label bureau identifier.

### getServices

    public java.lang.String[] getServices()

  Get the service list

### getDebugFlag

    public boolean getDebugFlag()

### acquireBureau

    protected final void acquireBureau()

  Check that we have loaded our bureau, or load it.

### makePICSReply

    protected Reply makePICSReply(Request request,
                                  java.lang.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.

### makePICSErrorReply

    protected Reply makePICSErrorReply(Request request,
                                       java.lang.String msg)

### getGenericLabels

    protected Reply getGenericLabels(Request request,
                                     int format,
                                     java.lang.String[] urls,
                                     java.lang.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.

### getNormalLabels

    protected Reply getNormalLabels(Request request,
                                    int format,
                                    java.lang.String[] urls,
                                    java.lang.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.

### getTreeLabels

    protected Reply getTreeLabels(Request request,
                                  int format,
                                  java.lang.String[] urls,
                                  java.lang.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.

### getGenericTreeLabels

    protected Reply getGenericTreeLabels(Request request,
                                         int format,
                                         java.lang.String[] urls,
                                         java.lang.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.

### setValue

    public void setValue(int idx,
                         java.lang.Object value)

  Overrides:
    setValue in class FramedResource

### initialize

    public void initialize(java.lang.Object[] values)

  Overrides:
    initialize in class FramedResource

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD