Open SiteSearch 4.1.1
Final

ORG.oclc.tools
Class IniSort

java.lang.Object
  |
  +--ORG.oclc.webz.Sort
        |
        +--ORG.oclc.tools.IniSort

public class IniSort
extends Sort

Maintain sort information read from inifiles.

See Also:
Sort

Fields inherited from class ORG.oclc.webz.Sort
keyDisplayNames, keyNames, keys, maxAutoSortRecords, maxSortRecords, useSortAttributes
 
Constructor Summary
IniSort()
          Construct an IniSort object.
IniSort(IniFile inifile, String section)
          Construct an IniSort object.
 
Method Summary
 void addKey(String name, String sortKey)
          Add a new key entry.
 String getKey(String name)
          Get a Z39.50 Sort Key value from the input name.
 String getLongName(String key)
          Get the longname value for a sort key name
 String[] getNames()
          Get all the Z39.50 Sort key long Name values
 Hashtable keys()
          Get the sort keys hashtable
 int maxAutoSortRecords()
          Get the maximum number of records allowed to sort piggy-backed on a query.
 int maxSortRecords()
          Get the maximum number of records allowed to sort on a fetch.
 void setFields(String sortKey, String fields)
           
 void setMaxAutoSortRecords(int max)
          Set the maximum number of records allowd to sort on a query.
 void setMaxSortRecords(int max)
          Set the maximum number of records allowd to sort on a fetch.
 void setSortAttributesFlag(boolean flag)
          Set flag indicating how to encode the sort request.
 void setStepSize(int stepSize)
          Set the number of records to retrieve on each read from the database to create the sort keys.
 void setSyntax(String syntax)
          Set the record syntax for database record retrieval.
 String toIniString()
          Generates an IniFile type string representation of the object.
 String toString()
          Generates the string representation of this object.
 boolean useSortAttributes()
          Get the flag indicating how to encode the Z39.50 Sort Request - whether to use the sortAttributes encoding - see the Z39.50 standard.
 
Methods inherited from class ORG.oclc.webz.Sort
getDisplayName, getDisplayNames, getSection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IniSort

public IniSort()
Construct an IniSort object.

IniSort

public IniSort(IniFile inifile,
               String section)
Construct an IniSort object.
Parameters:
inifile - the input configuration file
section - the name of the section in the infile to read from
Method Detail

setMaxSortRecords

public void setMaxSortRecords(int max)
Set the maximum number of records allowd to sort on a fetch.
Parameters:
max - the count

maxSortRecords

public int maxSortRecords()
Get the maximum number of records allowed to sort on a fetch.
Overrides:
maxSortRecords in class Sort

setMaxAutoSortRecords

public void setMaxAutoSortRecords(int max)
Set the maximum number of records allowd to sort on a query.
Parameters:
max - the count

maxAutoSortRecords

public int maxAutoSortRecords()
Get the maximum number of records allowed to sort piggy-backed on a query.
Overrides:
maxAutoSortRecords in class Sort

setSortAttributesFlag

public void setSortAttributesFlag(boolean flag)
Set flag indicating how to encode the sort request.
Parameters:
flag - true = useSortAttributes, false = useGenericSort

setSyntax

public void setSyntax(String syntax)
Set the record syntax for database record retrieval.
Parameters:
syntax - either e.g. BER, MARC, OPAC

setStepSize

public void setStepSize(int stepSize)
Set the number of records to retrieve on each read from the database to create the sort keys.
Parameters:
stepSize - the count of records

setFields

public void setFields(String sortKey,
                      String fields)

addKey

public void addKey(String name,
                   String sortKey)
Add a new key entry.
Parameters:
name - the name of the key
-  

getKey

public String getKey(String name)
Get a Z39.50 Sort Key value from the input name.
Returns:
String
Overrides:
getKey in class Sort

getNames

public String[] getNames()
Get all the Z39.50 Sort key long Name values
Returns:
String[]
Overrides:
getNames in class Sort

keys

public Hashtable keys()
Get the sort keys hashtable
Returns:
Hashtable
Overrides:
keys in class Sort

getLongName

public String getLongName(String key)
Get the longname value for a sort key name
Returns:
Hashtable
Overrides:
getLongName in class Sort

useSortAttributes

public boolean useSortAttributes()
Get the flag indicating how to encode the Z39.50 Sort Request - whether to use the sortAttributes encoding - see the Z39.50 standard.
Returns:
boolean
Overrides:
useSortAttributes in class Sort

toIniString

public String toIniString()
Generates an IniFile type string representation of the object.
Returns:
String

toString

public String toString()
Generates the string representation of this object.
Returns:
String
Overrides:
toString in class Sort

Open SiteSearch 4.1.1
Final