Open SiteSearch 4.1.1
Final

ORG.oclc.z39
Class DbResults

java.lang.Object
  |
  +--ORG.oclc.z39.DbResults

public class DbResults
extends Object

DbResults returns additional search information by database.


Field Summary
 TermComponentPostings[] componentResults
          TermComponentPostings Information, if present.
 int count
          Record count
 String[] dbName
          List of database names for these results
 Diagnostic1 diagnostic
          Diagnostic for ERRORS
 int fetchOffset
          For combined databases, the first record number for retrieval
 oclcUserInformation7 oclc7
          The partial search results information.
 oclcUserInformation8 oclc8
          The ranked query results.
 int[] restrictorCounts
          Record counts for each restrictor
 String[] restrictorNames
          List of names of restrictors represented in this result set
 int[] restrictorUses
          List of attribute type = use values for these restrictors
 
Constructor Summary
DbResults()
           
DbResults(DataDir resultsbyDb)
           
DbResults(String[] dbname, int hitcount)
           
DbResults(String[] dbname, int hitcount, int fetchOffset)
           
DbResults(String dbname, int hitcount)
           
DbResults(String dbname, int hitcount, int fetchOffset)
           
 
Method Summary
 void addDiagnostic(Diagnostic1 d)
          Save a Diagnostic
 void addDiagnostic(int errorCode, String errorMsg)
          Create a Diagnostic
static String allNames(DbResults[] results)
          Given an array of DbResults, create a string with all the dbnames
 boolean assembleDir(DataDir parent)
          assemble a directory node with the DbResults information
 String dbName()
          Get the dbName
 Diagnostic1 diagnostic()
          Get the diagnostic
 String diagnostic1Info()
          Return the official diagnostic error message (Diagnostic1.msg()) from the result diagnostic code.
 int firstRecno()
          Get the first Record number for the database from the resultset
static TermComponentPostings[] getComponentPostings(DbResults[] results)
          Given an array of DbResults, get the component results from the search
static oclcUserInformation7 getPartialResults(DbResults[] results)
          Given an array of DbResults, get the partial results search information from the oclcUserInformation7 data
static oclcUserInformation8 getUserInfo8(DbResults[] results)
          Given an array of DbResults, get the partial results search information from the oclcUserInformation8 data
 boolean hasError()
          Test to see if entry has errors (diagnostics associated with it)
 int postings()
          Get the search postings
 String toString()
          Generate a String representation of this object
static int totalPostings(DbResults[] results)
          Given an array of DbResults, calculate the total postings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dbName

public String[] dbName
List of database names for these results

count

public int count
Record count

diagnostic

public Diagnostic1 diagnostic
Diagnostic for ERRORS

fetchOffset

public int fetchOffset
For combined databases, the first record number for retrieval

restrictorNames

public String[] restrictorNames
List of names of restrictors represented in this result set

restrictorUses

public int[] restrictorUses
List of attribute type = use values for these restrictors

restrictorCounts

public int[] restrictorCounts
Record counts for each restrictor

oclc7

public oclcUserInformation7 oclc7
The partial search results information.

oclc8

public oclcUserInformation8 oclc8
The ranked query results.

componentResults

public TermComponentPostings[] componentResults
TermComponentPostings Information, if present.
Constructor Detail

DbResults

public DbResults()

DbResults

public DbResults(String dbname,
                 int hitcount)
Parameters:
dbname - the database name
hitcount - the result search count

DbResults

public DbResults(String dbname,
                 int hitcount,
                 int fetchOffset)
Parameters:
dbname - the database name
hitcount - the result search count
fetchOffset - the offset to start record reads from

DbResults

public DbResults(String[] dbname,
                 int hitcount)
Parameters:
dbname - array of database names
hitcount - the result search count

DbResults

public DbResults(String[] dbname,
                 int hitcount,
                 int fetchOffset)
Parameters:
dbname - array of database names
hitcount - the result search count
fetchOffset - the offset to start record reads from

DbResults

public DbResults(DataDir resultsbyDb)
Method Detail

hasError

public boolean hasError()
Test to see if entry has errors (diagnostics associated with it)
Returns:
boolean true = has error, false = good search

diagnostic1Info

public String diagnostic1Info()
Return the official diagnostic error message (Diagnostic1.msg()) from the result diagnostic code. If the diagnostic error code == Diagnostic1.unspecifiedError and there is text stored with the error, then send the text back, otherwise get the message associated with the diagnostic1 error code.
Returns:
String with diagnostic text

addDiagnostic

public void addDiagnostic(int errorCode,
                          String errorMsg)
Create a Diagnostic
Parameters:
errorCode - the diagnostic error code
errorMsg - the diagnostic error message

addDiagnostic

public void addDiagnostic(Diagnostic1 d)
Save a Diagnostic
Parameters:
d - the diagnostic1 object to save

assembleDir

public boolean assembleDir(DataDir parent)
assemble a directory node with the DbResults information
Parameters:
parent - the parent node of a data dir to add the info to

dbName

public String dbName()
Get the dbName
Returns:
String

postings

public int postings()
Get the search postings
Returns:
int

firstRecno

public int firstRecno()
Get the first Record number for the database from the resultset
Returns:
int

diagnostic

public Diagnostic1 diagnostic()
Get the diagnostic
Returns:
Diagnostic1

toString

public String toString()
Generate a String representation of this object
Returns:
String
Overrides:
toString in class Object

totalPostings

public static int totalPostings(DbResults[] results)
Given an array of DbResults, calculate the total postings
Returns:
int totalPostings

allNames

public static String allNames(DbResults[] results)
Given an array of DbResults, create a string with all the dbnames
Returns:
String all database Names

getPartialResults

public static oclcUserInformation7 getPartialResults(DbResults[] results)
Given an array of DbResults, get the partial results search information from the oclcUserInformation7 data
Returns:
oclcUserInformation7 object

getUserInfo8

public static oclcUserInformation8 getUserInfo8(DbResults[] results)
Given an array of DbResults, get the partial results search information from the oclcUserInformation8 data
Returns:
oclcUserInformation8 object

getComponentPostings

public static TermComponentPostings[] getComponentPostings(DbResults[] results)
Given an array of DbResults, get the component results from the search
Returns:
TermComponentPostings array

Open SiteSearch 4.1.1
Final