Open SiteSearch 4.1.1
Final

ORG.oclc.db
Class DbDeleted

java.lang.Object
  |
  +--ORG.oclc.db.Db
        |
        +--ORG.oclc.db.DbDeleted

public class DbDeleted
extends Db


Fields inherited from class ORG.oclc.db.Db
CLOSED, dbNames, dbVersion, dumpConfigInfo, globals, modeNames, OPEN, opsClient, parents, sortMap, UPDATE, users, WAITINGTOCLOSE
 
Method Summary
 void accessAllowed(Object dbUserData)
          Determines whether the user is authorized to search the database and throws the appropriate exception indicating whether some action needs to be taken.
 void accessControl(Object accessControlResponse, Object dbUserData)
          Process the information from an AccessControl response to set user specific authorization information.
 TermInfo[] browse(String query, int preferredPosition, int numTerms, DataDir Z39attributesPlusTerm, DataDir resultSetAttributes, int stepSize, Object dbUserData)
          Perform a browse.
 void close()
          close this Db.
 void connect(Object userInformation, Object dbUserData)
          Create a connection to this Db for a user.
 void deleteHitlist(String hitlist, Object dbUserData)
          Delete the specified hitlist.
 void disconnect(Object dbUserData)
          Destroy a connection to this Db for a user.
 ExtSvcData extsvc(ExtSvcData esData, ExtSvcHandler esHandler, Object dbUserData)
          Performs an Extended Services request.
 TermComponentPostings[] getComponentResults(String hitlist, Object dbUserData)
          Get the database component term postings summaries for the specified hitlist.
 DbResults[] getDbResults(String hitlist, Object dbUserData)
          Get the database search summaries for the specified hitlist.
 boolean hasUsers()
          Check if any users are associated with this Db.
protected  boolean init(IniFile inifile, String which)
          Initialize this Db object.
 Object initDbUserData(String sessionId, Object access, Log log, Object userDbMap)
          Creates a database User data object for searching the database - Each database has it's own unique DbUserData object.
 boolean OK()
          Check if the Db is open and ready for requests.
 int postings(String hitlist, Object dbUserData)
          Get postings for a specified hitlist.
 DbPresentData[] present(String hitlist, int startPoint, int numRecs, String elementSetName, String syntax, Object dbUserData)
          Get the specified records from the specified hitlist.
 int search(String query, String hitlist, boolean replaceFlag, DataDir Z39attributesPlusTerm, boolean doRestrictorSummary, Object additionalSearchInfo, Object dbUserData)
          Perform a search.
 void sort(String hitlist, String sortedList, String[] keys, int[] order, boolean fUseSortAttributes, boolean sortAccrossDbs, Object dupCritera, Object userData)
          Sort the hitlist according to the keys.
protected  boolean supportsScan()
          Does this Db support scan requests?
protected  boolean supportsSort()
          Does this Db support sort requests?
protected  void unsort(String hitlist, Object userData)
          Unsort the hitlist.
 
Methods inherited from class ORG.oclc.db.Db
browse, buildSortKeys, closewhenidle, dbnames, deleteHitlist, filterName, getDb, getDbNames, getDbs, getGlobals, getName, getOpenedFilesCount, getOutstandingCount, getStats, numUsers, openDb, openDbs, present, rolldatabase, rolldatabaseusers, search, setOps, setSearchMode, SetupDatabase, SetupDatabase, sort, sort, updateOpenedFiles
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

initDbUserData

public Object initDbUserData(String sessionId,
                             Object access,
                             Log log,
                             Object userDbMap)
Creates a database User data object for searching the database - Each database has it's own unique DbUserData object.
Parameters:
sessionId - assigned by something else
access - the object containing access info to connect to an access server
log - the Log object for the user for tracing
Returns:
userDbMap Object containing all the user's database information objects.
Overrides:
initDbUserData in class Db

accessAllowed

