Open SiteSearch 4.1.1
Final

ORG.oclc.webz
Class ZVerb

java.lang.Object
  |
  +--ORG.oclc.webz.Verb
        |
        +--ORG.oclc.webz.ZVerb
Direct Known Subclasses:
EXTSVC, FETCH, INIT, ISOILL, LOGOFF, SETDBAUTHO, ZQueryHandler

public class ZVerb
extends Verb

The ZVerb class is one of the baseline Z39.50 classes for implementing WebZ in Java. All WebZ Verbs that perform Z39.50 activities extend this class. It performs shared activities for those classes and defines shared variables as well.

See Also:
FailurePage, SuccessPage, WebZErrors, JavaPage, UserStateObject, ZUserData, ZServer, ZDb, DbResults, Log, AccessClient, AccessUserData

Field Summary
protected  int bytesIn
          integer data type containing the number of bytes in the incoming Z39.50 response.
protected  int bytesOut
          integer data type containing the number of bytes in the outgoing Z39.50 request.
protected  boolean dbGroupSearch
          boolean data type indicating whether the search is from a dbGroup type database signified by a database with a blank(' ') in it.
protected  String dbname
          String data type containing the database name for the Z39.50 transaction.
protected  String fmtClass
          String data type containing the input format class(fmtclass) for the present request.
protected  String format
          String data type containing the ElementSetName for the Z39.50 present request.
protected  DataPairs inputQueryInfo
          DataPairs object containing the display query, Z39.50 query, display limits, Z39.50 limits, and the query widget components for a Z39.50 search.
protected  int numrecs
          integer data type containing the number of records requested in the Z39.50 Search or Present request.
protected  int postings
          integer data type containing the number of postings in the resultSet from the Z39.50 Search or Present request.
protected  boolean ranked
          boolean data type indicating whether the search is a ranked search.
protected  int recno
          integer data type containing the starting record number in the Z39.50 Search or Present request.
protected  String resultSetName
          String data type containing the resultSetName for the Z39.50 Search request.
protected  boolean sorting
          boolean data type indicatating whether a sort is requested.
protected  boolean tempDb
          boolean data type indicating whether the search is from a temporary database (tdbname).
protected  boolean traceMsgs
          boolean data type indicating whether user tracing is active.
protected  Z39session z39session
          Z39session object containing Z39 client capabilities.
protected  ZDb zDb
          ZDb object containing the Z39.50 Database object for the transaction.
protected  String zQueryTerm
          String data type containing the Z39.50 query string returned from the Z3958 query parser.
protected  ZServer zServer
          ZServer object containing the Z39.50 Server object for the transaction.
protected  ZUserData zUserData
          ZUserData object containing the Z39.50 User State for the transaction.
 
Fields inherited from class ORG.oclc.webz.Verb
user, widgets
 
Constructor Summary
ZVerb()
          Constructs a ZVerb object.
 
Method Summary
protected  void doAccessControl(AccessControl a)
           
protected  void doSort(boolean fromQuery)
          Sorts the Z39.50 ResultSet based on the URL Sort Keys.
protected  void initZUser(boolean fResultSet)
          Initialzes the user for a Z39.50 activity.
protected  void restoreDbState()
          Restores the user's current database state after a "temporary" database search and saves the results from the temp db in corresponding entities that all start with t.
protected  void saveDbState()
          Saves the user's current search state in preparation for a "temporary" database (tdbname/tdisplaydbname) search or present.
protected  void saveRecs(Vector records)
          Saves the input Vector of DataDir records in the user entity named UnformattedRecordData to make it accessible to interface application classes.
 String toString()
          Generates a String representation of the object.
 
Methods inherited from class ORG.oclc.webz.Verb
runit, setUpPage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

zUserData

protected ZUserData zUserData
ZUserData object containing the Z39.50 User State for the transaction.

zServer

