Open SiteSearch 4.1.1
Final

ORG.oclc.webz
Class DedupKeys

java.lang.Object
  |
  +--ORG.oclc.webz.DedupKeys

public class DedupKeys
extends Object

The DedupKeys class maintains the sort specifications for a database. It manages the database sort keys, sort thresholds, and information on how to build Z3950 sort requests. It provides a set of methods to access the data it maintains.

See Also:
Db

Field Summary
protected  boolean autoDedupEverySearch
          boolean data type indicating that this database should automatically dedup on every search.
protected  String[] dedupKeys
          String data type containing the the dedup sort Keys.
protected  int[] dedupOrders
          int data type containing the dedup sort orders.
protected  String[] keyDisplayNames
          String array object containing the Display names of the dedup keys.
protected  String[] keyNames
          String array object containing the names of the dedup keys.
protected  Hashtable keys
          Hashtable object containing a list of dupkeyEntry objects.
protected  int maxDedupRecords
          integer data type containing the maximum number of records to dedup.
protected  boolean maxDupRecordCountIsPercent
          boolean data type indicating whether the max dup records to retain is a percentage of the number of duplicates or a record count.
protected  int maxDupRecordsToRetain
          integer data type defining the maximum number of duplicate records to retain with an original record.
protected  String preferredDatabaseNames
          String data type containing the list of database names to return the duplicates in if the sort criterion is DbnameOrder.
protected  int sortCriterion
          integer data type containing the sort criterion value, defining whether to return the largest record first (LargestRecordsFirst), the smallest record first(SmallestRecordsFirst), or in database name order (DbnameOrder (default)).
 
Constructor Summary
DedupKeys()
          Constructs a DedupKeys object.
DedupKeys(IniFile inifile, String section)
          Constructs a DedupKeys object using the configuration information held in the IniFile object from the named section of the inifile.
 
Method Summary
 boolean autoDedupEverySearch()
          Returns a boolean indicating whether every search does automatic dedup request.
 String getDisplayName(String key)
          Retrieves a String containing the Display Name value for the input sort key String.
 String[] getDisplayNames()
          Retrieves an array of Strings containing a list of all the interface Display names for the sort keys.
 String getLongName(String key)
          Retrieves a String containing the longName value for the input sort key String.
 String[] getNames()
          Retrieves an array of Strings containing a list of all the Z3950 Sort key longName values.
 Hashtable keys()
          Retrieves a Hashtable object containing all the sort keys maintained by this object.
 int maxDedupRecords()
          Returns an integer defining the maximum number of records allowed to dedup on a Z3950 Dedup request.
 boolean maxDupRecordCountIsPercent()
          Returns a boolean indicating whether the maximum number duplicate records to retain for each original record is a percentage of the number of duplicates or a count of records.
 int maxDupRecordsToRetain()
          Returns an integer defining the maximum number of duplicate records to retain for each original record.
 String preferredDatabaseNames()
          Returns a String containing a space separated list of dbnames to order the duplicates.
 int sortCriterion()
          Returns an integer indicating the sort criterion to use in ordering the duplicates.
 String toString()
          Generates a String representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

keys

protected Hashtable keys
Hashtable object containing a list of dupkeyEntry objects.

dedupKeys

protected String[] dedupKeys
String data type containing the the dedup sort Keys.

dedupOrders

protected int[] dedupOrders
int data type containing the dedup sort orders.

maxDedupRecords

protected int maxDedupRecords
integer data type containing the maximum number of records to dedup.

maxDupRecordsToRetain

protected int maxDupRecordsToRetain
integer data type defining the maximum number of duplicate records to retain with an original record.

maxDupRecordCountIsPercent

protected boolean maxDupRecordCountIsPercent
boolean data type indicating whether the max dup records to retain is a percentage of the number of duplicates or a record count.

keyNames

protected String[] keyNames
String array object containing the names of the dedup keys.

keyDisplayNames

protected String[] keyDisplayNames
String array object containing the Display names of the dedup keys.

sortCriterion

protected int sortCriterion
integer data type containing the sort criterion value, defining whether to return the largest record first (LargestRecordsFirst), the smallest record first(SmallestRecordsFirst), or in database name order (DbnameOrder (default)).

preferredDatabaseNames

protected String preferredDatabaseNames
String data type containing the list of database names to return the duplicates in if the sort criterion is DbnameOrder.

autoDedupEverySearch

protected boolean autoDedupEverySearch
boolean data type indicating that this database should automatically dedup on every search.
Constructor Detail

DedupKeys

public DedupKeys()
Constructs a DedupKeys object.

DedupKeys

public DedupKeys(IniFile inifile,
                 String section)
Constructs a DedupKeys object using the configuration information held in the IniFile object from the named section of the inifile.
Parameters:
inifile - the input configuration file
section - the name of the section in the infile to read from
Method Detail

maxDedupRecords

public final int maxDedupRecords()
Returns an integer defining the maximum number of records allowed to dedup on a Z3950 Dedup request.
Returns:
int

maxDupRecordsToRetain

public final int maxDupRecordsToRetain()
Returns an integer defining the maximum number of duplicate records to retain for each original record.
Returns:
int

maxDupRecordCountIsPercent

public final boolean maxDupRecordCountIsPercent()
Returns a boolean indicating whether the maximum number duplicate records to retain for each original record is a percentage of the number of duplicates or a count of records.
Returns:
boolean

autoDedupEverySearch

public final boolean autoDedupEverySearch()
Returns a boolean indicating whether every search does automatic dedup request.

sortCriterion

public final int sortCriterion()
Returns an integer indicating the sort criterion to use in ordering the duplicates.

preferredDatabaseNames

public final String preferredDatabaseNames()
Returns a String containing a space separated list of dbnames to order the duplicates.
Returns:
String

getNames

public String[] getNames()
Retrieves an array of Strings containing a list of all the Z3950 Sort key longName values.
Returns:
String[]

getDisplayNames

public String[] getDisplayNames()
Retrieves an array of Strings containing a list of all the interface Display names for the sort keys.
Returns:
String[]

keys

public Hashtable keys()
Retrieves a Hashtable object containing all the sort keys maintained by this object.
Returns:
Hashtable

getLongName

public String getLongName(String key)
Retrieves a String containing the longName value for the input sort key String.
Parameters:
key - the sort key name to find the long name for
Returns:
String

getDisplayName

public String getDisplayName(String key)
Retrieves a String containing the Display Name value for the input sort key String.
Parameters:
key - the sort key name to find the long name for
Returns:
String

toString

public String toString()
Generates a String representation of this object.
Returns:
String
Overrides:
toString in class Object

Open SiteSearch 4.1.1
Final