a74d15d44c56ca2ddcb11d95df5fc740297d1631
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / view / dataimport / DataImportEditorInput.java
1 // $Id$
2 /**
3 * Copyright (C) 2014 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
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.
9 */
10 package eu.etaxonomy.taxeditor.editor.view.dataimport;
11
12 import java.util.Collection;
13
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;
18
19 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
20 import eu.etaxonomy.cdm.ext.occurrence.OccurenceQuery;
21 import eu.etaxonomy.taxeditor.store.CdmStore;
22
23 /**
24 * @author pplitzner
25 * @date 25.02.2014
26 *
27 */
28 public abstract class DataImportEditorInput<T> implements IEditorInput {
29
30 protected static Logger logger = Logger.getLogger(DataImportEditorInput.class);
31
32 private Collection<T> results;
33
34 private final ConversationHolder conversationHolder;
35
36 protected OccurenceQuery query;
37
38 /**
39 * @param results
40 */
41 public DataImportEditorInput() {
42 this.conversationHolder = CdmStore.createConversation();
43 }
44
45
46 /* (non-Javadoc)
47 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
48 */
49 @Override
50 public Object getAdapter(Class adapter) {
51 // TODO Auto-generated method stub
52 return null;
53 }
54
55 /* (non-Javadoc)
56 * @see org.eclipse.ui.IEditorInput#exists()
57 */
58 @Override
59 public boolean exists() {
60 return false;
61 }
62
63 /* (non-Javadoc)
64 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
65 */
66 @Override
67 public ImageDescriptor getImageDescriptor() {
68 // TODO Auto-generated method stub
69 return null;
70 }
71
72 /* (non-Javadoc)
73 * @see org.eclipse.ui.IEditorInput#getPersistable()
74 */
75 @Override
76 public IPersistableElement getPersistable() {
77 return null;
78 }
79
80 /**
81 * @return the results
82 */
83 public Collection<T> getResults() {
84 return results;
85 }
86
87 /**
88 * @param results the results to set
89 */
90 public void setResults(Collection<T> results) {
91 this.results = results;
92 }
93
94 /**
95 * @return the conversationHolder
96 */
97 public ConversationHolder getConversationHolder() {
98 return conversationHolder;
99 }
100
101 @Override
102 public abstract int hashCode();
103
104 @Override
105 public abstract boolean equals(Object obj);
106
107
108 public abstract void query();
109 }