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 org.w3c.tools.resources.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.
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,
slowpickle,
values |
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 org.w3c.jigsaw.http.Reply |
getGenericLabels(org.w3c.jigsaw.http.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 org.w3c.jigsaw.http.Reply |
getGenericTreeLabels(org.w3c.jigsaw.http.Request request,
int format,
java.lang.String[] urls,
java.lang.String[] services,
URLDecoder data)
Get generic tree labels. |
protected org.w3c.jigsaw.http.Reply |
getNormalLabels(org.w3c.jigsaw.http.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 org.w3c.jigsaw.http.Reply |
getTreeLabels(org.w3c.jigsaw.http.Request request,
int format,
java.lang.String[] urls,
java.lang.String[] services,
URLDecoder data)
Get tree labels. |
void |
initialize(java.lang.Object[] values)
|
protected org.w3c.jigsaw.http.Reply |
makePICSErrorReply(org.w3c.jigsaw.http.Request request,
java.lang.String msg)
|
protected org.w3c.jigsaw.http.Reply |
makePICSReply(org.w3c.jigsaw.http.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,
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,
pickle,
print,
setBoolean,
setChar,
setDouble,
setFloat,
setInt,
setLong,
setString,
setValue,
unpickle,
unpickle,
unpickle,
unpickleInstance,
unpickleInstance |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
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:
LabelBureauResource
public LabelBureauResource()
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 org.w3c.jigsaw.http.Reply makePICSReply(org.w3c.jigsaw.http.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 org.w3c.jigsaw.http.Reply makePICSErrorReply(org.w3c.jigsaw.http.Request request,
java.lang.String msg)
getGenericLabels
protected org.w3c.jigsaw.http.Reply getGenericLabels(org.w3c.jigsaw.http.Request request,
int format,
java.lang.String[] urls,
java.lang.String[] services,
URLDecoder data)
throws org.w3c.jigsaw.http.HTTPException
- Get the generic labels for a set of service and a set of urls.
- Parameters:
request
- the incomminmg requestformat
- the pics formaturls
- the urls to labelservices
- the services to askdata
- the URLDecoder- Returns:
- A Reply instance
- Throws:
- org.w3c.jigsaw.http.HTTPException - if processing the request failed.
getNormalLabels
protected org.w3c.jigsaw.http.Reply getNormalLabels(org.w3c.jigsaw.http.Request request,
int format,
java.lang.String[] urls,
java.lang.String[] services,
URLDecoder data)
throws org.w3c.jigsaw.http.HTTPException
- Get the normal (generic or specific) labels.
- Parameters:
request
- the incomminmg requestformat
- the pics formaturls
- the urls to labelservices
- the services to askdata
- the URLDecoder- Returns:
- A Reply instance
- Throws:
- org.w3c.jigsaw.http.HTTPException - if processing the request failed.
getTreeLabels
protected org.w3c.jigsaw.http.Reply getTreeLabels(org.w3c.jigsaw.http.Request request,
int format,
java.lang.String[] urls,
java.lang.String[] services,
URLDecoder data)
throws org.w3c.jigsaw.http.HTTPException
- Get tree labels.
- Parameters:
request
- the incomminmg requestformat
- the pics formaturls
- the urls to labelservices
- the services to askdata
- the URLDecoder- Returns:
- A Reply instance
- Throws:
- org.w3c.jigsaw.http.HTTPException - if processing the request failed.
getGenericTreeLabels
protected org.w3c.jigsaw.http.Reply getGenericTreeLabels(org.w3c.jigsaw.http.Request request,
int format,
java.lang.String[] urls,
java.lang.String[] services,
URLDecoder data)
throws org.w3c.jigsaw.http.HTTPException
- Get generic tree labels.
- Parameters:
request
- the incomminmg requestformat
- the pics formaturls
- the urls to labelservices
- the services to askdata
- the URLDecoder- Returns:
- A Reply instance
- Throws:
- org.w3c.jigsaw.http.HTTPException - if processing the request failed.
setValue
public void setValue(int idx,
java.lang.Object value)
- Overrides:
- setValue in class org.w3c.tools.resources.FramedResource
initialize
public void initialize(java.lang.Object[] values)
- Overrides:
- initialize in class org.w3c.tools.resources.FramedResource