Class AbstractIndex<C>
java.lang.Object
es.uam.eps.ir.relison.content.index.AbstractIndex<C>
- All Implemented Interfaces:
DocumentMap<C>,Index<C>
- Direct Known Subclasses:
AbstractIndividualContentIndex,LuceneIndex
public abstract class AbstractIndex<C> extends java.lang.Object implements Index<C>
Abstract implementation of an index.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AbstractIndex() -
Method Summary
Modifier and Type Method Description CgetContent(int docID)Obtains the user corresponding to an identifier.intgetContentId(C path)Obtains the identifier of a content in the index.voidloadContents(java.lang.String indexFolder, org.ranksys.formats.parsing.Parser<C> cParser)Loads the users.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface es.uam.eps.ir.relison.content.index.Index
getAllTerms, getDocFreq, getPostings, getTotalFreq
-
Field Details
-
Constructor Details
-
AbstractIndex
public AbstractIndex()
-
-
Method Details
-
getContent
Description copied from interface:DocumentMapObtains the user corresponding to an identifier.- Specified by:
getContentin interfaceDocumentMap<C>- Parameters:
docID- document identifier.- Returns:
- the content corresponding to such identifier.
-
getContentId
Description copied from interface:DocumentMapObtains the identifier of a content in the index.- Specified by:
getContentIdin interfaceDocumentMap<C>- Parameters:
path- the content to look up.- Returns:
- the identifier of the content.
-
loadContents
public void loadContents(java.lang.String indexFolder, org.ranksys.formats.parsing.Parser<C> cParser) throws java.io.IOExceptionLoads the users.- Parameters:
indexFolder- folder in which the index is stored.cParser- user parser.- Throws:
java.io.IOException- if something fails while reading the users.
-