protected ZServer zServer
ZServer object containing the Z39.50 Server object for the transaction.

zDb

protected ZDb zDb
ZDb object containing the Z39.50 Database object for the transaction.

z39session

protected Z39session z39session
Z39session object containing Z39 client capabilities.

dbname

protected String dbname
String data type containing the database name for the Z39.50 transaction.

sorting

protected boolean sorting
boolean data type indicatating whether a sort is requested.

traceMsgs

protected boolean traceMsgs
boolean data type indicating whether user tracing is active.

tempDb

protected boolean tempDb
boolean data type indicating whether the search is from a temporary database (tdbname).

ranked

protected boolean ranked
boolean data type indicating whether the search is a ranked search.

dbGroupSearch

protected boolean dbGroupSearch
boolean data type indicating whether the search is from a dbGroup type database signified by a database with a blank(' ') in it.

zQueryTerm

protected String zQueryTerm
String data type containing the Z39.50 query string returned from the Z3958 query parser.

format

protected String format
String data type containing the ElementSetName for the Z39.50 present request.

fmtClass

protected String fmtClass
String data type containing the input format class(fmtclass) for the present request.

resultSetName

protected String resultSetName
String data type containing the resultSetName for the Z39.50 Search request.

inputQueryInfo

protected DataPairs inputQueryInfo
DataPairs object containing the display query, Z39.50 query, display limits, Z39.50 limits, and the query widget components for a Z39.50 search.

numrecs

protected int numrecs
integer data type containing the number of records requested in the Z39.50 Search or Present request.

recno

protected int recno
integer data type containing the starting record number in the Z39.50 Search or Present request.

postings

protected int postings
integer data type containing the number of postings in the resultSet from the Z39.50 Search or Present request.

bytesOut

protected int bytesOut
integer data type containing the number of bytes in the outgoing Z39.50 request.

bytesIn

protected int bytesIn
integer data type containing the number of bytes in the incoming Z39.50 response.
Constructor Detail

ZVerb

public ZVerb()
Constructs a ZVerb object.
Method Detail

saveRecs

protected void saveRecs(Vector records)
                 throws FailurePage
Saves the input Vector of DataDir records in the user entity named UnformattedRecordData to make it accessible to interface application classes.

initZUser

protected void initZUser(boolean fResultSet)
                  throws FailurePage
Initialzes the user for a Z39.50 activity. Sets up the ZUserData object, retrieves the database name from the input URL or last activity, and establishes access to the Z39.50 server and user's Z39session object.
Parameters:
fResultSet - to indicate whether a present(true) or a search(false) is the command.
Throws:
FailurePage - types of conditions: See WebZErrors for codes 1) ZUserData cannot be established 2) Database object is not found 3) Server object is not found 4) Z39session object is not found

doSort

protected void doSort(boolean fromQuery)
               throws FailurePage
Sorts the Z39.50 ResultSet based on the URL Sort Keys.
The entities sortcode and sortmsg are updated.
Parameters:
fromQuery - flag indicating whether the sort call is from query or fetch to determine the correct sort thresholds to use.
Throws:
FailurePage - types of conditions: See WebZErrors for codes 1) SuccessFul sort 2) ServerDoes not support sorting 3) Too many postings for sort 4) Invalid Sort Keys 5) Processing Error 6) Diagnotistic from Z39.50 server

saveDbState

protected void saveDbState()
Saves the user's current search state in preparation for a "temporary" database (tdbname/tdisplaydbname) search or present.

restoreDbState

protected void restoreDbState()
Restores the user's current database state after a "temporary" database search and saves the results from the temp db in corresponding entities that all start with t.

doAccessControl

protected void doAccessControl(AccessControl a)
                        throws Diagnostic1,
                               Exception,
                               FailurePage

toString

public String toString()
Generates a String representation of the object.
Returns:
String
Overrides:
toString in class Verb

Open SiteSearch 4.1.1
Final