Open SiteSearch 4.1.1
Final

ORG.oclc.z39
Class ESUpdate

java.lang.Object
  |
  +--ORG.oclc.z39.ESUpdate

public class ESUpdate
extends Object
implements ExtSvcHandler

The ESUpdate class creates the Extended Services Database Update task package and translates the task package response.


Constructor Summary
ESUpdate()
          Construct an ESUpdate object.
ESUpdate(DataDir tp)
          Construct an ESUpdate object using the input parameter task package.
ESUpdate(String db, DataDir rec, String schemaOID)
          Construct an ESUpdate object using the input parameter database name and the database record.
 
Method Summary
 DataDir buildRequest(int updateAction)
          Build the Extended Services Database Update request task package.
 DataDir buildResponse(int status, String dbName, String info, DataDir updateRecord)
          Build the Extended Services Database Update response task package.
 String[] dbname(DataDir taskPackage)
          Return the database name found in the request task package.
 DataDir getResponseUpdateRecord(DataDir taskPackage)
          Parse the extended services database update response task package and return the database update record.
 String getUpdateFailedCode(DataDir taskPackage)
          Parse the extended services database update response task package and return the database update globalDiagnostics code.
 DataDir getUpdateRecord(DataDir tp)
          Parse the extended services database update request task package and return the database update record.
 String getUpdateSchema(DataDir taskPackage)
          Return the schema found in the request task package.
 int getUpdateStatus(DataDir taskPackage)
          Parse the extended services database update response task package and return the database update status.
 void resetDbname(String name, DataDir taskPackage)
          Reset the Extended Service Database Update database name.
 void resetResultSetId(String resultSetName, DataDir taskPackage)
          The Extended Service Database Update does not use this method.
 String resultSetId(DataDir taskPackage)
          The Extended Service Database Update does not use this method.
 int resultSetStartPosition(DataDir taskPackage)
          The Extended Service Database Update does not use this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ESUpdate

public ESUpdate()
Construct an ESUpdate object.

ESUpdate

public ESUpdate(String db,
                DataDir rec,
                String schemaOID)
Construct an ESUpdate object using the input parameter database name and the database record.
Parameters:
db - the name of the database to update.
rec - the database record to update into the database.

ESUpdate

public ESUpdate(DataDir tp)
Construct an ESUpdate object using the input parameter task package.
Parameters:
tp - the Extended Services request task package.
Method Detail

resetResultSetId

public void resetResultSetId(String resultSetName,
                             DataDir taskPackage)
The Extended Service Database Update does not use this method.
Specified by:
resetResultSetId in interface ExtSvcHandler
Parameters:
resultSetName - the name of the resultset.
taskPackage - the request task package.

resetDbname

public void resetDbname(String name,
                        DataDir taskPackage)
Reset the Extended Service Database Update database name.
Specified by:
resetDbname in interface ExtSvcHandler
Parameters:
name - the name of the database.
taskPackage - the request task package.

dbname

public String[] dbname(DataDir taskPackage)
Return the database name found in the request task package.
Specified by:
dbname in interface ExtSvcHandler
Parameters:
taskPackage - the request task package.
Returns:
an array of database names.

resultSetId

public String resultSetId(DataDir taskPackage)
The Extended Service Database Update does not use this method.
Specified by:
resultSetId in interface ExtSvcHandler

resultSetStartPosition

public int resultSetStartPosition(DataDir taskPackage)
The Extended Service Database Update does not use this method.
Specified by:
resultSetStartPosition in interface ExtSvcHandler
Parameters:
taskPackage - the request task package.
Returns:
an integer for the start position.

buildRequest

public DataDir buildRequest(int updateAction)
Build the Extended Services Database Update request task package.
Parameters:
updateAction - the type of update record being processed: insert, replace, or delete.
Returns:
the Extended Services Database Update task package request.

buildResponse

public DataDir buildResponse(int status,
                             String dbName,
                             String info,
                             DataDir updateRecord)
Build the Extended Services Database Update response task package.
Parameters:
status - the status of the database update: success, partial, or failure.
dbName - the name of the database being updated.
info - the additional info field for the Diagnostic object.
updateRecord - the Extended Services Update record.
Returns:
the Extended Services Database Update task package response.

getUpdateSchema

public String getUpdateSchema(DataDir taskPackage)
Return the schema found in the request task package.
Parameters:
taskPackage - the request task package.
Returns:
the schema specified in the request task package.

getUpdateRecord

public DataDir getUpdateRecord(DataDir tp)
Parse the extended services database update request task package and return the database update record.
Parameters:
tp - the Extended Services Request task package.
Returns:
a DataDir of the database update record.

getUpdateStatus

public int getUpdateStatus(DataDir taskPackage)
Parse the extended services database update response task package and return the database update status.
Parameters:
taskPackage - the response task package.
Returns:
an integer for the update status from the Z39.50 standard.

getUpdateFailedCode

public String getUpdateFailedCode(DataDir taskPackage)
Parse the extended services database update response task package and return the database update globalDiagnostics code.
Parameters:
taskPackage - the response task package.
Returns:
a String for the update status code.

getResponseUpdateRecord

public DataDir getResponseUpdateRecord(DataDir taskPackage)
Parse the extended services database update response task package and return the database update record.
Parameters:
taskPackage - the response task package.
Returns:
a DataDir of the database update record.

Open SiteSearch 4.1.1
Final