|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
An HTTP interface to query a Label bureau. This conforms to the PICS protocol specification.
This entity defines the following parameter:
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, co, id |
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)
Initialize the frames of that framed resource. |
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)
Set some of this resource attribute. |
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, initialize, isInitialized, isUnloaded, pickleValues, setContext, setContext, setValue, unsafeGetContext, unsafeGetFrame, unsafeGetFrames, unsafeGetIdentifier, unsafeGetResourceReference, unsafeGetURLPath, unsafeGetValue, updateAttributes |
Methods inherited from class org.w3c.tools.resources.AttributeHolder |
---|
definesAttribute, definesAttribute, getAttributes, getBoolean, getChar, getClone, getClone, getDouble, getFloat, getInt, getLong, getString, getValue, lookupAttribute, print, setBoolean, setChar, setDouble, setFloat, setInt, setLong, setString, setValue, unsafeDefinesAttribute, unsafeGetDouble, unsafeGetString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static int ATTR_BUREAU_IDENTIFIER
protected static int ATTR_BUREAU_SERVICES
protected static int ATTR_BUREAU_DEBUG
protected LabelBureauInterface bureau
Constructor Detail |
---|
public LabelBureauResource()
Method Detail |
---|
public java.io.File getBureauIdentifier()
public java.lang.String[] getServices()
public boolean getDebugFlag()
protected final void acquireBureau()
protected Reply makePICSReply(Request request, java.lang.StringBuffer buffer)
request
- The request to reply to.sb
- The StringBuffer containing the content to send back.protected Reply makePICSErrorReply(Request request, java.lang.String msg)
protected Reply getGenericLabels(Request request, int format, java.lang.String[] urls, java.lang.String[] services, URLDecoder data) throws HTTPException
request
- the incomminmg requestformat
- the pics formaturls
- the urls to labelservices
- the services to askdata
- the URLDecoder
HTTPException
- if processing the request failed.protected Reply getNormalLabels(Request request, int format, java.lang.String[] urls, java.lang.String[] services, URLDecoder data) throws HTTPException
request
- the incomminmg requestformat
- the pics formaturls
- the urls to labelservices
- the services to askdata
- the URLDecoder
HTTPException
- if processing the request failed.protected Reply getTreeLabels(Request request, int format, java.lang.String[] urls, java.lang.String[] services, URLDecoder data) throws HTTPException
request
- the incomminmg requestformat
- the pics formaturls
- the urls to labelservices
- the services to askdata
- the URLDecoder
HTTPException
- if processing the request failed.protected Reply getGenericTreeLabels(Request request, int format, java.lang.String[] urls, java.lang.String[] services, URLDecoder data) throws HTTPException
request
- the incomminmg requestformat
- the pics formaturls
- the urls to labelservices
- the services to askdata
- the URLDecoder
HTTPException
- if processing the request failed.public void setValue(int idx, java.lang.Object value)
FramedResource
setValue
in class FramedResource
idx
- The index of the attribute to modify.value
- The new attribute value.public void initialize(java.lang.Object[] values)
FramedResource
initialize
in class FramedResource
values
- Default attribute values.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |