Open SiteSearch 4.1.1
Final

ORG.oclc.obi.util
Class BookMarkEntry

java.lang.Object
  |
  +--ORG.oclc.obi.util.BookMarkEntry

public class BookMarkEntry
extends Object

The BookMarkEntry class describes a record that is being saved via the Extended Verb BookMark. A brief representation and some retrival information is stored aid in providing additional processing of the saved record.

See Also:
DataPairs, BookMark

Field Summary
static int DBNAME
          integer data type defining the fldid where the DBNAME gets added to the record.
 Vector duplicates
          The duplicate records for the bookmark
 
Constructor Summary
BookMarkEntry()
          Constructs a null BookMark object.
BookMarkEntry(DataPairs info, Object data)
          Constructs a BookMarkEntry object.
BookMarkEntry(String dbName, String fileName, String resultSet, int recno, String elementSetName, String fmtclass, Object data)
          Constructs a BookMarkEntry object.
 
Method Summary
 String dbName()
          Retrieves the database name for the bookmark.
 String elementSetName()
          Retrieves the elementSetName of the bookmark.
 String fileName()
          Retrieves the Absolute filename for the bookmark.
static BookMarkEntry findEntry(String resultset, int record, String dbname, String ESN, Vector userBookMarks)
          Utility method that returns the BookMarkEntry object for the input resulset, recordnumber, database, and format from the user's bookmarks.
 String fmtClassName()
          Retrieves the name of the fmt class used to format the brief bookmark.
 String formattedData()
          Retrieves the formatted data (brief representation) for the bookmark.
 String get(String name)
          Retrieves any of the data stored in the info DataPairs.
 DataPairs info()
          Retrieves the bookmark's DataPairs (information used to describe the bookmark).
 String name()
          Retrieves the file name for the bookmark.
 Object rawData()
          Retrive the unformatted bookmark data (DataDir).
 String recno()
          Retrieves the record number for the bookmark.
 String resultSet()
          Retrieves the Z39.50 resultSet name for the bookmark.
 void saveDuplicate(String dbName, String fileName)
          Saves a duplicate record for this bookmarked entry
 void saveFormattedData(String data)
          Updates the data field of the bookmark.
NOTE: Generally this method is used to override the raw data with a brief String represetation of the data.
 String toString()
          Generates the string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DBNAME

public static final int DBNAME
integer data type defining the fldid where the DBNAME gets added to the record.

duplicates

public Vector duplicates
The duplicate records for the bookmark
Constructor Detail

BookMarkEntry

public BookMarkEntry()
Constructs a null BookMark object.

BookMarkEntry

public BookMarkEntry(String dbName,
                     String fileName,
                     String resultSet,
                     int recno,
                     String elementSetName,
                     String fmtclass,
                     Object data)
Constructs a BookMarkEntry object.
Parameters:
dbName - the database name for the saved Record
resultSet - the name of the resultSet
recno - the record number within the resultSet
elementSetName - the saved record elementsetname used to retrieve the bookmarked data.
fmtclass - the name of the formatting class used to display the bookmarked data.
data - the raw data retrieved from the database (DataDir).

BookMarkEntry

public BookMarkEntry(DataPairs info,
                     Object data)
Constructs a BookMarkEntry object.
Parameters:
info - the prebuilt DataPairs object of info about the BookMarked record.
data - the raw data retrieved from the database (DataDir).
Method Detail

saveDuplicate

public void saveDuplicate(String dbName,
                          String fileName)
Saves a duplicate record for this bookmarked entry

info

public DataPairs info()
Retrieves the bookmark's DataPairs (information used to describe the bookmark).
Returns:
DataPairs describing the bookmark.

formattedData

public String formattedData()
Retrieves the formatted data (brief representation) for the bookmark.
Returns:
String or null if the data is not formatted.

saveFormattedData

public void saveFormattedData(String data)
Updates the data field of the bookmark.
NOTE: Generally this method is used to override the raw data with a brief String represetation of the data.
Parameters:
data - the raw data retrieved from the database (DataDir).

rawData

public Object rawData()
Retrive the unformatted bookmark data (DataDir).
Returns:
record Vector or null if data not a Vector

get

public String get(String name)
Retrieves any of the data stored in the info DataPairs.
Parameters:
name - the of the bookmark descriptor.
Returns:
String value of the bookmark descriptor.

name

public String name()
Retrieves the file name for the bookmark.
Returns:
String

dbName

public String dbName()
Retrieves the database name for the bookmark.
Returns:
name of the ZDb object

fileName

public String fileName()
Retrieves the Absolute filename for the bookmark. This filename is where the BER record is stored. This filename includes JaSSI user temp directory.
Returns:
fully qualified filename.

elementSetName

public String elementSetName()
Retrieves the elementSetName of the bookmark.
Returns:
Z39.50 elementSetName the bookmark was created with.

fmtClassName

public String fmtClassName()
Retrieves the name of the fmt class used to format the brief bookmark.
Returns:
name of the brief formatting class

recno

public String recno()
Retrieves the record number for the bookmark. This record number is relative Z39.50 resultset.
Returns:
String representation

resultSet

public String resultSet()
Retrieves the Z39.50 resultSet name for the bookmark.
Returns:
String

toString

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

findEntry

public static BookMarkEntry findEntry(String resultset,
                                      int record,
                                      String dbname,
                                      String ESN,
                                      Vector userBookMarks)
Utility method that returns the BookMarkEntry object for the input resulset, recordnumber, database, and format from the user's bookmarks.
Parameters:
resultset - the search resultset name
record - the record number
dbname - the name of the database for the record
ESN - the element set name (e.g.: 'F', 'T')
userBookMarks - the currently saved records for the user.
Returns:
BookMarkEntry for the entry or null if not found

Open SiteSearch 4.1.1
Final