public void accessAllowed(Object dbUserData)
                   throws AccessControl,
                          Diagnostic1
Determines whether the user is authorized to search the database and throws the appropriate exception indicating whether some action needs to be taken.
Parameters:
dbUserData - user data object containing hitlists
Throws:
AccessControl - if an authorization is required for the database and one is not currently available.
Overrides:
accessAllowed in class Db

postings

public int postings(String hitlist,
                    Object dbUserData)
             throws Diagnostic1
Get postings for a specified hitlist.
Parameters:
hitlist - result set name
dbUserData - user data object containing hitlists
Returns:
postings
Throws:
Diagnostic1 - if the hitlist cannot be located
Overrides:
postings in class Db

init

protected boolean init(IniFile inifile,
                       String which)
                throws Exception
Initialize this Db object.
Parameters:
inifile - for parameters
which - section name for inifile for this Db
Returns:
true if successful
Throws:
Exception - if the Db could not be initialized
Overrides:
init in class Db

supportsScan

protected boolean supportsScan()
Does this Db support scan requests?
Returns:
true
Overrides:
supportsScan in class Db

supportsSort

protected boolean supportsSort()
Does this Db support sort requests?
Returns:
true
Overrides:
supportsSort in class Db

present

public DbPresentData[] present(String hitlist,
                               int startPoint,
                               int numRecs,
                               String elementSetName,
                               String syntax,
                               Object dbUserData)
                        throws Exception,
                               Diagnostic1
Get the specified records from the specified hitlist.
Parameters:
hitlist - result set name
startPoint - starts at 1
numRecs - to retrieve
elementSetName - view of record to retrieve
syntax - in which to return record
dbUserData - user data containing hitlists
Returns:
array of BerString records
Throws:
Exception - this was probably an I/O error or a coding error
Diagnostic1 - if the request is not logically correct
Overrides:
present in class Db

search

public int search(String query,
                  String hitlist,
                  boolean replaceFlag,
                  DataDir Z39attributesPlusTerm,
                  boolean doRestrictorSummary,
                  Object additionalSearchInfo,
                  Object dbUserData)
           throws Exception,
                  Diagnostic1,
                  AccessControl,
                  PartialResults
Perform a search.
Parameters:
query - type 0 query or null if this is not type 0
hitlist - result set name to create
replaceFlag - can this hitlist overwrite a previous one?
Z39attributesPlusTerm - non-type 0 query
doRestrictorSummary - flag to return a summary of records
additionalSearchInfo - the Z39.50 additional Search Info field
dbUserData - user data containing hitlists
Returns:
postings count of search
Throws:
Exception - this was probably an I/O error or a coding error
Diagnostic1 - if the request is not logically correct
AccessControl - exception when a db autho/password required to continue.
PartialResults - for a DbMerge created on the fly, one (or more) of the parts had an error
Overrides:
search in class Db

browse

public TermInfo[] browse(String query,
                         int preferredPosition,
                         int numTerms,
                         DataDir Z39attributesPlusTerm,
                         DataDir resultSetAttributes,
                         int stepSize,
                         Object dbUserData)
                  throws Exception,
                         Diagnostic1,
                         AccessControl,
                         PartialResults
Perform a browse.
Parameters:
query - starting term
preferredPosition - of the query term in the returned list
numTerms - to return
Z39attributesPlusTerm - term plus starting point attributes
resultSetAttributes - result set attributes if they are different from the starting point attributes
stepSize - number of terms between terms
dbUserData - user data containing hitlists
Returns:
array of TermInfo terms
Throws:
Exception - this was probably an I/O error or a coding error
Diagnostic1 - if the request is not logically correct
AccessControl - exception when a db autho/password required to continue.
PartialResults - for a DbMerge created on the fly, one (or more) of the parts had an error
Overrides:
browse in class Db

extsvc

