Open SiteSearch 4.1.1
Final

ORG.oclc.webz
Class ZDb

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

public class ZDb
extends Object

The ZDb class maintains a User's customized database information based on user profiling. It maintains a reference to the static Db object as well as settings indicating the authorization status for the database for the user. ZDb also provides methods to retrieve configuration information for the database.

See Also:
ZServer, Db

Field Summary
protected  String autho
          String data type containing the authorization for the database.
protected  int authorizationStatus
          integer data type containing the user's authorization status for the the database, default = NO_AUTHORIZATION.
protected  Db db
          Db object containg the database definition.
protected  String dedupPreferredDatabaseNames
          String data type containing the user specified preferred database order for dedup requests that can override the system configured list.
protected  boolean hideit
          boolean data type indicating whether to hide the database name in menus generated by the system.
static int IP_DNS_AUTHORIZED
          integer data type defining an Authorization status for the database: Authorized by IP or DNS 2.
static int NAME_AUTHORIZED
          integer data type defining Authorization status for the database: Authorized by Name (Autho/password) 3.
static int NO_AUTHORIZATION
          integer data type defining an Authorization status for the database: No authorization performed: 1.
protected  String password
          String data type containing the password for the database.
protected  boolean requiresAutho
          boolean data type indicating whether the database requires authorization.
 
Constructor Summary
ZDb(Db db)
          Constructs a ZDb object using the information from the input Db object.
 
Method Summary
 String alternateThesaurusDb()
          Returns the String containing the name of the alternate thesaurus database.
 int authorizationStatus()
          Returns an integer indicating the Authorization status for the database.
 Db db()
          Returns the Db object maintained by this ZDb object.
 String dbIniFile()
          Returns the String containing the name of the database inifile.
 DedupKeys dedup()
          Returns the DedupKeys object containing the information needed to perform a Z3950 Dedup for the database.
 String dedupPreferredDatabaseNames()
          Returns the preferred database order for dedup requests, if there is a user specific list stored, it overrides the configuration for the database.
 String deweyDb()
          Returns the String containing the name of the dewey database.
 boolean fCanDoRanked()
          Returns the 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 the database.
 boolean fCanDoTermFinder()
          Returns the boolean indicating whether the database supports the term finder search option.
 boolean fFullText()
          Returns boolean indicating whether the database can show full text.
 Hashtable fmtClassTable()
          Returns a Hashtable object table containing a list of Format objects for the database.
 String fullTextRecordSyntax()
          Returns a String containing the preferred record syntax for Z3950 present requests for FullText (ElementSetName=T).
static Db get(String dbname)
          Returns a Db object for the input database name.
static Hashtable getAllDbs()
          Retrieves a Hashtable object of all Db objects in the system.
 DbAttributes getAttributes()
          Returns the DbAttributes object containing the set of index information for the database.
static Db getDefaultDbGroup()
          Returns the Db object for the database defined as the default Db Group database.
 Format getFormat(String whichone)
          Returns the Format object for the requested format that can be used to format records returned from a Z3950 request.
static String[] getSortedNames()
          Returns a sorted String array of all dbnames for all Db objects in the system.
 String holdingsDb()
          Returns a String containing the name of the holdings info database.
 String ILLService()
          Returns the String containing the ILL Service Type.
 IndexMap indexMap()
          Returns the IndexMap object containing index configuration information for the database.
 boolean isDbGroupDefinition()
          Returns a boolean indicating whether this is a DbGroup database object.
 boolean isHidden()
          Returns the boolean indicating whether database should be hidden in generated menus of databases.
 String longName()
          Returns a String containing the textual long name of the database.
 String name()
          Returns a String containing the database name.
protected  String partialSearchOID()
          Returns the String containing the Z3950 OID for partial searches.
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 a String containing the preferred record syntax for Z3950 present requests.
 boolean remoteAuthorizationRequired()
          Returns a boolean indicating whether remote authorization is required.
 String remoteDatabaseAutho()
          Returns the autho for the remote server hosting the database.
 String remoteDatabasePassword()
          Returns the password for the remote server hosting the database.
 String remoteServerName()
          Returns the name of the remote server hosting the database.
 void setAuthorizationStatus(int status)
          Sets the authorization status for the database to the input integer.
 void setDedupPreferredDatabaseNames(String dbnames)
          Sets the list of database names that specifies the preferred database order for dedup requests, if there is a user specific list stored, it overrides the configuration for the database.
 void setRemoteDatabaseAutho(String autho)
          Sets the authorization string for the database to the input string.
 void setRemoteDatabasePassword(String password)
          Sets the password string for the database to the input string.
 Sort sort()
          Returns the Sort object containing the information needed to perform a Z3950 sort for the database.
 StopWord stopWords()
          Returns the StopWord object containing the list of database stopwords.
 TermFinderInfo termFinderInfo()
          Returns the TermFinderInfo object containing all the parameters for TermFinder Searching
 String thesaurusDb()
          Returns the String containing the name of the thesaurus database.
 String toString()
          Generates the string representation of this object.
 String zName()
          Returns a String containing the name of the database on the Z3950 server.
 ZServer zServer()
          Returns the ZServer object that owns this database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_AUTHORIZATION

