gov.nist.nlpir.irf.feature
Class IndexingFeature

java.lang.Object
  |
  +--gov.nist.nlpir.irf.feature.IndexingFeature
Direct Known Subclasses:
IdxFeatWordInString

public class IndexingFeature
extends java.lang.Object

Container for elements of an Indexing Feature (IF): the feature itself (e.g., a term in a text document), the source document that it was generated from and the field within the source from which it was extracted.

Version:
$Revision: 1.1 $
Author:
This software was produced by NIST, an agency of the U.S. government, and by statute is not subject to copyright in the United States. Recipients of this software assume all responsibilities associated with its operation, modification and maintenance.

Field Summary
private  ProxyDataElem feature
          The feature itself, e.g., a term from a text document
private  boolean proxyRefsCountedTrue
          The boolean to manage the inMemoryProxiesByOid table.
private  ProxyDocument sourceDoc
          The document from which the feature was extracted
private  ProxyDataElem sourceField
          The document field from which the feature was extracted
 
Constructor Summary
IndexingFeature(ProxyDataElem feature, ProxyDocument sourceDoc, ProxyDataElem sourceField)
          Constructs a new indexing feature
 
Method Summary
 void finalize()
          This method is mandatory to manage the inMemoryProxiesByOid table in the case those references were counted for this object.
 ProxyDataElem getFeature()
          Gets the IF's stored feature
 ProxyDocument getSourceDoc()
          Gets this IF's source document
 ProxyDataElem getSourceField()
          Gets the field this IF was extracted from.
 void setFeature(ProxyDataElem feature)
          Sets this IF's feature
 void setProxyRefsCountedTrue()
          This method must be called if the IndexingFeature has registered its references to its different parts.
 void setSourceDoc(ProxyDocument sourceDoc)
          Sets this IF's source document
 void setSourceField(ProxyDataElem sourceField)
          Sets the document field this IF was found in.
 java.lang.String toString()
          Returns a string representation of indexing feature showing feature and source.
 
Methods inherited from class java.lang.Object
, clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

feature

private ProxyDataElem feature
The feature itself, e.g., a term from a text document

sourceDoc

private ProxyDocument sourceDoc
The document from which the feature was extracted

sourceField

private ProxyDataElem sourceField
The document field from which the feature was extracted

proxyRefsCountedTrue

private boolean proxyRefsCountedTrue
The boolean to manage the inMemoryProxiesByOid table. True indicates that references to contained proxies can and must be counted
Constructor Detail

IndexingFeature

public IndexingFeature(ProxyDataElem feature,
                       ProxyDocument sourceDoc,
                       ProxyDataElem sourceField)
Constructs a new indexing feature
Parameters:
f - feature to be stored
s - source document to be stored
Method Detail

getFeature

public final ProxyDataElem getFeature()
Gets the IF's stored feature
Returns:
feature reference

getSourceDoc

public final ProxyDocument getSourceDoc()
Gets this IF's source document
Returns:
source reference

setFeature

public final void setFeature(ProxyDataElem feature)
Sets this IF's feature
Parameters:
f - feature to be stored

setSourceDoc

public final void setSourceDoc(ProxyDocument sourceDoc)
Sets this IF's source document
Parameters:
s - source document to be stored

getSourceField

public final ProxyDataElem getSourceField()
Gets the field this IF was extracted from.
Returns:
the field this IF was extracted from

setSourceField

public final void setSourceField(ProxyDataElem sourceField)
Sets the document field this IF was found in.

toString

public java.lang.String toString()
Returns a string representation of indexing feature showing feature and source.
Returns:
string representation of indexing feature
Overrides:
toString in class java.lang.Object

setProxyRefsCountedTrue

public final void setProxyRefsCountedTrue()
This method must be called if the IndexingFeature has registered its references to its different parts.

finalize

public void finalize()
This method is mandatory to manage the inMemoryProxiesByOid table in the case those references were counted for this object.
Overrides:
finalize in class java.lang.Object