public ExtSvcData extsvc(ExtSvcData esData,
                         ExtSvcHandler esHandler,
                         Object dbUserData)
                  throws Exception,
                         Diagnostic1,
                         AccessControl
Performs an Extended Services request.
Parameters:
function - the ES function - see Z39.50 api
packageType - the type of ES request
esTask - the ES task package
userId - the ES userId
description - the ES description field.
packageName - the ES package name
waitAction - the ES wait action value
Returns:
DataDir containing the response task package
Throws:
Exception - this was probably an I/O error or a coding error
Diagnostic1 - if the request is not logically correct
AccessControl - exception when a db autho/password required to continue.
Overrides:
extsvc in class Db

deleteHitlist

public void deleteHitlist(String hitlist,
                          Object dbUserData)
                   throws Exception,
                          Diagnostic1
Delete the specified hitlist.
Parameters:
hitlist - the one to delete
dbUserData - user data containing hitlists
Throws:
Exception - this was probably an I/O error or a coding error
Diagnostic1 - if the request is not logically correct
Overrides:
deleteHitlist in class Db

OK

public boolean OK()
Check if the Db is open and ready for requests.
Returns:
true
Overrides:
OK in class Db

getDbResults

public DbResults[] getDbResults(String hitlist,
                                Object dbUserData)
Get the database search summaries for the specified hitlist.
Parameters:
hitlist - result set name
dbUserData - user data containing hitlists
Returns:
array of DbResults[] for this hitlist
Overrides:
getDbResults in class Db

getComponentResults

public TermComponentPostings[] getComponentResults(String hitlist,
                                                   Object dbUserData)
Get the database component term postings summaries for the specified hitlist.
Parameters:
hitlist - result set name
dbUserData - user data containing hitlists
Returns:
array of TermComponentPostings[] for this hitlist
Overrides:
getComponentResults in class Db

accessControl

public void accessControl(Object accessControlResponse,
                          Object dbUserData)
Process the information from an AccessControl response to set user specific authorization information.
Parameters:
accessControlResponse - object containing the access control response
dbUserData - user data containing hitlists
Overrides:
accessControl in class Db

close

public void close()
close this Db.
Overrides:
close in class Db

hasUsers

public boolean hasUsers()
Check if any users are associated with this Db.
Returns:
true
Overrides:
hasUsers in class Db

connect

public void connect(Object userInformation,
                    Object dbUserData)
             throws Diagnostic1
Create a connection to this Db for a user.
Parameters:
userInformation - the userInformation data from the Z3950 Init request
dbUserData - the user's database information for searching the database.
Overrides:
connect in class Db

disconnect

public void disconnect(Object dbUserData)
Destroy a connection to this Db for a user.
Parameters:
dbUserData - created by connect
Overrides:
disconnect in class Db

sort

public void sort(String hitlist,
                 String sortedList,
                 String[] keys,
                 int[] order,
                 boolean fUseSortAttributes,
                 boolean sortAccrossDbs,
                 Object dupCritera,
                 Object userData)
          throws Exception,
                 Diagnostic1
Sort the hitlist according to the keys.
Parameters:
hitlist - result set name
sortedList - result set name for sorted results
keys - sort key parameters
order - ascending or descending
fUseSortAttributes - flag to sort by use attributes
sortAccrossDatabases - flag to indicate to tell the ZBase that the results should be the sort of all the records from all the databases in the group vs. having the sorts be within each db not merged together where true indicates to sort accross database boundaries.
dupCriteria - the dedup criteria to use for a dedup sort. for each record.
userData - user data containing hitlists
Throws:
Exception - this was probably an I/O error or a coding error
Diagnostic1 - if the request is not logically correct
Overrides:
sort in class Db

unsort

protected void unsort(String hitlist,
                      Object userData)
Unsort the hitlist. Go back to the original results.
Parameters:
hitlist - result set name userData user data containing hitlists
Overrides:
unsort in class Db

Open SiteSearch 4.1.1
Final