All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gate.creole.annic.Indexer Maven / Gradle / Ivy

Go to download

GATE - general achitecture for text engineering - is open source software capable of solving almost any text processing problem. This artifact enables you to embed the core GATE Embedded with its essential dependencies. You will able to use the GATE Embedded API and load and store GATE XML documents. This artifact is the perfect dependency for CREOLE plugins or for applications that need to customize the GATE dependencies due to confict with their own dependencies or for lower footprint.

The newest version!
/*
 *  Indexer.java
 *
 *  Niraj Aswani, 19/March/07
 *
 *  $Id: Indexer.html,v 1.0 2007/03/19 16:22:01 niraj Exp $
 */
package gate.creole.annic;

import gate.Corpus;

import java.util.List;
import java.util.Map;

/**
 * Base interface that declares methods for the Indexer.
 * 
 * @author niraj
 * 
 */
public interface Indexer {

  /**
   * Create a Index
   * 
   * @param parameters - parameters needed for creating an index values
   *          depend on the implementing IndexManager
   * @throws IndexException
   */
  public void createIndex(Map parameters) throws IndexException;

  /** Optimize the existing index */
  public void optimizeIndex() throws IndexException;

  /** Delete all index files and directories in index location. */
  public void deleteIndex() throws IndexException;

  /**
   * Add new documents to Index
   * 
   * @param corpusPersistenceID
   * @param addedDocuments
   * @throws IndexException
   */
  public void add(String corpusPersistenceID, List addedDocuments)
          throws IndexException;

  /**
   * remove documents from the Index
   */
  public void remove(List removedDocumentPersistenceIds) throws IndexException;

  /**
   * Set the corpus to be indexed
   * 
   * @param corpus
   */
  public void setCorpus(Corpus corpus) throws IndexException;

  /**
   * Corpus to be indexed
   */
  public Corpus getCorpus();

  /**
   * Returns the parameters
   */
  public Map getParameters();
}