All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ORG.oclc.z39.client.Z39search

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

public class Z39search
extends Object
Z39search creates SearchRequests and translates SearchResponses.

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

Variable Index

 o dbResults
Additional Search Information, if present.
 o errorCode
Error code if Search failed.
 o errorMsg
Error message if Search failed.
 o Present
PresentResponse if piggybacked Present was requested.
 o referenceId
Value passed to Request and returned by a target Z39.50 server and Response stores it here.
 o resultCount
Number of records located by Search.
 o resultSetStatus
Piggybacked Present Status.
 o searchStatus
Status.
 o zsession
Z39session

Constructor Index

 o Z39search()
 o Z39search(Z39session)

Method Index

 o doSearch(int, int, int, int, int, String, String, String, String, String, String, int, String, DataDir, boolean)
Creates and sends a Z39.50 SearchRequest, gets and processes the Z39.50 response
 o Request(int, int, int, int, int, String, String, String, String, String, String, int, String, DataDir)
Creates a Z39.50 SearchRequest.
 o Request(int, int, int, int, int, String, String, String, String, String, String, int, String, DataDir, int, int)
Creates a Z39.50 SearchRequest.
 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 resultCount
 public int resultCount
Number of records located by Search.

 o searchStatus
 public int searchStatus
Status.

 o resultSetStatus
 public int resultSetStatus
Piggybacked Present Status.

 o errorCode
 public int errorCode
Error code if Search failed.

 o errorMsg
 public String errorMsg
Error message if Search failed.

 o Present
 public Z39present Present
PresentResponse if piggybacked Present was requested.

 o dbResults
 public DbResults dbResults[]
Additional Search Information, if present.

 o zsession
 public Z39session zsession
Z39session

Constructors

 o Z39search
 public Z39search(Z39session z)
 o Z39search
 public Z39search()

Methods

 o doSearch
 public boolean doSearch(int referenceId,
                         int smallSetUpperBound,
                         int largeSetLowerBound,
                         int mediumSetPresentNumber,
                         int replaceIndicator,
                         String resultSetName,
                         String databaseNames,
                         String smallSetElementSetNames,
                         String mediumSetElementSetNames,
                         String preferredRecordSyntax,
                         String query,
                         int query_type,
                         String additionalSearchOID,
                         DataDir Z39attributesPlusTerm,
                         boolean fMakeDataDir) throws Exception
Creates and sends a Z39.50 SearchRequest, gets and processes the Z39.50 response

Parameters:
referenceId - Will be returned on Response.
smallSetUpperBound - Result set boundary to return all records.
largeSetLowerBound - Result set boundary to return no records.
mediumSetPresentNumber - Number of records to return for medium sets.
replaceIndicator - Indicates response in cases where the resultSetName already exists.
resultSetName - Identifies the results from a SearchRequest.
databaseNames - Set of databases to which the query applies.
smallSetElementSetNames - Preferred composition of records.
mediumSetElementSetNames - Preferred composition of records.
preferredRecordSyntax - Requested syntax of returned records.
query - Search query.
query_type - Identifies the type of query. Types 0, 1, 100 & 101 are supported.
additionalSearchOID - Requests additional information to be returned with search.
Returns:
BerString containing Request or null if space was unavailable
Throws: Exception
exceptions from Z39Connect
 o Request
 public BerString Request(int referenceId,
                          int smallSetUpperBound,
                          int largeSetLowerBound,
                          int mediumSetPresentNumber,
                          int replaceIndicator,
                          String resultSetName,
                          String databaseNames,
                          String smallSetElementSetNames,
                          String mediumSetElementSetNames,
                          String preferredRecordSyntax,
                          String query,
                          int query_type,
                          String additionalSearchOID,
                          DataDir Z39attributesPlusTerm)
Creates a Z39.50 SearchRequest.

Parameters:
referenceId - Will be returned on Response.
smallSetUpperBound - Result set boundary to return all records.
largeSetLowerBound - Result set boundary to return no records.
mediumSetPresentNumber - Number of records to return for medium sets.
replaceIndicator - Indicates response in cases where the resultSetName already exists.
resultSetName - Identifies the results from a SearchRequest.
databaseNames - Set of databases to which the query applies.
smallSetElementSetNames - Preferred composition of records.
mediumSetElementSetNames - Preferred composition of records.
preferredRecordSyntax - Requested syntax of returned records.
query - Search query.
query_type - Identifies the type of query. Types 0, 1, 100 & 101 are supported.
additionalSearchOID - Requests additional information to be returned with search.
Returns:
BerString containing Request or null if space was unavailable
 o Request
 public BerString Request(int referenceId,
                          int smallSetUpperBound,
                          int largeSetLowerBound,
                          int mediumSetPresentNumber,
                          int replaceIndicator,
                          String resultSetName,
                          String databaseNames,
                          String smallSetElementSetNames,
                          String mediumSetElementSetNames,
                          String preferredRecordSyntax,
                          String query,
                          int query_type,
                          String additionalSearchOID,
                          DataDir Z39attributesPlusTerm,
                          int extraLen,
                          int offset)
Creates a Z39.50 SearchRequest.

Parameters:
referenceId - Will be returned on Response.
smallSetUpperBound - Result set boundary to return all records.
largeSetLowerBound - Result set boundary to return no records.
mediumSetPresentNumber - Number of records to return for medium sets.
replaceIndicator - Indicates response in cases where the resultSetName already exists.
resultSetName - Identifies the results from a SearchRequest.
databaseNames - Set of databases to which the query applies.
smallSetElementSetNames - Preferred composition of records.
mediumSetElementSetNames - Preferred composition of records.
preferredRecordSyntax - Requested syntax of returned records.
query - Search query.
query_type - Identifies the type of query. Types 0, 1, 100 & 101 are supported.
additionalSearchOID - Requests additional information to be returned with search.
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