Open SiteSearch 4.1.1
Final

ORG.oclc.z39.client
Class Z39dedup

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

public class Z39dedup
extends Object

Z39dedup creates DedupRequests and translates DedupResponses.


Field Summary
 DbResults[] dbResults
          DbResults array object containing the breakdown of the representative records in a dedup when more than 1 db in search.
 int dedupedPostingsCount
          integer data type containing the deduped count of unique postings.
 int dedupStatus
          Status.
 int errorCode
           
 String errorMsg
          Error message if Sort failed.
 int referenceId
          Value passed to Request and returned by a target Z39.50 server and Response stores it here.
 int requestLength
          integer data type containing the number of bytes in the request.
 int responseLength
          integer data type containing the number of bytes in the response.
 
Constructor Summary
Z39dedup()
           
Z39dedup(Z39session z)
           
 
Method Summary
 void doDedup(int referenceId, String resultSetName, String dedupResultSetName, int numDupsToKeep, boolean countIsPercent, int detectionCriteria, int levelOfMatch, int sortCriteria, String preferredDatabases, String[] applicableKeys)
          Creates and sends a Z39.50 DedupRequest, gets and processes the Z39.50 response
 BerString Request(int referenceId, String resultSetName, String dedupResultSetName, int numDupsToKeep, boolean countIsPercent, int detectionCriteria, int levelOfMatch, int sortCriteria, String preferredDatabases, String[] applicableKeys)
          Creates a Z39.50 DedupRequest.
 BerString Request(int referenceId, String resultSetName, String dedupResultSetName, int numDupsToKeep, boolean countIsPercent, int detectionCriteria, int levelOfMatch, int sortCriteria, String preferredDatabases, String[] applicableKeys, int extraLen, int offset)
          Creates a Z39.50 DedupRequest.
 void Response(BerString response)
           
 void Response(DataDir response)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

referenceId

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

dedupStatus

public int dedupStatus
Status.

errorCode

public int errorCode

errorMsg

public String errorMsg
Error message if Sort failed.

requestLength

public int requestLength
integer data type containing the number of bytes in the request.

responseLength

public int responseLength
integer data type containing the number of bytes in the response.

dbResults

public DbResults[] dbResults
DbResults array object containing the breakdown of the representative records in a dedup when more than 1 db in search.

dedupedPostingsCount

public int dedupedPostingsCount
integer data type containing the deduped count of unique postings.
Constructor Detail

Z39dedup

public Z39dedup(Z39session z)

Z39dedup

public Z39dedup()
Method Detail

doDedup

public void doDedup(int referenceId,
                    String resultSetName,
                    String dedupResultSetName,
                    int numDupsToKeep,
                    boolean countIsPercent,
                    int detectionCriteria,
                    int levelOfMatch,
                    int sortCriteria,
                    String preferredDatabases,
                    String[] applicableKeys)
             throws Exception,
                    Diagnostic1
Creates and sends a Z39.50 DedupRequest, gets and processes the Z39.50 response
Parameters:
referenceId - Will be returned on Response.
resultSetName - name of the resultSet to dedup
dedupResultSetName - name of the dedup resultSet
numDupsToKeep - the maximum number of duplicates to retain for a record
countIsPercent - boolean indicating whether the dup count is a percent(true) or a record count
detectionCriteria - the tag indicating the type of duplicate detectionCriteria
levelOfMatch - the level of match value for the duplicateDetection criteria
sortCriteria - the tag indicating the type of sort Criterion to use
preferredDatabases - space separated list of database names to use when the sort criterion is preferred databases.
applicableKeys - this specifies the keys for the applicable portion of the record field that can be used to indicate which parts of the dedup key specification to use instead of letting the server decide what the criteria for deduplication is.
Throws:
Exception - exceptions from Z39 send/receive
Diagnostic1 - Z39.50 diagnostics

Request

public BerString Request(int referenceId,
                         String resultSetName,
                         String dedupResultSetName,
                         int numDupsToKeep,
                         boolean countIsPercent,
                         int detectionCriteria,
                         int levelOfMatch,
                         int sortCriteria,
                         String preferredDatabases,
                         String[] applicableKeys)
Creates a Z39.50 DedupRequest.
Parameters:
referenceId - Will be returned on Response.
resultSetName - name of the resultSet to dedup
dedupResultSetName - name of the deduped resultSet
numDupsToKeep - the maximum number of duplicates to retain for a record
countIsPercent - boolean indicating whether the dup count is a percent(true) or a record count
detectionCriteria - the tag indicating the type of duplicate detectionCriteria
levelOfMatch - the level of match value for the duplicateDetection criteria
sortCriteria - the tag indicating the type of sort Criterion to use
preferredDatabases - space separated list of database names to use when the sort criterion is preferred databases.
applicableKeys - this specifies the keys for the applicable portion of the record field that can be used to indicate which parts of the dedup key specification to use instead of letting the server decide what the criteria for deduplication is.
Returns:
BerString containing Request or null if space was unavailable

Request

public BerString Request(int referenceId,
                         String resultSetName,
                         String dedupResultSetName,
                         int numDupsToKeep,
                         boolean countIsPercent,
                         int detectionCriteria,
                         int levelOfMatch,
                         int sortCriteria,
                         String preferredDatabases,
                         String[] applicableKeys,
                         int extraLen,
                         int offset)
Creates a Z39.50 DedupRequest.
Parameters:
referenceId - Will be returned on Response.
resultSetName - name of the resultSet to dedup
dedupResultSetName - name of the dedup resultSet
numDupsToKeep - the maximum number of duplicates to retain for a record
countIsPercent - boolean indicating whether the dup count
detectionCriteria - the tag indicating the type of duplicate detectionCriteria
levelOfMatch - the level of match value for the duplicateDetection criteria
sortCriteria - the tag indicating the type of sort Criterion to use
preferredDatabases - space separated list of database names to use when the sort criterion is preferred databases. is a percent(true) or a record count
applicableKeys - this specifies the keys for the applicable portion of the record field that can be used to indicate which parts of the dedup key specification to use instead of letting the server decide what the criteria for deduplication is.
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

Response

public void Response(BerString response)

Response

public void Response(DataDir response)

toString

public String toString()
Overrides:
toString in class Object

Open SiteSearch 4.1.1
Final