|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gov.nist.nlpir.irf.index.braf.DeIntern
Internal representation of a Data Element, this class, unlike DataElem,
won't be inherited to describle every internal data element that may be
encountered. This class is part of the PersistentDualKeyContainer
scheme. It manages its own persistence mechanism with writeTo()
and readFrom()
. It could still be used with
another scheme as it provides methods used by indexing and retrieving,
for computation and storage of scores mainly.
DataElem
,
PersistentDualKeyContainer
Field Summary | |
private DataElem |
de
A DataElem equivalent to all the DataElems this DeInterns represents. |
private boolean |
dirty
A dirty bit for persistence purpose. |
private int |
nrOfSources
Number of documents in which equivalent DataElements appear. |
private double |
score
Score of the data element, calculated with different methods provided by the IdxIntern subclass used. |
Constructor Summary | |
private |
DeIntern(BufferedRandomAccessFile in)
This constructor is only used for persistence reasons. |
|
DeIntern(DataElem de)
This constructor initializes the DeIntern to default values and positions the reference to the DataElem the DeIntern is linked to. |
Method Summary | |
boolean |
equals(java.lang.Object o)
Compares this DeIntern to another object. |
void |
finalize()
As a DeIntern maintains a reference to a ProxyDataElem, it needs a finalize() method to unregister from this Proxy. |
DataElem |
getDE()
Retrieves the represented data element. |
int |
getFrequency(java.util.Vector features,
int startIndex)
Gives the number of times this appears in the given dictionary considered as a collection of DeIntern. |
int |
getNrOfSources()
Gives the number of sources the internal data element appears in. |
double |
getScore()
Gives the score of the represented data element. |
java.lang.String |
getValueAsString()
|
int |
hashCode()
Gives a hash code based on the value represented. |
boolean |
isDirty()
Gets the dirty bit. |
static DeIntern |
readFrom(BufferedRandomAccessFile in)
The symmetric method of writeTo() . |
void |
setDE(ProxyDataElem de)
Sets the represented data element. |
void |
setNrOfSources(int i)
Sets the number of sources to the value given. |
void |
setScore(double s)
Sets the score of the data element linked to this. |
java.lang.String |
toString()
|
void |
writeTo(BufferedRandomAccessFile out)
Dematerializing method for the tuned serialization scheme used mainly by HashBlock. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private int nrOfSources
private double score
IdxIntern
private DataElem de
private transient boolean dirty
Constructor Detail |
public DeIntern(DataElem de)
private DeIntern(BufferedRandomAccessFile in) throws java.io.IOException
readFrom()
to recreate the DeIntern from the file
given as a parameter.Method Detail |
public java.lang.String getValueAsString()
public java.lang.String toString()
public boolean equals(java.lang.Object o)
ProxyDataElem.equals(java.lang.Object)
public final DataElem getDE()
public final void setDE(ProxyDataElem de)
public final int getNrOfSources()
public final void setNrOfSources(int i)
public final double getScore()
public final void setScore(double s)
public final int getFrequency(java.util.Vector features, int startIndex)
features
- vector of indexing features.startIndex
- The index in the vector where the computation
should start.public final int hashCode()
public void writeTo(BufferedRandomAccessFile out) throws java.io.IOException
public static DeIntern readFrom(BufferedRandomAccessFile in) throws java.io.IOException
writeTo()
.public final boolean isDirty()
public void finalize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |