3 * Copyright (C) 2014 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
.editor
.view
.dataimport
;
12 import java
.util
.Collection
;
14 import org
.apache
.log4j
.Logger
;
15 import org
.eclipse
.jface
.resource
.ImageDescriptor
;
16 import org
.eclipse
.ui
.IEditorInput
;
17 import org
.eclipse
.ui
.IPersistableElement
;
19 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
20 import eu
.etaxonomy
.cdm
.ext
.occurrence
.OccurenceQuery
;
21 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
24 * Input for {@link DataImportEditor}. This class queries a data source for
25 * occurrences and passes them to the editor.
31 public abstract class DataImportEditorInput
<T
> implements IEditorInput
{
33 protected static Logger logger
= Logger
.getLogger(DataImportEditorInput
.class);
35 private Collection
<T
> results
;
37 private final ConversationHolder conversationHolder
;
39 protected OccurenceQuery query
;
41 public DataImportEditorInput() {
42 this.conversationHolder
= CdmStore
.createConversation();
46 public Object
getAdapter(Class adapter
) {
47 // TODO Auto-generated method stub
52 public boolean exists() {
57 public ImageDescriptor
getImageDescriptor() {
58 // TODO Auto-generated method stub
63 public IPersistableElement
getPersistable() {
67 public Collection
<T
> getResults() {
71 public void setResults(Collection
<T
> results
) {
72 this.results
= results
;
75 public ConversationHolder
getConversationHolder() {
76 return conversationHolder
;
80 public abstract int hashCode();
83 public abstract boolean equals(Object obj
);
86 public abstract void query();