Project

General

Profile

Download (2.06 KB) Statistics
| Branch: | Tag: | Revision:
1 b2f76600 Patric Plitzner
/**
2
* Copyright (C) 2013 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.editor.view.derivate;
10
11 3ad97e48 Patrick Plitzner
import java.util.Collection;
12 fdcd1628 Patrick Plitzner
import java.util.Collections;
13 3ad97e48 Patrick Plitzner
import java.util.UUID;
14
15 b2f76600 Patric Plitzner
import org.eclipse.jface.resource.ImageDescriptor;
16
import org.eclipse.ui.IEditorInput;
17
import org.eclipse.ui.IPersistableElement;
18
19
/**
20 d2ea9779 Patrick Plitzner
 * Editor input for the {@link DerivateView}
21
 *
22 b2f76600 Patric Plitzner
 * @author pplitzner
23 d2ea9779 Patrick Plitzner
 * @date Nov 11, 2015
24 b2f76600 Patric Plitzner
 *
25
 */
26 dd35c5fd Patrick Plitzner
public class DerivateViewEditorInput implements IEditorInput {
27 b2f76600 Patric Plitzner
28 fe0647c6 Patrick Plitzner
    private Collection<UUID> derivativeUuids;
29
    private UUID taxonUuid;
30 3ad97e48 Patrick Plitzner
31 d2ea9779 Patrick Plitzner
    public DerivateViewEditorInput() {
32 b2f76600 Patric Plitzner
    }
33
34 fdcd1628 Patrick Plitzner
    public DerivateViewEditorInput(UUID derivativeUuid, UUID taxonUuid) {
35
    	this(Collections.singleton(derivativeUuid), taxonUuid);
36
    }
37
38 fe0647c6 Patrick Plitzner
    public DerivateViewEditorInput(Collection<UUID> derivativeUuids, UUID taxonUuid) {
39 3ad97e48 Patrick Plitzner
        this.derivativeUuids = derivativeUuids;
40 fe0647c6 Patrick Plitzner
        this.taxonUuid = taxonUuid;
41
    }
42
43 fdcd1628 Patrick Plitzner
    public DerivateViewEditorInput(UUID derivativeUuid) {
44
    	this(derivativeUuid, null);
45
    }
46
    
47 fe0647c6 Patrick Plitzner
    public DerivateViewEditorInput(Collection<UUID> derivativeUuids) {
48
        this(derivativeUuids, null);
49 3ad97e48 Patrick Plitzner
    }
50
51
    public Collection<UUID> getDerivativeUuids() {
52
        return derivativeUuids;
53
    }
54
55 fe0647c6 Patrick Plitzner
    public UUID getTaxonUuid() {
56
        return taxonUuid;
57
    }
58
59 b2f76600 Patric Plitzner
    @Override
60
    public Object getAdapter(Class adapter) {
61
        return null;
62
    }
63
64
    @Override
65
    public boolean exists() {
66
        return false;
67
    }
68
69
    @Override
70
    public ImageDescriptor getImageDescriptor() {
71
        return null;
72
    }
73
74
    @Override
75
    public String getName() {
76 68224814 Patric Plitzner
        return getEditorName();
77 b2f76600 Patric Plitzner
    }
78
79
    @Override
80
    public IPersistableElement getPersistable() {
81
        return null;
82
    }
83
84
    @Override
85
    public String getToolTipText() {
86 68224814 Patric Plitzner
        return getEditorName();
87
    }
88
89
    private String getEditorName() {
90 d2ea9779 Patrick Plitzner
        return "Derivative Editor";
91 b2f76600 Patric Plitzner
    }
92
93
}