|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gov.nist.nlpir.irf.index.IdxIntern
Base class for the internal representation of an Index.
Objects of this class contain several sets that together provide the
structure necessary to support an Index. It mainly contains a
PersistentDualKeyContainer
for this purpose. Subclasses of this class may override methods for
calculating retrieval status values (RSV), etc.
Index
,
IdfIdxIntern
,
KeyWordIdxIntern
,
DeIntern
,
IoAddrIntern
,
IndexingFeature
,
DataElem
,
PersistentDualKeyContainer
, Serialized FormField Summary | |
private boolean |
flagUpToDate
This flag is set when the Index is up-to-date - does not need for Update to be run. |
private PersistentDualKeyContainer |
indexingFeatures
Main part of the IdxIntern. |
(package private) static long |
serialVersionUID
serial version universal id - put here so Java does not insert one which may change due to revisions and make it impossible to deserialize earlier versions of serialized objects |
Constructor Summary | |
IdxIntern()
Only here for serializarion's needs. |
|
IdxIntern(java.lang.String location,
java.lang.String name)
Constructor which allocates the initial data structures for IdxIntern. |
Method Summary | |
void |
addIndexingFeatures(java.util.Vector idxFeats)
Creates an indexing feature in the Index Intern. |
abstract void |
calcInputForRSV(ResultForDocMatchingQueryCondition aResult)
Calculates the retrieval status value |
int |
calcNrOfSources()
Calculates number of sources in index and return that value. |
abstract double |
calcRSV(ResultForDocMatchingQueryModalityUnit aResult)
Calculates the retrieval status value |
void |
clear()
Resets data structures |
java.util.Vector |
evalQueryCondition(QueryCondition condition)
Evaluates a query condition. |
java.util.Vector |
evalQueryCondition(QueryCondition condition,
java.util.Vector setIndexingFeatures)
Generates a vector of results that match the features in the specified query condition. |
java.util.Vector |
evalQueryModalityUnit(QueryModalityUnit qmu,
java.util.Vector IFs)
Evaluates a Query Modality Unit. |
int |
existsSource(ProxyDocument aSource)
Returns number of indexing features for a source. |
IoAddrIntern |
getActualSource(ProxyDocument source)
In order to retrieve the IoAddrIntern associated to the given document, this method should be called. |
DeIntern |
getFeature(DataElem aDE)
Gets the feature for a DataElement. |
DeIntern |
getFeature(DeIntern aDeI)
Gets the feature for a DeIntern. |
java.util.Enumeration |
getFeatures()
Returns the features for which indexing features have been stored. |
java.util.Vector |
getFeatures(java.util.Dictionary someIF)
Gets features out of a collection of IndexingFeatures which is a subclass of Dictionary (Hashtable, PolyKeyHashtable). |
java.util.Vector |
getFeatures(IoAddrIntern aSource)
Gets features that are present in supplied source |
java.util.Vector |
getFeatures(ProxyFeatureList someIF)
Gest features out of a vector of IndexingFeatures |
private static java.util.Vector |
getFeaturesFromEnumeration(java.util.Enumeration theEnum)
Factorizes the common code of getFeatures(*). |
int |
getFeaturesNumber()
Returns the number of features that have been stored (NOT Indexing Features) in this IdxIntern. |
boolean |
getFlagUpToDate()
Returns the value of the flag uptodate. |
ProxyFeatureList |
getIFsWithFeature(DeIntern aFeature)
Gets the indexing features with this feature. |
java.util.Vector |
getIFsWithFeature(DeIntern aFeature,
java.lang.String docType,
java.lang.String attributeName)
Gets the indexing features with this feature and the correct docType and attributeName. |
ProxyFeatureList |
getIFsWithSource(IoAddrIntern aSource)
Gets the indexing features of a source. |
PersistentDualKeyContainer |
getIndexingFeatures()
Exposes the inner structure of the IdxIntern It is mainly used to pass methods to the PersistentDualKeyContainer for probe purpose: showing statistics for example, or getting a display. |
int |
getNrOfFeatures()
Gets the number of features. |
int |
getNrOfFeatures(IoAddrIntern aSource)
Gets the number of features for a source. |
int |
getNrOfIndexingFeatures()
Gets the number of indexing features. |
int |
getNrOfSources()
Gets the number of sources. |
int |
getNrOfSources(DeIntern aFeature)
Gets the number of sources for a feature. |
int |
getNrOfUniqueFeatures(IoAddrIntern aSource)
Gets the number of unique features for a source. |
int |
getNrOfUniqueSources(DeIntern aFeature)
Gets the number of unique sources for a feature. |
int |
getNrOfUniqueSources0(DeIntern aFeature)
Gets the number of unique sources for a feature. |
java.util.Enumeration |
getSources()
Returns the sources for which indexing features have been stored. |
java.util.Hashtable |
getSources(DeIntern aFeature)
Gets the Indexing Features containing all of the sources which have the supplied feature. |
int |
getSourcesNumber()
Returns the number of sources that have been stored for this IdxIntern. |
void |
init()
Initializes this instance of IdxIntern. |
java.util.Vector |
makeQueryConditions(QueryModalityUnit qm,
java.util.Vector idxFeats)
Generates a set of query conditions. |
java.util.Vector |
makeResultForDocMatchingQueryCondition(QueryCondition condition,
java.util.Hashtable setBRR)
Generates a vector of results for a given query condition |
java.util.Vector |
makeResultsForDocMatchingQueryModalityUnit(QueryModalityUnit qmu,
java.util.Vector collPR,
int numQueryFeatures,
int numUniqueQueryFeatures)
Generates a vector of results for a given query modality unit This method takes a vector of ResultForDocMatchingQueryConditions (called partial results) and groups these by source document to form a combined result vector of ResultForDocMatchingQueryModalityUnits (called combined results), exactly one of the latter combined Results for each source referred to in the partial results of* the incoming vector. |
void |
present()
Displays an ascii representation of the Class. |
void |
presentFeatures()
Displays an ascii representation of the features in the Index (members of features). |
void |
presentSources()
Displays an ascii representation of the sources. |
void |
presentStatistics()
Generates a report on the number of sources, features and indexing features. |
void |
update()
Updates the index. |
Methods inherited from class java.lang.Object |
|
Field Detail |
static final long serialVersionUID
private boolean flagUpToDate
private PersistentDualKeyContainer indexingFeatures
Constructor Detail |
public IdxIntern(java.lang.String location, java.lang.String name)
location
- information about the location of the PDKCname
- name of the index being supportedpublic IdxIntern()
Method Detail |
public void init()
public void present()
public void presentFeatures()
public void presentSources()
public void presentStatistics()
public final int calcNrOfSources()
public java.util.Vector makeQueryConditions(QueryModalityUnit qm, java.util.Vector idxFeats)
qm
- Query Modality Unit.idxFeats
- Collection of indexing features.public java.util.Vector evalQueryModalityUnit(QueryModalityUnit qmu, java.util.Vector IFs)
qmu
- Query Modality UnitIFs
- Collection of IndexingFeaturespublic java.util.Vector evalQueryCondition(QueryCondition condition)
condition
- The Query Condition.public java.util.Vector evalQueryCondition(QueryCondition condition, java.util.Vector setIndexingFeatures)
condition
- Query Condition.setIndexingFeatures
- Vector of IndexingFeatures.public java.util.Vector makeResultForDocMatchingQueryCondition(QueryCondition condition, java.util.Hashtable setBRR)
condition
- Query Condition.setBRR
- Basic Retrieval Result.public java.util.Vector makeResultsForDocMatchingQueryModalityUnit(QueryModalityUnit qmu, java.util.Vector collPR, int numQueryFeatures, int numUniqueQueryFeatures)
qmu
- Query Modality UnitcollPR
- Partial Retrieval Result.public abstract void calcInputForRSV(ResultForDocMatchingQueryCondition aResult)
aResult
- result for document matching query condition.IdfIdxIntern
,
KeyWordIdxIntern
public abstract double calcRSV(ResultForDocMatchingQueryModalityUnit aResult)
aResult
- result for document matching query modality unit.IdfIdxIntern
,
KeyWordIdxIntern
public PersistentDualKeyContainer getIndexingFeatures()
public final int getNrOfFeatures()
public final int getNrOfSources()
public int getNrOfUniqueSources(DeIntern aFeature)
aFeature
- a featurepublic int getNrOfUniqueSources0(DeIntern aFeature)
aFeature
- a featurepublic int getNrOfUniqueFeatures(IoAddrIntern aSource)
aSource
- a sourcepublic final int getNrOfSources(DeIntern aFeature)
aFeature
- a featurepublic final int getNrOfFeatures(IoAddrIntern aSource)
aSource
- a sourcepublic final DeIntern getFeature(DataElem aDE)
aDE
- a DataElement.public final DeIntern getFeature(DeIntern aDeI)
aDeI
- a DeInternpublic final ProxyFeatureList getIFsWithFeature(DeIntern aFeature)
aFeature
- a featurepublic java.util.Vector getIFsWithFeature(DeIntern aFeature, java.lang.String docType, java.lang.String attributeName)
aFeature
- a featuredocType
- the type of the document.attributeName
- name of the attribute.public final ProxyFeatureList getIFsWithSource(IoAddrIntern aSource)
aSource
- a sourcepublic final int getNrOfIndexingFeatures()
public void addIndexingFeatures(java.util.Vector idxFeats)
a
- set of Indexing FeaturesIndexingFeature
public final int existsSource(ProxyDocument aSource)
aSource
- source document addresspublic void update()
public void clear()
public java.util.Hashtable getSources(DeIntern aFeature)
aFeature
- feature to use as key.public java.util.Vector getFeatures(IoAddrIntern aSource)
aSource
- reference to source documentpublic final java.util.Vector getFeatures(ProxyFeatureList someIF)
someIF
- collection of IndexingFeaturespublic final java.util.Vector getFeatures(java.util.Dictionary someIF)
someIF
- collection of IndexingFeaturesprivate static final java.util.Vector getFeaturesFromEnumeration(java.util.Enumeration theEnum)
theEnum
- The enumeration of IndexingFeatures.public final java.util.Enumeration getFeatures()
public final java.util.Enumeration getSources()
public final boolean getFlagUpToDate()
public final int getSourcesNumber()
public final int getFeaturesNumber()
public IoAddrIntern getActualSource(ProxyDocument source)
PersistentIrfHashtable.getActualKey(java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |