ORG.oclc.webz
Class ImageFETCH
java.lang.Object
|
+--ORG.oclc.webz.Verb
|
+--ORG.oclc.webz.ZVerb
|
+--ORG.oclc.webz.FETCH
|
+--ORG.oclc.webz.ImageFETCH
- public class ImageFETCH
- extends FETCH
The ImageFETCH class is the WebZ Verb that is specialized to
perform Z39.50 present requests for binary images stored in a
newton database.
ImageFETCH uses input
parameters contained in a RequestManager object, or a RequestManager object
and a string containing a URL. A successful execution of ImageFETCH creates
an HTTP response containing the binary image with the appropriate HTTP
headers.
If a failure occurs,
occurs, the user variables code and msg are updated to
contain the reason and the bad page or command for execution
is set up in the RequestManager.
The processing flow of the ImageFETCH class is to initialize the user for
Z39.50 activity, parse the URL input parameters to generate the appropriate
Z39.50 present request, create and send the present, create the appropriate
HTTP response for the binary data, and set up the HTTP response
in the RequestManager object for delivery to the browser. If the image
data returned is a GIF, appropriate conversion to TIFF format is done.
The URL widgets recognized by the ImageFETCH class are:
resultsetname - the resultset to present records from
numrecs - the number of records to retrieve
recno - the record number of the record to retrieve
item - the item number(page) within the record to retrieve
scale - for gif data, the scale to size the tiff response to:
where valid scales are: 2, 3, 4, 6, 25 where 2 is the largest.
bad - the failure command or page to process
The user state entities that are set as a result
of the present are:
displaydbname - the database name corresponding the database
records returned from the present
longdisplaydbname - the longname of the displaydbname database
numrecs - the number of records requested
returnednumrecs - the number of records returned
recno - the record number for a multi-record request
fullrecno - the record number for a format=F request
code - the status of the present - see WebZErrors
msg - the error message for the present
zcode - the Z39.50 error code - see Diagnostic1
zmsg - the Z39.50 error message
- See Also:
ImageInfo
,
FailurePage
,
RequestManager
,
JavaPage
,
UserStateObject
,
ZDb
,
ZServer
,
ZUserData
,
Z39present
Fields inherited from class ORG.oclc.webz.ZVerb |
bytesIn,
bytesOut,
dbGroupSearch,
dbname,
fmtClass,
format,
inputQueryInfo,
numrecs,
postings,
ranked,
recno,
resultSetName,
sorting,
tempDb,
traceMsgs,
z39session,
zDb,
zQueryTerm,
zServer,
zUserData |
Constructor Summary |
ImageFETCH()
Constructs an ImageFETCH object. |
Method Summary |
protected void |
doPresent()
Issues the Z39.50 present request for the image database
records. |
protected void |
parseParms()
|
void |
runit(RequestManager rMngr)
Executes the ImageFETCH class using the parameters in the
RequestManager object. |
void |
runit(RequestManager rMngr,
String URLCmd)
Executes the ImageFETCH class using the RequestManager object
and the input parameters contained in the URLCmd. |
ImageFETCH
public ImageFETCH()
- Constructs an ImageFETCH object.
runit
public void runit(RequestManager rMngr)
- Executes the ImageFETCH class using the parameters in the
RequestManager object.
Each method called from the runit() method can throw
a FailurePage exception. If this occurs, the catch logic for the
exceptions invokes setup of the bad page or command to execute upon
return.
If the request is successfully executed, the HTTP Response is
set up in the RequestManager object.
- Parameters:
rMngr
- the RequestManager object- Overrides:
- runit in class FETCH
runit
public void runit(RequestManager rMngr,
String URLCmd)
- Executes the ImageFETCH class using the RequestManager object
and the input parameters contained in the URLCmd.
This would be used when creating an imageFETCH object from
one of the application classes.
Each method called from the runit() method can throw
a FailurePage exception. If this occurs, the catch logic for the
exceptions invokes setup of the bad page or command to execute upon
return.
If the request is successfully executed, the HTTP Response is
set up in the RequestManager object.
- Parameters:
rMngr
- the RequestManager objectURLCmd
- the command string with the widgets delimited by ":"
For example, ImageFETCH:resultset=1:item=5:scale=3- Overrides:
- runit in class FETCH
parseParms
protected void parseParms()
throws FailurePage
- Overrides:
- parseParms in class FETCH
doPresent
protected void doPresent()
throws FailurePage
- Issues the Z39.50 present request for the image database
records.
- Throws:
- FailurePage - unable to issue the Z39.50 Present or the
Present request returned an error.
- Overrides:
- doPresent in class FETCH