All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ORG.oclc.z39.client.Z39scan

java.lang.Object
   |
   +----ORG.oclc.z39.client.Z39scan

public class Z39scan
extends Object
Z39scan creates ScanRequests and translates ScanResponses.

Version:
@(#)Z39scan.java 1.1 07/09/97

Variable Index

 o errorCode
Error code if Scan failed.
 o errorMsg
Error message if Scan failed.
 o numberOfEntriesReturned
Number of terms returned.
 o referenceId
Value passed to Request and returned by a target Z39.50 server and Response stores it here.
 o scanStatus
Status.
 o terms
Scan results
 o zsession
Z39session

Constructor Index

 o Z39scan()
 o Z39scan(Z39session)

Method Index

 o doScan(int, String, String, String, int, int, int)
Creates and sends a Z39.50 ScanRequest, processes a Z39.50 Scan Response
 o Request(int, String, String, String, int, int, int)
Creates a Z39.50 ScanRequest.
 o Request(int, String, String, String, int, int, int, int, int)
Creates a Z39.50 ScanRequest.
 o Response(BerString)
Processes a Z39.50 ScanResponse.
 o Response(DataDir)
Processes a Z39.50 ScanResponse.
 o sortTerms(TermInfo[])
 o termsToString()
Format a newline separated String of terms and postings.
 o toString()

Variables

 o referenceId
 public int referenceId
Value passed to Request and returned by a target Z39.50 server and Response stores it here.

 o numberOfEntriesReturned
 public int numberOfEntriesReturned
Number of terms returned.

 o scanStatus
 public int scanStatus
Status.

 o errorCode
 public int errorCode
Error code if Scan failed.

 o errorMsg
 public String errorMsg
Error message if Scan failed.

 o terms
 public TermInfo terms[]
Scan results

 o zsession
 public Z39session zsession
Z39session

Constructors

 o Z39scan
 public Z39scan()
 o Z39scan
 public Z39scan(Z39session z)

Methods

 o doScan
 public boolean doScan(int referenceId,
                       String databaseName,
                       String term,
                       String resultsAttributes,
                       int stepSize,
                       int numberOfTermsRequested,
                       int preferredPositionInResponse) throws Exception
Creates and sends a Z39.50 ScanRequest, processes a Z39.50 Scan Response

Parameters:
referenceId - Will be returned on Response.
databaseName - Database to be Scanned.
term - Starting point for Scan.
stepSize - 'N' means Newton indexes ???.
numberOfTermsRequested - How many terms to return.
preferredPositionInResponse - Where the Scan term should appear in the list.
Returns:
boolean. Failures occur when the request cannot be built or response cannot be processed
Throws: Exception
exceptions from Z39Connect
 o Request
 public BerString Request(int referenceId,
                          String databaseName,
                          String term,
                          String resultsAttributes,
                          int stepSize,
                          int numberOfTermsRequested,
                          int preferredPositionInResponse)
Creates a Z39.50 ScanRequest.

Parameters:
referenceId - Will be returned on Response.
databaseName - Database to be Scanned.
term - Starting point for Scan.
stepSize - 'N' means Newton indexes ???.
numberOfTermsRequested - How many terms to return.
preferredPositionInResponse - Where the Scan term should appear in the list.
Returns:
BerString containing Request or null if space was unavailable.
 o Request
 public BerString Request(int referenceId,
                          String databaseName,
                          String term,
                          String resultsAttributes,
                          int stepSize,
                          int numberOfTermsRequested,
                          int preferredPositionInResponse,
                          int extraLen,
                          int offset)
Creates a Z39.50 ScanRequest.

Parameters:
referenceId - Will be returned on Response.
databaseName - Database to be Scanned.
term - Starting point for Scan.
stepSize - 'N' means Newton indexes ???.
numberOfTermsRequested - How many terms to return.
preferredPositionInResponse - Where the Scan term should appear in the list.
extraLen - Allow this much extra room in the built BER record.
offset - Build the Request at this offset in the BerString.
Returns:
BerString containing Request or null if space was unavailable.
 o Response
 public void Response(BerString response)
Processes a Z39.50 ScanResponse.

Parameters:
response - BerString containing response.
 o Response
 public void Response(DataDir response)
Processes a Z39.50 ScanResponse.

Parameters:
response - DataDir containing response.
 o toString
 public String toString()
Overrides:
toString in class Object
 o termsToString
 public String termsToString()
Format a newline separated String of terms and postings. 'united'('united') 17 (use=21;oluc:3;maps:9)

 o sortTerms
 public void sortTerms(TermInfo sort[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index