Open SiteSearch 4.1.1
Final

ORG.oclc.webz
Class Sort

java.lang.Object
  |
  +--ORG.oclc.webz.Sort
Direct Known Subclasses:
IniSort

public class Sort
extends Object

The Sort 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  String[] keyDisplayNames
          String array object containing the names of the display names of the sort keys.
protected  String[] keyNames
          String array object containing the names of the sort keys.
protected  Hashtable keys
          Hashtable object containing a list of keyEntry objects.
protected  int maxAutoSortRecords
          integer data type containing the maximum number of records to sort on a search request.
protected  int maxSortRecords
          integer data type containing the maximum number of records to sort on a present request.
protected  boolean useSortAttributes
          boolean data type indicating whether to encode the Z3950 request using the SortAttributes tag - see Z3950 specification.
 
Constructor Summary
Sort()
          Constructs a Sort object.
Sort(IniFile inifile, String section)
          Constructs a Sort object using the configuration information held in the IniFile object from the named section of the inifile.
 
Method Summary
 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 getKey(String key)
          Retrieves a String containing the Z3950 Sort Key value for the input name.
 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.
 String getSection(String key)
          Retrieves a String containing the original section name for the key from the inifile.
 Hashtable keys()
          Retrieves a Hashtable object containing all the sort keys maintained by this object.
 int maxAutoSortRecords()
          Returns an integer defining the maximum number of records allowed to sort on a Z3950 Query request.
 int maxSortRecords()
          Returns an integer defining the maximum number of records allowed to sort on a Z3950 Present request.
 String toString()
          Generates a String representation of this object.
 boolean useSortAttributes()
          Returns a boolean indicating whether to use the sortAttributes encoding of the Z3950 Sort Request - see the Z3950 standard.
 
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 keyEntry objects.

maxSortRecords

protected int maxSortRecords
integer data type containing the maximum number of records to sort on a present request.

maxAutoSortRecords

protected int maxAutoSortRecords
integer data type containing the maximum number of records to sort on a search request.

useSortAttributes

protected boolean useSortAttributes
boolean data type indicating whether to encode the Z3950 request using the SortAttributes tag - see Z3950 specification.

keyNames

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

keyDisplayNames

protected String[] keyDisplayNames
String array object containing the names of the display names of the sort keys.
Constructor Detail

Sort

public Sort()
Constructs a Sort object.

Sort

public Sort(IniFile inifile,
            String section)
Constructs a Sort 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

maxSortRecords

public int maxSortRecords()
Returns an integer defining the maximum number of records allowed to sort on a Z3950 Present request.
Returns:
int

maxAutoSortRecords

public int maxAutoSortRecords()
Returns an integer defining the maximum number of records allowed to sort on a Z3950 Query request.

getKey

public String getKey(String key)
Retrieves a String containing the Z3950 Sort Key value for the input name.
Parameters:
key - the sort key name to locate the Z3950 sort key for
Returns:
String

getSection

public String getSection(String key)
Retrieves a String containing the original section name for the key from the inifile.
Parameters:
key - the sort key name to locate the section name
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

useSortAttributes

public boolean useSortAttributes()
Returns a boolean indicating whether to use the sortAttributes encoding of the Z3950 Sort Request - see the Z3950 standard.
Returns:
boolean

toString

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

Open SiteSearch 4.1.1
Final