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 C
getContent(int docID)
Obtains the user corresponding to an identifier.int
getContentId(C path)
Obtains the identifier of a content in the index.void
loadContents(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, wait
Methods 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:DocumentMap
Obtains the user corresponding to an identifier.- Specified by:
getContent
in interfaceDocumentMap<C>
- Parameters:
docID
- document identifier.- Returns:
- the content corresponding to such identifier.
-
getContentId
Description copied from interface:DocumentMap
Obtains the identifier of a content in the index.- Specified by:
getContentId
in 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.
-