Open SiteSearch 4.1.1
Final

ORG.oclc.webz
Class Db

java.lang.Object
  |
  +--ORG.oclc.webz.Db
Direct Known Subclasses:
IniDb

public class Db
extends Object

The Db class maintains configuration for a Z39.50 Database. This information is used to customize Z39.50 access for the database. The configuration settings are read from the database inifile. Db also provides methods to retrieve configuration information for the database.

See Also:
ZServer, Log, IndexMap, Sort

Field Summary
protected  String alternateThesaurusDbName
          String data type containing the name of an alternate associated thesaurus database.
protected  DbAttributes attributes
          DbAttributes object contains the set of index specificat
protected  String dbIniFile
          String data type containing the name of the configuration inifile for the database.
protected  DedupKeys dedup
          DedupKeys object containing the sort parameters for the database.
protected  boolean fCanDoScan
          boolean data type indicating whether this database supports scan (default=Z3950 server setting).
protected  boolean fCanDoSort
          boolean data type indicating whether this database supports sort (default=Z3950 server setting).
protected  boolean fDbGroup
          boolean data type indicating whether this database definition is for a Group database - a type of global database definition for cross database searches and scans (default=false).
protected  boolean fFullText
          boolean data type indicating whether this database has full text (default=false).
protected  boolean fHideit
          boolean data type indicating whether to show database on menus.
protected  Hashtable fmtClassTable
          Hashtable object containing the Format objects for the database.
protected  String fullTextRecordSyntax
          String data type containing the Z3950 record syntax for full Text Database reads with ElementSetName=T (default=SUTRS).
protected  String holdingsDbName
          String data type containing the name of the database to retrieve holdings.
protected  String ILLService
          String data type containing the ILL Service Type (NONE, EMAIL, OCLCILL).
protected  IndexMap indexMap
          IndexMap object containing the index specification.
protected  String longName
          String data type containing the long descriptive name of the database.
protected  String name
          String data type containing name of the database.
protected  String recordIdTag
          String containing the BER tag path to record ID.
protected  String recordSyntax
          String data type containing the Z3950 record syntax for database reads (default=MARC).
protected  boolean remoteAuthorizationRequired
          boolean data type indicating whether the remote target server database requires an authorization/password for the database.
protected  String remoteDatabaseAutho
          String data type containing the remote server database authorization, if supplied from the configuration file.
protected  String remoteDatabasePassword
          String data type containing the remote server database password, if supplied from the configuration file.
protected  String remoteDatabaseServerName
          String data type containing the remote server database name, if supplied from the configuration file.
protected  Sort sort
          Sort object containing the sort parameters for the database.
protected  TermFinderInfo termFinder
          TermFinderInfo object containing parms for doing related term list and thesaurus searching.
protected  String thesaurusDbName
          String data type containing the name of the primary associated thesaurus database.
protected  String zName
          String data type containing the Z3950 ServerName for searching the database.
protected  Object zServer
          ZServer object that owns the database.
 
Constructor Summary
Db()
          Constructs a Db object.
Db(Object zServer, IniFile ini)
          Constructs a Db object using a ZServer object and an IniFile object containing the configuration information for the database.
Db(Object zServer, IniFile ini, boolean dbGroupFlag)
          Constructs a Db object using a ZServer object, the information in the IniFile object from the configuration files, and a boolean indicating whether the database is a Db Group type database.
 
Method Summary
 String alternateThesaurusDb()
          Returns the String containing the name of the alternate thesaurus database.
 String dbIniFile()
          Returns the String containing the name of the database inifile.
 DedupKeys dedup()
          Retrieves the Sort object containing the information needed to perform a Z3950 sort for the database.
 String deweyDb()
          Returns the String containing the name of the dewey database.
protected  boolean fCanDoRanked()
          Returns boolean indicating whether probalistic queries are allowed for this database.
 boolean fCanDoScan()
          Returns the boolean indicating whether Z3950 Scan is supported for the database.
 boolean fCanDoSort()
          Returns the boolean indicating whether Z3950 Sort is supported for the database.
 boolean fCanDoTermFinder()
          Returns the boolean indicating whether the TermFinder searching option is available for this database.
 boolean fFullText()
          Returns the boolean indicating whether the database can show full text.
 Hashtable fmtClassTable()
          Retrieves the Hashtable object table containing a list of Format objects for the database.
protected  boolean fPartialSearch()
          Returns the boolean indicating whether this database supports partial searching.
 String fullTextRecordSyntax()
          Returns the String containing the preferred record syntax for Z3950 present requests for FullText (ElementSetName=T).
static Db get(String dbname)
          Retrieves a Db object for the specified input database name.
static Hashtable getAllDbs()
          Retrieves the Hashtable object containing all Db objects in the system.
 DbAttributes getAttributes()
          Returns the DbAttributes object containing the set of index information for the database.
static Db getDefaultDbGroup()
          Retrieves the Db object for the defaultDbGroup definition.
 Format getFormat(String fmtname)
          Returns the Format object for the requested format that can be used to format records returned from a Z3950 request.