public static final int NO_AUTHORIZATION
integer data type defining an Authorization status for the database: No authorization performed: 1.

IP_DNS_AUTHORIZED

public static final int IP_DNS_AUTHORIZED
integer data type defining an Authorization status for the database: Authorized by IP or DNS 2.

NAME_AUTHORIZED

public static final int NAME_AUTHORIZED
integer data type defining Authorization status for the database: Authorized by Name (Autho/password) 3.

db

protected Db db
Db object containg the database definition.

hideit

protected boolean hideit
boolean data type indicating whether to hide the database name in menus generated by the system.

authorizationStatus

protected int authorizationStatus
integer data type containing the user's authorization status for the the database, default = NO_AUTHORIZATION.

requiresAutho

protected boolean requiresAutho
boolean data type indicating whether the database requires authorization.

autho

protected String autho
String data type containing the authorization for the database.

password

protected String password
String data type containing the password for the database.

dedupPreferredDatabaseNames

protected String dedupPreferredDatabaseNames
String data type containing the user specified preferred database order for dedup requests that can override the system configured list. The String is a list of database names separated by spaces.
Constructor Detail

ZDb

public ZDb(Db db)
Constructs a ZDb object using the information from the input Db object.
Parameters:
Db - the database object
Method Detail

authorizationStatus

public final int authorizationStatus()
Returns an integer indicating the Authorization status for the database.
Returns:
int

setAuthorizationStatus

public final void setAuthorizationStatus(int status)
Sets the authorization status for the database to the input integer.

getAllDbs

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

get

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

db

public final Db db()
Returns the Db object maintained by this ZDb object.
Returns:
Db object

getDefaultDbGroup

public static Db getDefaultDbGroup()
Returns the Db object for the database defined as the default Db Group database.
Returns:
Db

getSortedNames

public static String[] getSortedNames()
Returns 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 database supports the term finder search option.
Returns:
boolean

fCanDoSort

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

fCanDoRanked

public final boolean fCanDoRanked()
Returns the 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

fmtClassTable

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

sort

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

dedup

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

dedupPreferredDatabaseNames

public final String dedupPreferredDatabaseNames()
Returns the preferred database order for dedup requests, if there is a user specific list stored, it overrides the configuration for the database.
Returns:
String

setDedupPreferredDatabaseNames

public final void setDedupPreferredDatabaseNames(String dbnames)
Sets the list of database names that specifies the preferred database order for dedup requests, if there is a user specific list stored, it overrides the configuration for the database.

getFormat

public final Format getFormat(String whichone)
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 boolean indicating whether the database can show full text.
Returns:
boolean

ILLService

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

indexMap

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

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 a boolean indicating whether this is a DbGroup database object.
Returns:
boolean

longName

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

name

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

holdingsDb

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

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

termFinderInfo

public final TermFinderInfo termFinderInfo()
Returns the TermFinderInfo object containing all the parameters for TermFinder Searching
Returns:
TermFinderInfo or null if the search option is not supported.
See Also:
TermFinderInfo

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 a String containing the preferred record syntax for Z3950 present requests. See the Z39.50 specification
Returns:
String

fullTextRecordSyntax

public final String fullTextRecordSyntax()
Returns a 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 list of database stopwords.
Returns:
StopWord

dbIniFile

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

partialSearchParms

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

partialSearchOID

protected final String partialSearchOID()
Returns the String containing the Z3950 OID for partial searches. This is currently unsupported.
Returns:
DataDir

toString

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

zName

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

setRemoteDatabaseAutho

public void setRemoteDatabaseAutho(String autho)
Sets the authorization string for the database to the input string.
Parameters:
autho - the autho string

setRemoteDatabasePassword

public void setRemoteDatabasePassword(String password)
Sets the password string for the database to the input string.
Parameters:
password - the password string

remoteDatabaseAutho

public String remoteDatabaseAutho()
Returns the autho for the remote server hosting the database.
Returns:
String

remoteDatabasePassword

public String remoteDatabasePassword()
Returns the password for the remote server hosting the database.

remoteServerName

public String remoteServerName()
Returns the name of the remote server hosting the database.
Returns:
String or null

remoteAuthorizationRequired

public boolean remoteAuthorizationRequired()
Returns a boolean indicating whether remote authorization is required.
Returns:
boolean

zServer

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

Open SiteSearch 4.1.1
Final