All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ORG.oclc.z39.client.Z39sort

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

public class Z39sort
extends Object
Z39sort creates SortRequests and translates SortResponses.

Version:
@(#)Z39sort.java 1.22 02/24/97

Variable Index

 o errorCode
 o errorMsg
Error message if Sort failed.
 o referenceId
Value passed to Request and returned by a target Z39.50 server and Response stores it here.
 o sortStatus
Status.

Constructor Index

 o Z39sort()
 o Z39sort(Z39session)

Method Index

 o doSort(int, String, String, String[], int[], boolean)
Creates and sends a Z39.50 SortRequest, gets and processes the Z39.50 response
 o Request(int, String, String, String[], int[], boolean)
Creates a Z39.50 SortRequest.
 o Request(int, String, String, String[], int[], boolean, int, int)
Creates a Z39.50 SortRequest.
 o Response(BerString)
 o Response(DataDir)
 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 sortStatus
 public int sortStatus
Status.

 o errorCode
 public int errorCode
 o errorMsg
 public String errorMsg
Error message if Sort failed.

Constructors

 o Z39sort
 public Z39sort(Z39session z)
 o Z39sort
 public Z39sort()

Methods

 o doSort
 public boolean doSort(int referenceId,
                       String resultSetName,
                       String sortResultSetName,
                       String sortKeys[],
                       int sortOrder[],
                       boolean fUseSortAttributes) throws Exception
Creates and sends a Z39.50 SortRequest, gets and processes the Z39.50 response

Parameters:
referenceId - Will be returned on Response.
resultSetName - name of the resultSet to sort
sortResultSetName - name of the sorted resultSet
sortKeys - array of sort keys
sortOrder - array of the order to sort corresponding to the sort keys
fUseSortAttributes - flag to indicate how to build the sort request. true=request uses the sortAttributes encoding. see the Z39.50 specification
Returns:
boolean indicating success or failure of request
 o Request
 public BerString Request(int referenceId,
                          String resultSetName,
                          String sortResultSetName,
                          String sortKeys[],
                          int sortOrder[],
                          boolean fUseSortAttributes)
Creates a Z39.50 SortRequest.

Parameters:
referenceId - Will be returned on Response.
resultSetName - name of the resultSet to sort
sortResultSetName - name of the sorted resultSet
sortKeys - array of sort keys
sortOrder - array of the order to sort corresponding to the sort keys
fUseSortAttributes - flag to indicate how to build the sort request. true=request uses the sortAttributes encoding. see the Z39.50 specification
Returns:
BerString containing Request or null if space was unavailable
 o Request
 public BerString Request(int referenceId,
                          String resultSetName,
                          String sortResultSetName,
                          String sortKeys[],
                          int sortOrder[],
                          boolean fUseSortAttributes,
                          int extraLen,
                          int offset)
Creates a Z39.50 SortRequest.

Parameters:
referenceId - Will be returned on Response.
resultSetName - name of the resultSet to sort
sortResultSetName - name of the sorted resultSet
sortKeys - array of sort keys up to 6
sortOrder - array of the order to sort corresponding to the sort keys
fUseSortAttributes - flag to indicate how to build the sort request. true=request uses the sortAttributes encoding. see the Z39.50 specification
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)
 o Response
 public void Response(DataDir response)
 o toString
 public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index