ORG.oclc.webz
Class SCAN
java.lang.Object
|
+--ORG.oclc.webz.Verb
|
+--ORG.oclc.webz.ZVerb
|
+--ORG.oclc.webz.ZQueryHandler
|
+--ORG.oclc.webz.SCAN
- public class SCAN
- extends ZQueryHandler
The SCAN class is the WebZ Verb that performs a Z39.50 scan
and present. SCAN uses input
parameters contained in a RequestManager object, or a RequestManager object
and a string containing a URL. A successful execution of SCAN updates
the UserStateObject with results of the scan 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 SCAN class is to initialize the user for
Z39.50 activity, parse the URL input parameters to generate the appropriate
Z39.50 scan request, create and send the scan, store the scan results
in the user state, and set up the next command
to execute in the RequestManager object.
The URL widgets recognized by the SCAN class are:
dbname or tdbname - the database name
dbgroup - the group database name defining the scan attributes
for a database group.
numterms - the number of terms to retrieve in the scan
pos - the position of the scan query term within the scan
results
termxx - a query term
queryxx - a query term
indexxx - an index for the query term
next - the next command or page to process
bad - the failure command or page to process
The user state entities that are set as a result of a scan are:
dbname or tdbname - the database name(s) in the scan
dbgroup - the group database name defining the scan attributes
for a database group.
longdbname - the longname of the database
scanresults - a TermInfo object containing the scan results
scanquery - the query as sent in the Z39.50 request
displayscanquery - the query string suitable for display
scanindex - the index abbreviation for the scan term
numterms - the number of terms in the results
pos - the requested position of the scan term
code - the status of the scan - see WebZErrors
msg - the error message for the scan
qmsg the error message for query parsing failure
zcode - the Z39.50 error code - see Diagnostic1
zmsg - the Z39.50 error message
- See Also:
FailurePage
,
RequestManager
,
JavaPage
,
UserStateObject
,
ZDb
,
ZServer
,
ZUserData
,
ZQueryHandler
,
Z39scan
,
TermInfo
,
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 |
Constructor Summary |
SCAN()
Constructs a SCAN object. |
Method Summary |
protected void |
doScan()
Issues the Z39.50 scan request and stores scan results in the
UserStateObject. |
protected void |
parseParms()
Retrieves the scan parameters from the incoming URL and invokes the
Z3958 query parser to create a Z39.50 query string. |
void |
runit(RequestManager rMngr)
Executes the SCAN class using the parameters in the
RequestManager object. |
void |
runit(RequestManager rMngr,
String URLCmd)
Executes the SCAN class using the RequestManager object
and the input parameters contained in the URLCmd. |
SCAN
public SCAN()
- Constructs a SCAN object.
runit
public void runit(RequestManager rMngr)
- Executes the SCAN 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.
Successful execution of all steps sets up the next page for
execution.
- Parameters:
rMngr
- the RequestManager object- Overrides:
- runit in class Verb
runit
public void runit(RequestManager rMngr,
String URLCmd)
- Executes the SCAN class using the RequestManager object
and the input parameters contained in the URLCmd.
This is used when creating a SCAN object from
one of the application classes and sending in the
SCAN parameters in the URL String.
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.
Successful execution of all steps sets up the next page for
execution.
- Parameters:
rMngr
- the RequestManager objectURLCmd
- the command string with the widgets delimited by ":".
For example, SCAN:next=results.html:query=dog:numterms=14:pos=7
doScan
protected void doScan()
throws FailurePage
- Issues the Z39.50 scan request and stores scan results in the
UserStateObject.
- Throws:
- FailurePage - unable to issue the Z39.50 Scan or the Scan
request returned an error.
parseParms
protected void parseParms()
throws FailurePage
- Retrieves the scan parameters from the incoming URL and invokes the
Z3958 query parser to create a Z39.50 query string.
- Throws:
- FailurePage - the ZQueryHandler class is unable to create
a Z39.50 query term