|
IndexManager |
|
1 /* 2 * Indexmanager.java 3 * 4 * Copyright (c) 1998-2001, The University of Sheffield. 5 * 6 * This file is part of GATE (see http://gate.ac.uk/), and is free 7 * software, licenced under the GNU Library General Public License, 8 * Version 2, June 1991 (in the distribution as file licence.html, 9 * and also available at http://gate.ac.uk/gate/licence.html). 10 * 11 * Rosen Marinov, 19/Apr/2002 12 * 13 */ 14 15 package gate.creole.ir; 16 17 import java.util.List; 18 import gate.Corpus; 19 20 public interface IndexManager{ 21 22 /** 23 * Gets the corpus this index manages will index. 24 * @return a {@link gate.Corpus} value; 25 */ 26 public Corpus getCorpus(); 27 28 /** 29 * Sets the corpus this index manages will index. 30 * @param corpus a {@link gate.Corpus} value; 31 */ 32 public void setCorpus(Corpus corpus); 33 34 /** 35 * Gets the index definition for this index manager. 36 * @return a {@link IndexDefinition} value. 37 */ 38 public IndexDefinition getIndexDefinition(); 39 40 /** 41 * Sets the index definition for this index manager. 42 * @param indexDefinition a {@link IndexDefinition} value. 43 */ 44 public void setIndexDefinition(IndexDefinition indexDefinition); 45 46 47 /** Creates index directory and indexing all 48 * documents in the corpus. */ 49 public void createIndex() throws IndexException; 50 51 /** Optimize the existing index*/ 52 public void optimizeIndex() throws IndexException; 53 54 /** Delete all index files and directories in index location. */ 55 public void deleteIndex() throws IndexException; 56 57 /** Reindexing changed documents, removing removed documents and 58 * add to the index new corpus documents. */ 59 public void sync(List added, List removed, List changed) throws IndexException; 60 61 62 }
|
IndexManager |
|