|
Open SiteSearch 4.1.1 Final |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ORG.oclc.webz.ZUserData
The ZUserData class is a core class to maintain information of all the Z39.50 activity for a user, from the search history, the list of Z39.50 databases the user has access to, and the currently active Z39.50 connections. It also provides methods to find any information about a user's Z39.50 activities and database/server objects the user has access to.
UserStateObject
,
ZDb
,
ZServer
,
WebZUserHistory
Field Summary | |
protected int |
accessControlInterruptedCommand
|
protected Hashtable |
zSessions
Hashtable object containing a list of the active Z39session objects for the user. |
Constructor Summary | |
ZUserData()
Constructs a ZUserData object. |
Method Summary | |
int |
accessControlInterruptedCommand()
Returns an integer containing the WebZUserHistory action number for which the command was interrupted because a bad autho was passed to a remote server in ZBase. |
void |
addDatabaseToDbList(String dbName,
int status)
Adds the dbname to the user's list of valid databases with the status set to the incoming status |
void |
addDbtoList(ZDb db)
Adds a ZDb object to the user's database table. |
void |
delete(UserStateObject user)
Cleans up the ZUserData object for the input UserStateObject by closing all Z3950 connections and releasing access to any objects the class maintains. |
void |
deleteDatabaseFromDbList(String dbName)
Deletes the dbname from the user's list of valid databases. |
int |
entryNumber(String resultSetName)
Retrieves an integer containing the history entry number within the Vector of WebZUserHistory objectes for the input resultSetName. |
void |
flushCache(String format)
Flush the FETCH cache |
String |
formattedSortKeys(String resultSetName,
String separator,
boolean addSortOrder)
Creates a String containing a formatted list of the textual sortKey names for display based for the input resultSetName. |
static ZUserData |
get(UserStateObject user)
Retrieves a ZUserData object for the input UserStateObject. |
CacheData |
getCacheData(String format)
Get the CacheData object for the given format |
ZDb |
getDb(String resultSetName)
Retrieves a ZDb object for first database in input resultSetName's DbResults array from the search. |
ZDb |
getDb(String resultSetName,
int whichDb)
Retrieves a ZDb object object for a database for the input resultSetName and the item number from within the DbResults array from the search. |
String |
getDbName(String resultSetName)
Retrieves a String containing the database name(s) for the input resultSetName. |
String |
getDbName(String resultSetName,
int whichDb)
Retrieves a String containing a particular database name for the resultSetName and the item number within the DbResults array. |
String |
getDbNameFromZName(String zName)
Retrieves a String containing the dbname from the input zName of the database. |
String |
getDisplayQuery(String resultSetName)
Retrieves a String containing the display (pretty) query for the input resultSetName. |
String |
getDisplayQueryLimits(String resultSetName)
Retrieves a String containing the display (pretty) query limits for the input resultSetName. |
String |
getElementSetName(String resultSetName)
Retrieves a String containing the ElementSetName used on the last present request for the input resultSetName. |
String |
getFormattingClass(String resultSetName)
Retrieves a String containing the formatting class used on the last present request for the input resultSetName. |
int |
getHistoryEntryNumber(String resultSetName)
Retrieves an integer containing an index into the Vector of WebZUserHistory objects for the SEARCH activity history entry of the input resultSetName. |
ImageInfo |
getImageInfo(String dbname,
String resultSetName,
int recno)
Retrieves an ImageInfo object from the Vector or WebZUserHistory objects for the input record number/resultset which can be used as a guide to retrieve images from a newton database. |
int |
getIntLastResultSet()
Retrieves an integer containing the value for the last resultSetName EXCLUDING temporary database searches. |
int |
getIntLastResultSet(boolean includeTDbSearches)
Retrieves an integer containing the value for the last resultSetName INCLUDING temporary database searches. |
ZDb |
getLastDbGroup()
Retrieves the last ZDb object saved in the Vector of WebZUserHistory objects INCLUDING temporary database searches. |
ZDb |
getLastDbGroup(boolean includeTDbSearches)
Retrieves the last ZDb object saved in the Vector of WebZUserHistory objects EXCLUDING temporary database searches. |
String |
getLastDbName()
Retrieves a String containing the database name(s) of the last database searched. |
DbResults[] |
getLastDbResults()
Retrieves the DbResults array saved in the Vector of WebZUserHistory objects EXCLUDING temporary database searches. |
DbResults[] |
getLastDbResults(boolean includeTDbSearches)
Retrieves the DbResults array saved in the Vector of WebZUserHistory objects INCLUDING temporary database searches. |
WebZUserHistory |
getLastHistoryEntry(String resultSetName)
Retrieves a WebZUserHistory object for the last history entry for any activity on the input resultSetName. |
String |
getLastResultSet()
Retrieves a String containing the last resultSetName EXCLUDING temporary database searches. |
String |
getLastResultSet(boolean includeTDbSearches)
Retrieves a String containing the last resultSetName used INCLUDING temporary database (tdbname) searches. |
String |
getLongDbName(String dbname)
Retrieves a String containing the database longName(s) separated by spaces for the input database name. |
String |
getLongDbName(String dbname,
String separator)
Retrieves a String containing the database longName(s) separated by the input separator for the input database name. |
int |
getOriginalPostingsForDedupedSearch(String dedupResultSetName)
Returns an integer containing the result count of the original search results for a deduped search. |
String |
getOriginalResultSetForDedupedSearch(String dedupResultSetName)
Returns a string containing the resultset name of the original search results for a deduped search. |
int |
getPostings(String resultSetName)
Retrieves an integer containing the database postings count for the first database in the DbResults array object for the search specified in the input resultSetName. |
int |
getPostings(String resultSetName,
int whichDb)
Retrieves an integer containing the database postings count for the input resultSetName and the item number within the DbResults array object for the search. |
int |
getPostings(String resultSetName,
String dbname)
Retrieves an integer containing the database postings count for the input database name in the resultSet |
String |
getQuery(String resultSetName)
Retrieves a String containing the query string used on the Z3950 query for the input resultSetName. |
String |
getQueryComponent(String resultSetName,
String componentName)
Retrieves a String containing the query component data for the input resultSetName and the component(widget) name. |
DataPairs |
getQueryComponents(String resultSetName)
Retrieves the DataPairs object containing all the components of a query for the input resultSetName. |
String |
getQueryLimits(String resultSetName)
Retrieves a String containing the query limts used in the Z3950 query for the input resultSetName. |
Vector |
getResultSets()
Retrieves a Vector object containing a list of Strings with all currently used search resultSetNames. |
DataPairs |
getScanQueryData()
Retrieves a DataPairs object containing the components of the SCAN query terms from the LAST executed scan request. |
String |
getSearchElementSetName(String resultSetName)
Retrieves a String containing the ElementSetName from the search request for the input resultSetName. |
WebZUserHistory |
getSearchHistoryEntry(String resultSetName)
Retrieves a WebZUserHistory object for the SEARCH activity history entry of the input resultSetName. |
DbResults[] |
getSearchResults(String resultSetName)
Retrieves a DbResults array containing the search results for the input resultSetName. |
String[] |
getSortedDbNames()
Retrieves a String array object containing the user's database names in sorted order. |
String[] |
getSortKeys(String resultSetName)
Retrieves a String array object containing the sortKeys for the input resultSetName. |
int[] |
getSortOrders(String resultSetName)
Retrieves an integer array object containing the sortOrders for the input resultSetName. |
int |
getTotalPostings(String resultSetName)
Retrieves an integer containing the total postings count for the input resultSetName. |
ZDb |
getZDb(String dbname)
Retrieves a ZDb object for the input database name. |
ZDb |
getZDbFromSearch(String resultSetName)
Retrieves the ZDb object used in the search named by the input resultSetName. |
Hashtable |
getZDbList()
Retrieves a Hashtable object containing a list of ZDb objects that the user has access to. |
ZServer |
getZServer()
Retrieves a ZServer object for the current ZServer object in use. |
ZServer |
getZServer(ZDb db)
Retrieves the ZServer object that services the input ZDb object. |
Z39session |
getZSession()
Retrieves a Z39session object for the current ZServer the user has access to. |
Z39session |
getZSession(ZServer zServer)
Retrieves a Z39session object connected to the server defined in the input ZServer object. |
boolean |
hasDefaultDbList()
Returns boolean indicating whether the user has a database list that is customized for their session(profiled) or the globally available database list defined for all users. |
void |
init(UserStateObject user)
Initializes the ZUserData object for the input UserStateObject. |
DataDir |
initUserInformation()
Retrieves the DataDir object containing the Z3950-INIT UserInformation data to be passed on the init request to the server. |
boolean |
initZSession(UserStateObject user)
Establishes a Z3950 session on the current Z39 server for the user by issuing a Z3950 Init Request. |
boolean |
initZSession(UserStateObject user,
Z39session z39sess,
ZServer zServer)
Establishes a Z3950 session for user for the input Z39session and ZServer objects by issuing a Z3950 Init Request. |
boolean |
initZSession(UserStateObject user,
ZDb Db)
Establishes a Z3950 session for the user for the input ZDb Database object by issuing a Z3950 Init Request. |
boolean |
initZSession(UserStateObject user,
ZDb Db,
String autho,
String password)
Establishes a Z3950 session for the user for input Database using the input autho and password by issuing a Z3950 Init Request. |
boolean |
initZSession(UserStateObject user,
ZDb Db,
String autho,
String password,
String newPassword)
Establishes a Z3950 session for the user for the input ZDb Database object, autho, password, and newpassword by issuing a Z3950 Init Request. |
boolean |
isDbGroupSearch(String resultSetName)
Returns a boolean whether the search is a DbGroup search (multiple databases) for the input resultSetName. |
boolean |
isDeduped(String resultSetName)
Returns a boolean indicating whether the search's results are from a deduped sorted resultset. |
boolean |
isRanked(String resultSetName)
Returns a boolean indicating whether the search's results are ranked for the input resultSetName. |
boolean |
isSorted(String resultSetName)
Returns a boolean indicating whether the search's results are sorted for the input resultSetName. |
boolean |
isTemp(String resultSetName)
Returns a boolean indicating whether the search's results are from a temporary database (tdbname) search for the input resultSetName. |
void |
removeDbfromList(ZDb db)
Removes the input ZDb object from the user's database list. |
String[] |
requiresInputAuthorization(String dbname)
Returns a String array of database names from the input dbname string containing the names that require input authorization. |
void |
resetDbList(Vector dbList,
int status)
Resets the user's list of ZDb objects to the list of database names provided in input Vector. |
void |
saveImageInfo(String resultSetName,
ImageInfo imageInfo)
Saves an ImageInfo info object in the user's Vector of WebZUserHistory objects for the input record number/resultset which can be used as a guide to retrieve images from a newton database. |
void |
setDbAuthorization(String dbname,
String autho,
String password)
Sets the db autho / password for the input database name(s). |
ZDb |
setDbFromWidgets(DataPairs widgets)
Sets up the dbname and dbgroup from the input widgets in the user state as "dbname" and "dbgroup" and returns the correct ZDb object. |
void |
setDedupPreferredDatabaseNames(String dbnames)
Sets the dedup preferred database name list to the input space separated list of database names for user's dedup requests so that the application can control the order of the returned duplicates duplicates on a per user basis - otherwise the database configuration information is used. |
void |
setInitUserInformation(DataDir initUserInformation)
Sets a DataDir containing the Z3950-INIT UserInformation data that will be passed in the init request to the server. |
String |
toString()
Generates a String representation of the object. |
void |
updateCache(String resultSetName,
int realStartRecno,
int numrecs,
String format,
String syntax,
Vector dataRecs)
Update the cache with the current data |
Z39session |
z39session()
Returns a Z39session object for the current Z3950 session in use. |
ZDb |
zDb()
Returns a ZDb object for the current database in use. |
ZServer |
zServer()
Returns a ZServer object for the current ZServer in use. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected Hashtable zSessions
protected int accessControlInterruptedCommand
Constructor Detail |
public ZUserData()
Method Detail |
public int accessControlInterruptedCommand()
public void saveImageInfo(String resultSetName, ImageInfo imageInfo)
resulSetName
- the resultSet for the image objectimageInfo
- the ImageInfo object for the recordnumpublic ImageInfo getImageInfo(String dbname, String resultSetName, int recno)
dbname
- the name of the databaseresulSetName
- the resultSet for the image objectrecno
- the record number with the resultSetpublic String getElementSetName(String resultSetName)
resulSetName
- the resultSet for the presentString
- or nullpublic String getSearchElementSetName(String resultSetName)
resulSetName
- the resultSet for the presentString
- or nullpublic String getFormattingClass(String resultSetName)
resulSetName
- the resultSet for the presentpublic DbResults[] getSearchResults(String resultSetName)
resultSetName
- the search resultSetNamepublic int entryNumber(String resultSetName)
resultSetName
- the search resultset namepublic String getLastResultSet()
public String getLastResultSet(boolean includeTDbSearches)
includeTDbSearches
- flag indicating whether to include/ignore temporary
database searches in the lookup.public ZDb getLastDbGroup()
public ZDb getLastDbGroup(boolean includeTDbSearches)
includeTDbSearches
- flag indicating whether to include/ignore temporary
database searches in the lookup.public DbResults[] getLastDbResults()
public DbResults[] getLastDbResults(boolean includeTDbSearches)
includeTDbSearches
- flag indicating whether to include/ignore temporary
database searches in the lookup.public DataPairs getScanQueryData()
public String getQuery(String resultSetName)
resultSetName
- the search resultset namepublic String getDisplayQuery(String resultSetName)
resultSetName
- the search resultset namepublic String getQueryComponent(String resultSetName, String componentName)
resultSetName
- the search resultset namecomponentName
- the index or term widget from the input query.public DataPairs getQueryComponents(String resultSetName)
resultSetName
- the search resultset namepublic String getQueryLimits(String resultSetName)
resultSetName
- the search resultset namepublic String getDisplayQueryLimits(String resultSetName)
resultSetName
- the search resultset namepublic String[] getSortKeys(String resultSetName)
resultSetName
- the search resultset namepublic int[] getSortOrders(String resultSetName)
resultSetName
- the search resultset namepublic boolean isSorted(String resultSetName)
resultSetName
- the search resultset namepublic boolean isRanked(String resultSetName)
resultSetName
- the search resultset namepublic boolean isTemp(String resultSetName)
resultSetName
- the search resultset namepublic boolean isDeduped(String resultSetName)
resultSetName
- the search resultset namepublic boolean isDbGroupSearch(String resultSetName)
resultSetName
- the search resultset namepublic Vector getResultSets()
public String toString()
public void init(UserStateObject user)
public boolean hasDefaultDbList()
public void resetDbList(Vector dbList, int status)
dbList
- Vector of authorized database names.status
- ZDb authorization status for the database.ZDb
public void addDatabaseToDbList(String dbName, int status)
dbName
- the authorized Database namestatus
- the ZDb authorization status for the database.ZDb
public void deleteDatabaseFromDbList(String dbName)
dbName
- the authorized Database namepublic void setDedupPreferredDatabaseNames(String dbnames)
dbnames
- space separated list of database namespublic String[] getSortedDbNames()
public void addDbtoList(ZDb db)
public void delete(UserStateObject user)
user
- the UserStateObject that owns this application contextpublic String getDbName(String resultSetName)
resultSetName
- the name of the search to accesspublic String getDbName(String resultSetName, int whichDb)
resultSetName
- the name of the search to accesswhichDb
- the db entry to access in the search resultpublic String formattedSortKeys(String resultSetName, String separator, boolean addSortOrder)
resultSetName
- the name of the sorted resultsetseparator
- the string separator for multiple keysaddSortOrder
- flag to indicate whether to add the sort order in parens. (a) or (d)public String getDbNameFromZName(String zName)
zName
- the z39.50 database namepublic ZDb getDb(String resultSetName, int whichDb)
resultSetName
- the name of the search to accesswhichDb
- the db entry to access in the search resultpublic ZDb getDb(String resultSetName)
resultSetName
- the name of the search to accesspublic ZDb getZDbFromSearch(String resultSetName)
resultSetName
- the name of the search to accesspublic WebZUserHistory getSearchHistoryEntry(String resultSetName)
resultSetName
- the name of the resultSet for the search resultpublic WebZUserHistory getLastHistoryEntry(String resultSetName)
resultSetName
- the name of the resultSet for the search resultpublic int getHistoryEntryNumber(String resultSetName)
resultSetName
- the name of the resultSet for the search resultpublic int getIntLastResultSet()
public int getIntLastResultSet(boolean includeTDbSearches)
includeTDbSearches
- flag indicating whether to include/ignore temporary
database searches in the lookup.public String getLastDbName()
public String getLongDbName(String dbname)
public String getLongDbName(String dbname, String separator)
public int getPostings(String resultSetName, int whichDb)
resultSetName
- the name of the search to accesswhichDb
- the db entry to access in the search resultpublic int getPostings(String resultSetName, String dbname)
resultSetName
- the name of the search to accessdbname
- the database name to find the postings forpublic int getPostings(String resultSetName)
resultSetName
- the name of the search to accesspublic int getTotalPostings(String resultSetName)
resultSetName
- the search resultset name.public int getOriginalPostingsForDedupedSearch(String dedupResultSetName)
dedupResultSetName
- the deduped search resultset namepublic String getOriginalResultSetForDedupedSearch(String dedupResultSetName)
dedupResultSetName
- the deduped search resultset namepublic ZDb setDbFromWidgets(DataPairs widgets)
widgets
- the input widgets from a command.public ZDb getZDb(String dbname)
dbname
- the name of the databasepublic void setDbAuthorization(String dbname, String autho, String password)
dbname
- the name of the databaseautho
- the authorizationpassword
- the passwordpublic String[] requiresInputAuthorization(String dbname)
dbname
- the name of the databasepublic Hashtable getZDbList()
public Z39session getZSession()
Z39session
public Z39session getZSession(ZServer zServer)
ZServer
- Z39.50 server objectZ39session
public ZServer getZServer()
public ZServer getZServer(ZDb db)
ZDb
- database objectpublic void setInitUserInformation(DataDir initUserInformation)
initUserInformation
- the DataDir containing the information.public DataDir initUserInformation()
public boolean initZSession(UserStateObject user) throws Exception
user
- the user contextpublic boolean initZSession(UserStateObject user, ZDb Db) throws Exception
user
- the user contextZDb
- the database objectpublic boolean initZSession(UserStateObject user, ZDb Db, String autho, String password) throws Exception
user
- the user contextZDb
- the database objectautho
- for the init requestpassword
- for the init requestpublic boolean initZSession(UserStateObject user, ZDb Db, String autho, String password, String newPassword) throws Exception
user
- the user contextZDb
- the database objectautho
- for the init requestpassword
- for the init requestnewPassword
- for the init requestpublic boolean initZSession(UserStateObject user, Z39session z39sess, ZServer zServer) throws Exception
user
- the user contextZ39session
- the class to build the connection onZServer
- the Z39.50 server objectpublic void removeDbfromList(ZDb db)
ZDb
- the database to removepublic ZDb zDb()
public ZServer zServer()
public Z39session z39session()
public static ZUserData get(UserStateObject user)
user
- the user objectpublic CacheData getCacheData(String format)
format
- The desire formatpublic void updateCache(String resultSetName, int realStartRecno, int numrecs, String format, String syntax, Vector dataRecs)
resultSetName
- The result set nameresultSetStartRecno
- The result set start record numbernumrecs
- The number of records in the setformat
- The record formatsyntax
- The record syntaxdataRecs
- The recordspublic void flushCache(String format)
format
- of the records
|
Open SiteSearch 4.1.1 Final |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |