2 * Copyright (C) 2014 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
9 package eu
.etaxonomy
.taxeditor
.view
.dataimport
;
11 import java
.util
.Collection
;
13 import org
.apache
.log4j
.Logger
;
14 import org
.eclipse
.jface
.resource
.ImageDescriptor
;
15 import org
.eclipse
.ui
.IEditorInput
;
16 import org
.eclipse
.ui
.IPersistableElement
;
18 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
19 import eu
.etaxonomy
.cdm
.ext
.occurrence
.OccurenceQuery
;
20 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
23 * Input for {@link DataImportEditor}. This class queries a data source for
24 * occurrences and passes them to the editor.
30 public abstract class DataImportEditorInput
<T
> implements IEditorInput
{
32 protected static Logger logger
= Logger
.getLogger(DataImportEditorInput
.class);
34 private Collection
<T
> results
;
36 private final ConversationHolder conversationHolder
;
38 protected OccurenceQuery query
;
40 public DataImportEditorInput() {
41 this.conversationHolder
= CdmStore
.createConversation();
45 public Object
getAdapter(Class adapter
) {
46 // TODO Auto-generated method stub
51 public boolean exists() {
56 public ImageDescriptor
getImageDescriptor() {
57 // TODO Auto-generated method stub
62 public IPersistableElement
getPersistable() {
66 public Collection
<T
> getResults() {
70 public void setResults(Collection
<T
> results
) {
71 this.results
= results
;
74 public ConversationHolder
getConversationHolder() {
75 return conversationHolder
;
79 public abstract int hashCode();
82 public abstract boolean equals(Object obj
);
85 public abstract void query();