static String[] getSortedNames()
          Creates a sorted String array of all dbnames for all Db objects in the system.
 String holdingsDb()
          Returns the String containing the name of the holdings database.
 String ILLService()
          Returns the String containing the ILL Service Type for the database.
 IndexMap indexMap()
          Returns the IndexMap object containing the index configuration information for the database.
 boolean isDbGroupDefinition()
          Returns the boolean indicating whether this is a Db Group database object.
 boolean isHidden()
          Returns the boolean indicating whether database should be hidden in generated menus of databases.
 void loadFromIniFile(IniFile ini)
          Initializes a Db object using the configuration information in the input IniFile object.
 String longName()
          Returns the String containing the textual long name of the database.
 String name()
          Returns the String containing the database name.
protected  DataDir partialSearchParms()
          Returns the DataDir object to perform a partial search.
 String recordIdTag()
          Returns the String containing the BER tag path to the record ID.
 String recordSyntax()
          Returns the String containing the preferred record syntax for Z3950 present requests.
static void setDefaultDbGroup(Db db)
          Sets the defaultDbGroup object to the input Db object.
 Sort sort()
          Retrieves the Sort object containing the information needed to perform a Z3950 sort for the database.
 StopWord stopWords()
          Returns the StopWord object containing the stopwords for the database.
 TermFinderInfo termFinderInfo()
          Returns the object containing the parameters for doing the term finder and related term list search.
 String thesaurusDb()
          Returns the String containing the name of the thesaurus database.
 String toString()
          Generates the string representation of this object.
 String zName()
          Returns the String containing the name of the database on the Z3950 Server.
 ZServer zServer()
          Returns the ZServer object that owns the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected String name
String data type containing name of the database.

longName

protected String longName
String data type containing the long descriptive name of the database.

zName

protected String zName
String data type containing the Z3950 ServerName for searching the database.

holdingsDbName

protected String holdingsDbName
String data type containing the name of the database to retrieve holdings.

zServer

protected Object zServer
ZServer object that owns the database.

dbIniFile

protected String dbIniFile
String data type containing the name of the configuration inifile for the database.

recordSyntax

protected String recordSyntax
String data type containing the Z3950 record syntax for database reads (default=MARC).

fullTextRecordSyntax

protected String fullTextRecordSyntax
String data type containing the Z3950 record syntax for full Text Database reads with ElementSetName=T (default=SUTRS).

recordIdTag

protected String recordIdTag
String containing the BER tag path to record ID.

indexMap

protected IndexMap indexMap
IndexMap object containing the index specification.

attributes

protected DbAttributes attributes
DbAttributes object contains the set of index specificat

fmtClassTable

protected Hashtable fmtClassTable
Hashtable object containing the Format objects for the database.

fDbGroup

protected boolean fDbGroup
boolean data type indicating whether this database definition is for a Group database - a type of global database definition for cross database searches and scans (default=false).

fCanDoScan

protected boolean fCanDoScan
boolean data type indicating whether this database supports scan (default=Z3950 server setting).

fCanDoSort

protected boolean fCanDoSort
boolean data type indicating whether this database supports sort (default=Z3950 server setting).

fFullText

protected boolean fFullText
boolean data type indicating whether this database has full text (default=false).

sort

protected Sort sort
Sort object containing the sort parameters for the database.

dedup

protected DedupKeys dedup
DedupKeys object containing the sort parameters for the database.

fHideit

protected boolean fHideit
boolean data type indicating whether to show database on menus.

ILLService

protected String ILLService
String data type containing the ILL Service Type (NONE, EMAIL, OCLCILL).

alternateThesaurusDbName

protected String alternateThesaurusDbName
String data type containing the name of an alternate associated thesaurus database.

thesaurusDbName

protected String thesaurusDbName
String data type containing the name of the primary associated thesaurus database.

termFinder

protected TermFinderInfo termFinder
TermFinderInfo object containing parms for doing related term list and thesaurus searching.

remoteAuthorizationRequired

protected boolean remoteAuthorizationRequired
boolean data type indicating whether the remote target server database requires an authorization/password for the database.

remoteDatabaseAutho

protected String remoteDatabaseAutho
String data type containing the remote server database authorization, if supplied from the configuration file.

remoteDatabasePassword

protected String remoteDatabasePassword
String data type containing the remote server database password, if supplied from the configuration file.

remoteDatabaseServerName

protected String remoteDatabaseServerName
String data type containing the remote server database name, if supplied from the configuration file.
Constructor Detail

Db

public Db()
Constructs a Db object.

Db

public Db(Object zServer,
          IniFile ini)
Constructs a Db object using a ZServer object and an IniFile object containing the configuration information for the database.
Parameters:
zServer - the Object of the owning Z39.50 Server
ini - the configuration iniFile

Db

public Db(Object zServer,
          IniFile ini,
          boolean dbGroupFlag)
Constructs a Db object using a ZServer object, the information in the IniFile object from the configuration files, and a boolean indicating whether the database is a Db Group type database.
Parameters:
zServer - the Object of the owning Z39.50 Server
ini - the configuration iniFile
dbGroupFlag - indication that this is a combined database definition
Method Detail

