Project

General

Profile

Download (1.46 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2014 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.taxeditor.view.dataimport;
10

    
11
import java.util.Collection;
12

    
13
import org.apache.log4j.Logger;
14

    
15
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
16
import eu.etaxonomy.cdm.ext.occurrence.OccurenceQuery;
17
import eu.etaxonomy.taxeditor.store.CdmStore;
18

    
19
/**
20
 * Input for {@link DataImportEditor}. This class queries a data source for
21
 * occurrences and passes them to the editor.
22
 *
23
 * @author pplitzner
24
 * @date 25.02.2014
25
 *
26
 */
27
public abstract class DataImportEditorInput<T> {
28

    
29
    protected static Logger logger = Logger.getLogger(DataImportEditorInput.class);
30

    
31
    private Collection<T> results;
32

    
33
    private final ConversationHolder conversationHolder;
34

    
35
    protected OccurenceQuery query;
36

    
37
    public DataImportEditorInput() {
38
        this.conversationHolder = CdmStore.createConversation();
39
    }
40

    
41
    public Collection<T> getResults() {
42
        return results;
43
    }
44

    
45
    public void setResults(Collection<T> results) {
46
        this.results = results;
47
    }
48

    
49
    public ConversationHolder getConversationHolder() {
50
        return conversationHolder;
51
    }
52

    
53
    @Override
54
    public abstract int hashCode();
55

    
56
    @Override
57
    public abstract boolean equals(Object obj);
58

    
59

    
60
    public abstract void query();
61
}
(2-2/7)