Project

General

Profile

Download (1.48 KB) Statistics
| Branch: | Tag: | Revision:
1
package eu.etaxonomy.cdm.api.service.search;
2

    
3
import java.util.Set;
4

    
5
import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
6
import eu.etaxonomy.cdm.model.common.CdmBase;
7

    
8
/**
9
 * @author andreas
10
 * @date Jul 2, 2012
11
 *
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 monitor TODO
20
     */
21
    public abstract void reindex(IProgressMonitor monitor);
22

    
23
    /**
24
     * This will wipe out the index.
25
     */
26
    public abstract void purge(IProgressMonitor monitor);
27

    
28
    /**
29
     * Returns a list of (sub-classes of CdmBase) classes to be indexed.
30
     *
31
     * @return a List of {@link CdmBase} sub classes
32
     */
33
    public Set<Class<? extends CdmBase>> indexedClasses();
34
    
35
    /**
36
     * Adds to the current list of (sub-classes of CdmBase) classes to be indexed.
37
     *
38
     * @param cdmBaseClass sub-class of CdmBase class to add
39
     */
40
    public void addToIndexedClasses(Class<? extends CdmBase> cdmBaseClass);
41
    
42
    /**
43
     * Clears the current list of (sub-classes of CdmBase) classes to be indexed.     
44
     */
45
    public void clearIndexedClasses();
46
    /**
47
     * Create (spell-checking) dictionary listed in {@link ICdmMassIndexer#dictionaryClasses()}.
48
     * This action will not purge the dictionary.
49
     * @param monitor TODO
50
     */
51
    public abstract void createDictionary(IProgressMonitor monitor);
52
    
53
    public Class[] dictionaryClasses();
54

    
55
}
(3-3/10)