All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ORG.oclc.z39.client.Z39present

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

public class Z39present
extends Object
Z39present creates PresentRequests and translates PresentResponses.

Version:
%W% %G%

Variable Index

 o errorCode
Error code if Present failed.
 o errorMsg
Error message if Present failed.
 o nextResultsSetPosition
Starting point for next PresentRequest.
 o numberOfRecordsReturned
Number of records returned in Response.
 o presentStatus
Status.
 o recDirs
Array of dataDirs filled in by decodeRecords.
 o records
Array of records returned in Response.
 o recordSyntax
Syntax of returned records.
 o referenceId
Value passed to Request and returned by a target Z39.50 server and Response stores it here.

Constructor Index

 o Z39present()
 o Z39present(Z39session)

Method Index

 o decodeRecords()
 o doPresent(int, String, int, int, int, String, String, boolean)
Creates, sends and proceeses a Z39.50 PresentRequest until the number of Records requested is returned or there is a failure
 o Request(int, String, int, int, String, String)
Creates a Z39.50 PresentRequest.
 o Request(int, String, int, int, String, String, int, int)
Creates a Z39.50 PresentRequest.
 o Response(BerString)
Processes a Z39.50 PresentResponse.
 o Response(DataDir)
Processes a Z39.50 PresentResponse.
 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 numberOfRecordsReturned
 public int numberOfRecordsReturned
Number of records returned in Response.

 o nextResultsSetPosition
 public int nextResultsSetPosition
Starting point for next PresentRequest.

 o presentStatus
 public int presentStatus
Status.

 o errorCode
 public int errorCode
Error code if Present failed.

 o errorMsg
 public String errorMsg
Error message if Present failed.

 o recordSyntax
 public String recordSyntax
Syntax of returned records.

 o records
 public BerString records[]
Array of records returned in Response.

 o recDirs
 public Vector recDirs
Array of dataDirs filled in by decodeRecords.

Constructors

 o Z39present
 public Z39present()
 o Z39present
 public Z39present(Z39session z)

Methods

 o doPresent
 public boolean doPresent(int referenceId,
                          String resultSetName,
                          int resultSetStartPoint,
                          int numberOfRecordsRequested,
                          int resultSetEndPoint,
                          String ElementSetNames,
                          String preferredRecordSyntax,
                          boolean fMakeDataDir) throws Exception
Creates, sends and proceeses a Z39.50 PresentRequest until the number of Records requested is returned or there is a failure

Parameters:
referenceId - Will be returned on Response.
resultSetName - Identifies the results from a SearchRequest.
resultSetStartPoint - Relative number of first record to Present.
numberOfRecordsRequested - Number of records to return.
resultSetEndPoint - number of postings Plus the relative number of the first record to present
ElementSetNames - Requested data in returned records.
preferredRecordSyntax - Requested syntax of returned records.
fMakeDataDir - flag to indicate whether decode to decode record data into a DataDir which fills in the recDirs Vector
Returns:
boolean containing the result of the present request.
Throws: Exception
exceptions from Z39Connect
 o Request
 public BerString Request(int referenceId,
                          String resultSetName,
                          int resultSetStartPoint,
                          int numberOfRecordsRequested,
                          String ElementSetNames,
                          String preferredRecordSyntax)
Creates a Z39.50 PresentRequest.

Parameters:
referenceId - Will be returned on Response.
resultSetName - Identifies the results from a SearchRequest.
resultSetStartPoint - Relative number of first record to Present.
numberOfRecordsRequested - Number of records to return.
ElementSetNames - Requested data in returned records.
preferredRecordSyntax - Requested syntax of returned records.
Returns:
BerString containing Request or null if space was unavailable
 o Request
 public BerString Request(int referenceId,
                          String resultSetName,
                          int resultSetStartPoint,
                          int numberOfRecordsRequested,
                          String ElementSetNames,
                          String preferredRecordSyntax,
                          int extraLen,
                          int offset)
Creates a Z39.50 PresentRequest.

Parameters:
referenceId - Will be returned on Response.
resultSetName - Identifies the results from a SearchRequest.
resultSetStartPoint - Relative number of first record to Present.
numberOfRecordsRequested - Number of records to return.
ElementSetNames - Requested data in returned records.
preferredRecordSyntax - Requested syntax of returned records.
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 PresentResponse.

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

Parameters:
response - DataDir containing response
 o toString
 public String toString()
Overrides:
toString in class Object
 o decodeRecords
 public boolean decodeRecords()

All Packages  Class Hierarchy  This Package  Previous  Next  Index