1
|
package eu.etaxonomy.cdm.api.service.search;
|
2
|
|
3
|
import java.util.Collection;
|
4
|
import java.util.Set;
|
5
|
|
6
|
import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
|
7
|
import eu.etaxonomy.cdm.model.common.CdmBase;
|
8
|
|
9
|
/**
|
10
|
* @author andreas
|
11
|
\* @since Jul 2, 2012
|
12
|
*/
|
13
|
public interface ICdmMassIndexer {
|
14
|
|
15
|
|
16
|
/**
|
17
|
* Reindex all cdm entities listed in {@link ICdmMassIndexer#indexedClasses()}.
|
18
|
* Re-indexing will not purge the index.
|
19
|
* @param types TODO
|
20
|
* @param monitor TODO
|
21
|
*/
|
22
|
public abstract void reindex(Collection<Class<? extends CdmBase>> types, IProgressMonitor monitor);
|
23
|
|
24
|
/**
|
25
|
* This will wipe out the index.
|
26
|
*/
|
27
|
public abstract void purge(IProgressMonitor monitor);
|
28
|
|
29
|
/**
|
30
|
* Returns a list of (sub-classes of CdmBase) classes to be indexed.
|
31
|
*
|
32
|
* @return a List of {@link CdmBase} sub classes
|
33
|
*/
|
34
|
public Set<Class<? extends CdmBase>> indexedClasses();
|
35
|
|
36
|
/**
|
37
|
* Create (spell-checking) dictionary listed in {@link ICdmMassIndexer#dictionaryClasses()}.
|
38
|
* This action will not purge the dictionary.
|
39
|
* @param monitor TODO
|
40
|
*/
|
41
|
public abstract void createDictionary(IProgressMonitor monitor);
|
42
|
|
43
|
public Class[] dictionaryClasses();
|
44
|
}
|