Class AbstractIndexBuilder<C>

java.lang.Object
es.uam.eps.ir.relison.content.index.AbstractIndexBuilder<C>
All Implemented Interfaces:
IndexBuilder<C>
Direct Known Subclasses:
AbstractIndividualContentIndexBuilder, LuceneBuilder

public abstract class AbstractIndexBuilder<C>
extends java.lang.Object
implements IndexBuilder<C>
Abstract implementation of an index builder.
  • Constructor Summary

    Constructors 
    Constructor Description
    AbstractIndexBuilder()  
  • Method Summary

    Modifier and Type Method Description
    protected void clear​(java.lang.String indexFolder)
    Clears the folder containing the index.
    abstract Index<C> getCoreIndex()
    Obtains the generated index.
    protected void saveContentMap​(java.lang.String indexPath)
    Saves a file containing the relation between indexes and user identifiers.

    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.IndexBuilder

    close, indexText, init
  • Constructor Details

  • Method Details

    • getCoreIndex

      public abstract Index<C> getCoreIndex() throws java.io.IOException
      Obtains the generated index.
      Returns:
      the generated index.
      Throws:
      java.io.IOException - if something fails while creating such index.
    • clear

      protected void clear​(java.lang.String indexFolder) throws java.io.IOException
      Clears the folder containing the index.
      Parameters:
      indexFolder - the index folder.
      Throws:
      java.io.IOException - if something fails while deleting the files.
    • saveContentMap

      protected void saveContentMap​(java.lang.String indexPath) throws java.io.IOException
      Saves a file containing the relation between indexes and user identifiers.
      Parameters:
      indexPath - the path of the index.
      Throws:
      java.io.IOException - if something fails while writing the map.