com.sun.labs.minion.indexer.entry
Interface Entry

All Superinterfaces:
java.lang.Comparable
All Known Subinterfaces:
IndexEntry, MergeableEntry, QueryEntry
All Known Implementing Classes:
BaseEntry, CasedDFOEntry, CasedEntry, CasedIDEntry, ClusterEntry, ConceptEntry, DFOEntry, DocKeyEntry, FeatureEntry, FieldedDocKeyEntry, IDEntry, IDFreqEntry, IDWEntry, MPCasedDFOEntry, SinglePostingsEntry, TermStatsEntry

public interface Entry
extends java.lang.Comparable

An interface describing things that can be stored in dictionaries, either for indexing purposes or for querying purposes. All entries have a name that can be gotten.


Method Summary
 Entry getEntry()
          Gets a new entry that contains a copy of the data in this entry.
 Entry getEntry(java.lang.Object name)
          Gets a new entry with the given name.
 int getID()
          Gets the ID associated with this entry.
 int getMaxFDT()
          Gets the maximum document term frequency from this entry.
 int getN()
          Gets the number of postings associated with this entry.
 java.lang.Object getName()
          Gets the name of this entry, which can be any object.
 int getNumChannels()
          Returns the number of channels needed to store or retrieve the postings for this entry type.
 Partition getPartition()
          Gets the partition that this entry was drawn from.
 long getTotalOccurrences()
          Gets the total number of occurrences associated with this entry.
 void setDictionary(Dictionary dict)
          Sets the dictionary that this entry was drawn from.
 void setID(int id)
          Sets the ID associated with this entry.
 void setName(java.lang.Object name)
          Sets the name of the entry, which can be any object.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getEntry

Entry getEntry(java.lang.Object name)
Gets a new entry with the given name.

Parameters:
name - the name that we want to give the entry.
Returns:
a new entry.

getEntry

Entry getEntry()
Gets a new entry that contains a copy of the data in this entry.

Returns:
a new entry.

getName

java.lang.Object getName()
Gets the name of this entry, which can be any object.


setName

void setName(java.lang.Object name)
Sets the name of the entry, which can be any object.


getID

int getID()
Gets the ID associated with this entry.


setID

void setID(int id)
Sets the ID associated with this entry.


getN

int getN()
Gets the number of postings associated with this entry. This can be used to sort entries by their frequency during query operations.

Returns:
The number of postings associated with this entry.

getTotalOccurrences

long getTotalOccurrences()
Gets the total number of occurrences associated with this entry. This is useful when a single postings entry may comprise multiple occurrences.

At the moment, this is only really useful for entries from the main dictionary for a partition.

Returns:
The total number of occurrences associated with this entry.

getMaxFDT

int getMaxFDT()
Gets the maximum document term frequency from this entry. For all IDs asssociated with this entry, this is the maximum frequency across all the IDs.


setDictionary

void setDictionary(Dictionary dict)
Sets the dictionary that this entry was drawn from.


getPartition

Partition getPartition()
Gets the partition that this entry was drawn from.


getNumChannels

int getNumChannels()
Returns the number of channels needed to store or retrieve the postings for this entry type.