gov.nist.nlpir.irf.index
Class ProxyIndex

java.lang.Object
  |
  +--gov.nist.nlpir.irf.proxy.VirtualProxy
        |
        +--gov.nist.nlpir.irf.index.ProxyIndex
Direct Known Subclasses:
ProxyIdfIndex, ProxyKeyWordIndex

public abstract class ProxyIndex
extends VirtualProxy
implements IndexIntrf

This class represents a proxy for Index objects

Version:
$Revision: 1.3 $
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.
See Also:
Index, Serialized Form

Inner classes inherited from class gov.nist.nlpir.irf.proxy.VirtualProxy
VirtualProxy.IMP_Entry
 
Fields inherited from class gov.nist.nlpir.irf.proxy.VirtualProxy
broker, handles, inMemoryProxiesByOid, iS, objectIdentifier, realObject, serialVersionUID
 
Constructor Summary
ProxyIndex()
           
 
Method Summary
 boolean addIndexingFeatures(java.util.Vector indexingFeatures, Indexer anIndexer)
          Add indexing features.
 boolean checkIndexer(Indexer anIndexer)
          Verifies that the same indexer is applied consistantly.
 void clear()
          Clears the index and its features.
 PersistenceBroker createBroker()
          Create a broker for this proxy object and remember it
 java.util.Enumeration getFeatures()
           
 java.lang.String getName()
          Gets the index name.
 java.util.Enumeration getSources()
           
 void makePersistent()
          Makes the real object persistent.
 void present()
          Presents the status of the index and its features.
 void presentStatistics()
          Presents the status of the index and its feature statistics.
 java.util.Vector retrieve(QueryModalityUnit qm, java.util.Vector setIF)
          Executes a search and retrieves documents.
 void showStatistics(int depth, int maxLengthIf3)
          statistics about the index.
 java.lang.String toString()
          Gives a String Representation of the Index.
 void update()
          Updates the index and its features.
 
Methods inherited from class gov.nist.nlpir.irf.proxy.VirtualProxy
addRefToInMemoryProxiesByOid, deleteRefFromInMemoryProxiesByOid, dematerializeRealObject, dematerializeRealObject, getBroker, getFirstInstance, getInMemoryProxiesByOidBinCount, getInMemoryProxiesByOidSize, getInMemoryProxyCounts, getObjectIdentifier, getPersistenceBroker, getProxyFor, getRealObject, isLightweight, makeLightweight, materializeRealObject, presentInMemoryProxies, readExternal, replaceRealObject, setBroker, setIS, setObjectIdentifier, setRealObject, testInMemoryProxiesByOidTable, writeExternal
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Constructor Detail

ProxyIndex

public ProxyIndex()
Method Detail

getName

public java.lang.String getName()
Gets the index name.
Specified by:
getName in interface IndexIntrf
Returns:
The index name.

update

public void update()
Updates the index and its features.
Specified by:
update in interface IndexIntrf

clear

public void clear()
Clears the index and its features.
Specified by:
clear in interface IndexIntrf

retrieve

public java.util.Vector retrieve(QueryModalityUnit qm,
                                 java.util.Vector setIF)
Executes a search and retrieves documents.
Specified by:
retrieve in interface IndexIntrf
Parameters:
qm - Query Modality Unit
setIF - Vector of Vectors of indexing features
Returns:
Results or null if submitted to the wrong index.

present

public void present()
Presents the status of the index and its features.
Specified by:
present in interface IndexIntrf

presentStatistics

public void presentStatistics()
Presents the status of the index and its feature statistics.
Specified by:
presentStatistics in interface IndexIntrf

toString

public java.lang.String toString()
Gives a String Representation of the Index.
Specified by:
toString in interface IndexIntrf
Overrides:
toString in class VirtualProxy

checkIndexer

public boolean checkIndexer(Indexer anIndexer)
Verifies that the same indexer is applied consistantly.
Specified by:
checkIndexer in interface IndexIntrf
Parameters:
an_Indexer - an indexer
Returns:
true if the Index is well applied, false otherwise.

addIndexingFeatures

public boolean addIndexingFeatures(java.util.Vector indexingFeatures,
                                   Indexer anIndexer)
Add indexing features.
Specified by:
addIndexingFeatures in interface IndexIntrf
Parameters:
indexingFeatures - Vector of indexing features.
anIndexer - an indexer.
Returns:
true if the Indexer exists and is correct,
false otherwise

showStatistics

public void showStatistics(int depth,
                           int maxLengthIf3)
statistics about the index.
Specified by:
showStatistics in interface IndexIntrf
Parameters:
depth - Depth of the statistics in the intern index.
maxLengthIf3 - Maximum number of characters printed.
See Also:
PersistentDualKeyContainer.showStatistics(int, int)

createBroker

public PersistenceBroker createBroker()
Create a broker for this proxy object and remember it
Returns:
the broker for this object
Overrides:
createBroker in class VirtualProxy

getSources

public java.util.Enumeration getSources()
Specified by:
getSources in interface IndexIntrf
See Also:
Index.getSources()

getFeatures

public java.util.Enumeration getFeatures()
Specified by:
getFeatures in interface IndexIntrf
See Also:
Index.getFeatures()

makePersistent

public void makePersistent()
Makes the real object persistent. This proxy now has a goal. Recursively calls makePersistent on every source and every feature contained in the index so that it is consistent.
Overrides:
makePersistent in class VirtualProxy