All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ORG.oclc.z39.TermInfo

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

public class TermInfo
extends Object
TermInfo is returned by a Z39-50 Scan request.

Version:
@(#)TermInfo.java 1.1 07/09/97

Variable Index

 o a
 o alternativeTerm
 o b
 o displayTerm
 o globalOccurrences
 o Term
 o termType

Constructor Index

 o TermInfo()
 o TermInfo(DataDir)
 o TermInfo(String, String)

Method Index

 o addByAttribute(Attribute[], String, int)
Add these attributes to this term.
 o addByAttribute(TermInfo, String, Attribute[])
Merge the byAttribute of otherTerm with the byAttribute of this term.
 o alternativeTerm()
 o buildDir(String, String, Attribute[], int, byAttributes[])
Build a DataDir TermInfo from the parameters
 o buildDir(TermInfo)
Build a DataDir TermInfo from the TermInfo object
 o compareTo(String)
 o compareTo(TermInfo)
 o displayTerm()
 o getFirstDBOffset()
 o getFirstUse()
 o getNumGTZero()
 o getRawText()
 o getText()
 o mergeDbOccurrences(String)
Combine the by database information into a single count with the specified database name
 o setByAttribute(String, Attribute[])
If byAttribute does not exist, create one.
 o Term()
 o termCount()
 o termType()
 o toString()
 o trim(int)
Clean up Term to be a displayTerm.

Variables

 o Term
 public String Term
 o displayTerm
 public String displayTerm
 o alternativeTerm
 public String alternativeTerm
 o termType
 public int termType
 o a
 public Attribute a[]
 o globalOccurrences
 public int globalOccurrences
 o b
 public byAttributes b[]

Constructors

 o TermInfo
 public TermInfo()
 o TermInfo
 public TermInfo(String term,
                 String displayTerm)
 o TermInfo
 public TermInfo(DataDir termInfo) throws Diagnostic1

Methods

 o getNumGTZero
 public int getNumGTZero()
Returns:
the number of attributes with non-zero counts for this term
 o getFirstDBOffset
 public int getFirstDBOffset()
 o getText
 public final String getText()
Returns:
displayTerm if it exists, else Term
 o getRawText
 public final String getRawText()
Returns:
Term
 o termCount
 public final int termCount()
Returns:
globalOccurrences
 o displayTerm
 public final String displayTerm()
Returns:
displayTerm
 o alternativeTerm
 public final String alternativeTerm()
Returns:
alternativeTerm
 o termType
 public final int termType()
 o Term
 public final String Term()
Returns:
Term
 o trim
 public void trim(int n)
Clean up Term to be a displayTerm.

 o getFirstUse
 public int getFirstUse()
Returns:
the first use attribute for this term
 o mergeDbOccurrences
 public void mergeDbOccurrences(String newName)
Combine the by database information into a single count with the specified database name

Parameters:
newName - the new database name
 o compareTo
 public int compareTo(String anotherTerm)
Parameters:
anotherTerm - compare this term to anotherTerm
Returns:
true if the terms are equal
 o compareTo
 public int compareTo(TermInfo anotherTerm)
Parameters:
anotherTerm - compare this term to anotherTerm
Returns:
true if the terms are equal
 o setByAttribute
 public void setByAttribute(String dbName,
                            Attribute defaultAttrs[])
If byAttribute does not exist, create one. If attributes exist, create the byAttribute from the dbName and attributes. If attributes does not exist, create byAttribute from the default attributes and the dbName.

Parameters:
dbName - database name for byAttribute
defaultAttrs - list of default attributes
 o addByAttribute
 public void addByAttribute(TermInfo otherTerm,
                            String dbName,
                            Attribute defaultAttrs[])
Merge the byAttribute of otherTerm with the byAttribute of this term.

Parameters:
otherTerm - term containing attributes to merge with this term
dbName - database name for these attributes
defaultAttrs - default attributes for this term
 o addByAttribute
 public void addByAttribute(Attribute a[],
                            String dbName,
                            int postings)
Add these attributes to this term.

Parameters:
a - attributes to add
dbName - database name for attributes
postings - record count for attributes
 o buildDir
 public static DataDir buildDir(String term,
                                String displayTerm,
                                Attribute a[],
                                int globalOccurrences,
                                byAttributes b[])
Build a DataDir TermInfo from the parameters

 o buildDir
 public static DataDir buildDir(TermInfo t)
Build a DataDir TermInfo from the TermInfo object

 o toString
 public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index