lempinen.neatseeker.core
Class Entry

java.lang.Object
  |
  +--lempinen.neatseeker.core.Entry

public class Entry
extends java.lang.Object

Encapsulates the information for a particular index entry. The Entries are not really stored anywhere. They are only used for passing messages from a RepositoryMaker to the Repository, from the Repository to a Bucket and from the Bucket to a PointerList. An entry contains the necessary information that we need for creating a new index entry: the keyword, the ID of the Target in the TargetIndex and the sequential number of the keyword in the document represented by the Target.

Version:
$Id: Entry.java,v 1.1 2000/09/23 11:21:23 lempinen Exp $
Author:
Sami Lempinen

Field Summary
private  long id
          The ID of the Target in the TargetIndex.
private  java.lang.String key
          The keyword.
private  int sequence
          The sequential number of the keyword in the Target.
 
Constructor Summary
Entry()
          Creates an empty Entry.
Entry(java.lang.String k, long i, int s)
          Creates a Entry and initialises the internals.
 
Method Summary
 long getID()
          Returns the ID of the Target in the TargetIndex.
 java.lang.String getKey()
          Returns the keyword.
 int getSequence()
          Returns the sequential number of the keyword in the Target.
 void setID(long i)
          Sets the ID of the Target in the TargetIndex.
 void setKey(java.lang.String k)
          Sets the keyword.
 void setSequence(int s)
          Sets the sequential number of the keyword in the Target.
 java.lang.String toString()
          Returns a String representation of the Entry.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

key

private java.lang.String key
The keyword.

id

private long id
The ID of the Target in the TargetIndex.

sequence

private int sequence
The sequential number of the keyword in the Target.
Constructor Detail

Entry

public Entry()
Creates an empty Entry.

Entry

public Entry(java.lang.String k,
             long i,
             int s)
Creates a Entry and initialises the internals.
Method Detail

setKey

public void setKey(java.lang.String k)
Sets the keyword.

getKey

public java.lang.String getKey()
Returns the keyword.

setID

public void setID(long i)
Sets the ID of the Target in the TargetIndex.

getID

public long getID()
Returns the ID of the Target in the TargetIndex.

setSequence

public void setSequence(int s)
Sets the sequential number of the keyword in the Target. The sequence represents the position of the keyword in the file represented by the ID.

getSequence

public int getSequence()
Returns the sequential number of the keyword in the Target.

toString

public java.lang.String toString()
Returns a String representation of the Entry.
Overrides:
toString in class java.lang.Object