getAllDbs

public static Hashtable getAllDbs()
Retrieves the Hashtable object containing all Db objects in the system.
Returns:
Hashtable

get

public static Db get(String dbname)
Retrieves a Db object for the specified input database name.
Parameters:
dbname - the name of the database.
Returns:
Db

setDefaultDbGroup

public static void setDefaultDbGroup(Db db)
Sets the defaultDbGroup object to the input Db object.
Parameters:
db - the database object.

getDefaultDbGroup

public static Db getDefaultDbGroup()
Retrieves the Db object for the defaultDbGroup definition.
Returns:
Db

getSortedNames

public static String[] getSortedNames()
Creates a sorted String array of all dbnames for all Db objects in the system. If the HideInMenus flag is true for the database, the name is excluded from the list.
Returns:
String[]

fCanDoScan

public final boolean fCanDoScan()
Returns the boolean indicating whether Z3950 Scan is supported for the database. See Z39.50 specification.
Returns:
boolean

fCanDoTermFinder

public final boolean fCanDoTermFinder()
Returns the boolean indicating whether the TermFinder searching option is available for this database.
Returns:
boolean

fCanDoSort

public final boolean fCanDoSort()
Returns the boolean indicating whether Z3950 Sort is supported for the database. See Z39.50 specification.
Returns:
boolean

fCanDoRanked

protected final boolean fCanDoRanked()
Returns boolean indicating whether probalistic queries are allowed for this database. Currently, this is not supported.
Returns:
boolean

isHidden

public final boolean isHidden()
Returns the boolean indicating whether database should be hidden in generated menus of databases.
Returns:
boolean

partialSearchParms

protected final DataDir partialSearchParms()
Returns the DataDir object to perform a partial search.
Returns:
DataDir

fPartialSearch

protected final boolean fPartialSearch()
Returns the boolean indicating whether this database supports partial searching. Currently this is unsupported.

fmtClassTable

public final Hashtable fmtClassTable()
Retrieves the Hashtable object table containing a list of Format objects for the database.
Returns:
Hashtable

sort

public final Sort sort()
Retrieves the Sort object containing the information needed to perform a Z3950 sort for the database.
Returns:
Sort

dedup

public final DedupKeys dedup()
Retrieves the Sort object containing the information needed to perform a Z3950 sort for the database.
Returns:
Sort

getFormat

public final Format getFormat(String fmtname)
Returns the Format object for the requested format that can be used to format records returned from a Z3950 request.
Returns:
Format

fFullText

public final boolean fFullText()
Returns the boolean indicating whether the database can show full text.
Returns:
boolean

ILLService

public final String ILLService()
Returns the String containing the ILL Service Type for the database.
Returns:
String

indexMap

public final IndexMap indexMap()
Returns the IndexMap object containing the index configuration information for the database.
Returns:
IndexMap
See Also:
IndexMap

getAttributes

public final DbAttributes getAttributes()
Returns the DbAttributes object containing the set of index information for the database.
Returns:
DbAttributes
See Also:
DbAttributes

isDbGroupDefinition

public final boolean isDbGroupDefinition()
Returns the boolean indicating whether this is a Db Group database object.
Returns:
boolean

longName

public final String longName()
Returns the String containing the textual long name of the database.
Returns:
String

name

public final String name()
Returns the String containing the database name.
Returns:
String

holdingsDb

public final String holdingsDb()
Returns the String containing the name of the holdings database.
Returns:
String

termFinderInfo

public final TermFinderInfo termFinderInfo()
Returns the object containing the parameters for doing the term finder and related term list search.
Returns:
TermFinderInfo or null if the option is not supported

thesaurusDb

public final String thesaurusDb()
Returns the String containing the name of the thesaurus database.
Returns:
String

alternateThesaurusDb

public final String alternateThesaurusDb()
Returns the String containing the name of the alternate thesaurus database. associated with this database.
Returns:
String

deweyDb

public final String deweyDb()
Returns the String containing the name of the dewey database.
Returns:
String

recordIdTag

public final String recordIdTag()
Returns the String containing the BER tag path to the record ID.
Returns:
String

recordSyntax

public final String recordSyntax()
Returns the String containing the preferred record syntax for Z3950 present requests. See the Z39.50 specification
Returns:
String

fullTextRecordSyntax

public final String fullTextRecordSyntax()
Returns the String containing the preferred record syntax for Z3950 present requests for FullText (ElementSetName=T). See the Z39.50 specification
Returns:
String

stopWords

public final StopWord stopWords()
Returns the StopWord object containing the stopwords for the database.
Returns:
StopWord

dbIniFile

public final String dbIniFile()
Returns the String containing the name of the database inifile.
Returns:
String

toString

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

zName

public final String zName()
Returns the String containing the name of the database on the Z3950 Server.
Returns:
String

zServer

public final ZServer zServer()
Returns the ZServer object that owns the database.
Returns:
ZServer

loadFromIniFile

public void loadFromIniFile(IniFile ini)
Initializes a Db object using the configuration information in the input IniFile object.
Parameters:
ini - the input IniFile.

Open SiteSearch 4.1.1
Final