Revision ad7201d3
Added by Andreas Müller over 3 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyEditorInput.java | ||
---|---|---|
1 | 1 |
/** |
2 |
* |
|
3 |
*/ |
|
2 |
* Copyright (C) 2007 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 |
*/ |
|
4 | 9 |
package eu.etaxonomy.taxeditor.editor.key.polytomous; |
5 | 10 |
|
6 | 11 |
import java.util.ArrayList; |
... | ... | |
18 | 23 |
|
19 | 24 |
/** |
20 | 25 |
* @author n.hoffmann |
21 |
* |
|
22 | 26 |
*/ |
23 | 27 |
public class PolytomousKeyEditorInput extends AbstractIdentificationEditorInput<PolytomousKey> { |
24 | 28 |
|
... | ... | |
42 | 46 |
// this.name = name; |
43 | 47 |
// } |
44 | 48 |
|
45 |
|
|
46 | 49 |
public static PolytomousKeyEditorInput NewInstance(UUID polytomousKeyUuid) throws Exception{ |
47 | 50 |
try{ |
48 | 51 |
ConversationHolder conversation = CdmStore.createConversation(); |
... | ... | |
52 | 55 |
} |
53 | 56 |
} |
54 | 57 |
|
55 |
|
|
56 | 58 |
@Override |
57 | 59 |
public PolytomousKey getKey() { |
58 | 60 |
return key; |
59 | 61 |
} |
60 | 62 |
|
61 |
/* (non-Javadoc) |
|
62 |
* @see java.lang.Object#equals(java.lang.Object) |
|
63 |
*/ |
|
64 | 63 |
@Override |
65 | 64 |
public boolean equals(Object object) { |
66 | 65 |
if (object instanceof PolytomousKeyEditorInput |
... | ... | |
72 | 71 |
return super.equals(object); |
73 | 72 |
} |
74 | 73 |
|
75 |
/* (non-Javadoc) |
|
76 |
* @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities() |
|
77 |
*/ |
|
78 | 74 |
@Override |
79 | 75 |
public List<PolytomousKey> getRootEntities() { |
80 | 76 |
return Arrays.asList(key); |
81 | 77 |
} |
82 | 78 |
|
83 |
/* (non-Javadoc) |
|
84 |
* @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge() |
|
85 |
*/ |
|
86 | 79 |
@Override |
87 | 80 |
public void merge() { |
88 | 81 |
key = CdmStore.getService(IPolytomousKeyService.class).merge(key,true).getMergedEntity(); |
89 |
|
|
90 | 82 |
} |
91 | 83 |
|
92 | 84 |
@Override |
... | ... | |
99 | 91 |
propertyPathsMap.put("children", polytomousKeyNodePropertyPaths); //$NON-NLS-1$ |
100 | 92 |
return propertyPathsMap; |
101 | 93 |
} |
102 |
|
|
103 |
} |
|
94 |
} |
Also available in: Unified diff
cleanup and generics for ICdmEntitySessionEnabled