Open SiteSearch 4.1.1
Final

ORG.oclc.webz
Class FETCH

java.lang.Object
  |
  +--ORG.oclc.webz.Verb
        |
        +--ORG.oclc.webz.ZVerb
              |
              +--ORG.oclc.webz.FETCH
Direct Known Subclasses:
BookMark, ImageFETCH

public class FETCH
extends ZVerb

The FETCH class is the WebZ Verb that performs a Z39.50 present. FETCH uses input parameters contained in a RequestManager object, or a RequestManager object and a string containing a URL. A successful execution of FETCH updates the UserStateObject with results of the present and sets up the next page or command for execution in the RequestManager object. If a failure 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 FETCH class is to initialize the user for Z39.50 activity, parse the URL input parameters to generate the appropriate Z39.50 present request, perform a Z39.50 sort request if specified, create and send the present, save the unformatted records from the request in the user state, and set up the next command to execute in the RequestManager object.

The URL widgets recognized by the FETCH class are:
resultsetname - the resultset to present records from
tdisplaydbname - makes the present from a temporary database
format - the element set name for record retrieval
numrecs - the number of records to retrieve
recno - the record number of the first record to retrieve
fmtclass - the name of the format class for formatting records
next - the next command or page to process
bad - the failure command or page to process
keynn - a sort key for requesting sort on the present
directionnn - a sort key direction (a) or (d)

The present results are stored in the user's ZUserData object and are accessible using retrieval methods based on the resultset name of the search. The user state entities that are set as a result of a present are:
displaydbname - the database name corresponding the database records returned from the present
longdisplaydbname - the longname of the displaydbname database
format - the element set name
numrecs - the number of records requested
returnednumrecs - the number of records returned
fmtclass - the formatting class
UnformattedRecordData - the Vector object containing the unformatted records returned from the present
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
sortstatus - the status code from a sort - see WebZErrors
sortmsg - the sort error message

See Also:
FailurePage, RequestManager, JavaPage, UserStateObject, ZDb, ZServer, ZUserData, Z39present, DbResults, Log

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
 
Fields inherited from class ORG.oclc.webz.Verb
user, widgets
 
Constructor Summary
FETCH()
          Constructs a FETCH object.
 
Method Summary
protected  void doPresent()
          Issues the Z39.50 present request and stores present results in the UserStateObject.
protected  void parseParms()
          Retrieves the present parameters from the incoming URL.
 void runit(RequestManager rMngr)
          Executes the FETCH class using the parameters in the RequestManager object.
 void runit(RequestManager rMngr, String URLCmd)
          Executes the FETCH class using the RequestManager object and the input parameters contained in the URLCmd.
 
Methods inherited from class ORG.oclc.webz.ZVerb
doAccessControl, doSort, initZUser, restoreDbState, saveDbState, saveRecs, toString
 
Methods inherited from class ORG.oclc.webz.Verb
setUpPage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FETCH

public FETCH()
Constructs a FETCH object.
Method Detail

runit

public void runit(RequestManager rMngr)
Executes the FETCH 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 next page is set up for execution upon return
Parameters:
rMngr - the RequestManager object
Overrides:
runit in class Verb

runit

public void runit(RequestManager rMngr,
                  String URLCmd)
Executes the FETCH class using the RequestManager object and the input parameters contained in the URLCmd. This would be used when creating a FETCH 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 next page is set up for execution upon return
Parameters:
rMngr - the RequestManager object
URLCmd - the command string with the widgets delimited by ":". For example, FETCH:next=results.html:resultset=1:format=F

parseParms

protected void parseParms()
                   throws FailurePage
Retrieves the present parameters from the incoming URL.
Throws:
FailurePage - no recno specified in the request

doPresent

protected void doPresent()
                  throws FailurePage
Issues the Z39.50 present request and stores present results in the UserStateObject.
Throws:
FailurePage - unable to issue the Z39.50 Present or the Present request returned an error.

Open SiteSearch 4.1.1
Final