Revision 38556872
Added by Andreas Müller over 3 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/UseObjectStore.java | ||
---|---|---|
43 | 43 |
private static Feature useSummaryFeature; |
44 | 44 |
private static Feature useRecordFeature; |
45 | 45 |
|
46 |
|
|
47 | 46 |
public static void reset() { |
48 | 47 |
isInitialized = false; |
49 | 48 |
useMarkerType = null; |
... | ... | |
144 | 143 |
conversation.close(); |
145 | 144 |
} |
146 | 145 |
|
147 |
|
|
148 | 146 |
private static void createHumanGroupVocabulary(IProgressMonitor monitor,ConversationHolder conversation) { |
149 | 147 |
TermVocabulary<DefinedTerm> humanGroupVocabulary = CdmStore.getService(IVocabularyService.class).find(UsageTermCollection.uuidHumanGroupVocabulary); |
150 | 148 |
if (humanGroupVocabulary == null){ |
... | ... | |
172 | 170 |
} |
173 | 171 |
} |
174 | 172 |
|
175 |
|
|
176 | 173 |
private static void createPlantVocabulary(IProgressMonitor monitor, ConversationHolder conversation) { |
177 | 174 |
TermVocabulary<DefinedTerm> plantPartVocabulary = CdmStore.getService(IVocabularyService.class).find(UsageTermCollection.uuidPlantPartVocabulary); |
178 | 175 |
if (plantPartVocabulary == null){ |
... | ... | |
195 | 192 |
} |
196 | 193 |
} |
197 | 194 |
|
198 |
|
|
199 | 195 |
private static void createCountryVocabulary(IProgressMonitor monitor, ConversationHolder conversation) { |
200 | 196 |
TermVocabulary<DefinedTerm> countryVocabulary = CdmStore.getService(IVocabularyService.class).find(UsageTermCollection.uuidCountryVocabulary); |
201 | 197 |
if (countryVocabulary == null){ |
... | ... | |
218 | 214 |
} |
219 | 215 |
} |
220 | 216 |
|
221 |
|
|
222 | 217 |
private static void createStateVocabulary(IProgressMonitor monitor, ConversationHolder conversation) { |
223 | 218 |
TermVocabulary<State> stateVocabulary = CdmStore.getService(IVocabularyService.class).find(UsageTermCollection.uuidUseCategoryVocabulary); |
224 | 219 |
if (stateVocabulary == null){ |
... | ... | |
246 | 241 |
} |
247 | 242 |
} |
248 | 243 |
|
249 |
|
|
250 | 244 |
private static void createUseMarkerType(ConversationHolder conversation) { |
251 | 245 |
useMarkerType = (MarkerType) CdmStore.getService(ITermService.class).find(UsageTermCollection.uuidUseMarkerType); |
252 | 246 |
if (useMarkerType == null){ |
... | ... | |
258 | 252 |
conversation.commit(true); |
259 | 253 |
} |
260 | 254 |
} |
261 |
|
|
262 |
|
|
263 |
} |
|
255 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/BigDecimalWithLabelElement.java | ||
---|---|---|
21 | 21 |
*/ |
22 | 22 |
public class BigDecimalWithLabelElement extends NumberWithLabelElement { |
23 | 23 |
|
24 |
|
|
25 | 24 |
public BigDecimalWithLabelElement(CdmFormFactory toolkit, ICdmFormElement parentElement, String labelString, |
26 | 25 |
Number initialNumber, int style) { |
27 | 26 |
super(toolkit, parentElement, labelString, initialNumber, style); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/BrowserElement.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.ui.element; |
5 | 10 |
|
6 | 11 |
import java.net.URI; |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.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.ui.element; |
5 | 10 |
|
6 | 11 |
import java.util.ArrayList; |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmPropertyChangeEvent.java | ||
---|---|---|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
9 |
|
|
10 | 9 |
package eu.etaxonomy.taxeditor.ui.element; |
11 | 10 |
|
12 | 11 |
import org.eclipse.jface.util.PropertyChangeEvent; |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractEntityCollectionElement.java | ||
---|---|---|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
9 |
|
|
10 | 9 |
package eu.etaxonomy.taxeditor.ui.section; |
11 | 10 |
|
12 | 11 |
import org.eclipse.jface.util.PropertyChangeEvent; |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractEntityCollectionSection.java | ||
---|---|---|
1 | 1 |
/** |
2 |
* |
|
3 |
*/ |
|
2 |
* Copyright (C) 2018 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.ui.section; |
5 | 10 |
|
6 | 11 |
import java.util.ArrayList; |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractIdentifiableEntityDetailElement.java | ||
---|---|---|
1 | 1 |
/** |
2 |
* |
|
3 |
*/ |
|
2 |
* Copyright (C) 2018 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.ui.section; |
5 | 10 |
|
6 | 11 |
import java.util.Arrays; |
... | ... | |
16 | 21 |
|
17 | 22 |
/** |
18 | 23 |
* @author n.hoffmann |
19 |
* |
|
20 | 24 |
*/ |
21 | 25 |
public abstract class AbstractIdentifiableEntityDetailElement<T extends IIdentifiableEntity> extends |
22 | 26 |
AbstractCdmDetailElement<T> { |
23 | 27 |
|
24 |
/** |
|
25 |
* |
|
26 |
*/ |
|
27 | 28 |
private static final EnumSet<CRUD> UPDATE = EnumSet.of(CRUD.UPDATE); |
28 | 29 |
protected ToggleableTextElement toggleable_cache; |
29 | 30 |
|
... | ... | |
31 | 32 |
public AbstractIdentifiableEntityDetailElement(CdmFormFactory formFactory, ICdmFormElement formElement) { |
32 | 33 |
super(formFactory, formElement); |
33 | 34 |
updateToggleableCacheState(); |
34 |
|
|
35 |
|
|
36 | 35 |
} |
37 | 36 |
|
38 |
|
|
39 | 37 |
public void updateToggleableCacheField() { |
40 | 38 |
if (toggleable_cache != null){ |
41 | 39 |
if (!getEntity().isProtectedTitleCache()) { |
... | ... | |
52 | 50 |
updateToggleableCacheField(); |
53 | 51 |
} |
54 | 52 |
|
55 |
|
|
56 | 53 |
@Override |
57 | 54 |
protected void updateControlStates(){ |
58 | 55 |
|
... | ... | |
60 | 57 |
super.updateControlStates(); |
61 | 58 |
} |
62 | 59 |
|
63 |
|
|
64 | 60 |
private void updateToggleableCacheState() { |
65 | 61 |
if(toggleable_cache != null){ |
66 | 62 |
toggleable_cache.setEnabled(getEntity() != null && CdmStore.currentAuthentiationHasPermission((CdmBase) getEntity(), UPDATE)); |
67 | 63 |
} |
68 | 64 |
} |
69 |
|
|
70 |
|
|
71 |
|
|
72 | 65 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaDetailElement.java | ||
---|---|---|
58 | 58 |
/** |
59 | 59 |
* @author pplitzner |
60 | 60 |
* @since Jul 11, 2019 |
61 |
* |
|
62 | 61 |
*/ |
63 | 62 |
private final class LoadImageJob extends Job { |
64 | 63 |
private URI uri; |
... | ... | |
131 | 130 |
|
132 | 131 |
@Override |
133 | 132 |
protected void createControls(ICdmFormElement formElement, Media entity, int style) { |
134 |
|
|
135 | 133 |
this.parentFormElement = formElement; |
136 | 134 |
this.style = style; |
137 |
|
|
138 | 135 |
} |
139 | 136 |
|
140 | 137 |
@Override |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/ReferenceDetailElement.java | ||
---|---|---|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
9 |
|
|
10 | 9 |
package eu.etaxonomy.taxeditor.ui.section.reference; |
11 | 10 |
|
12 |
|
|
13 |
|
|
14 | 11 |
import java.util.ArrayList; |
15 | 12 |
import java.util.Arrays; |
16 | 13 |
import java.util.List; |
... | ... | |
51 | 48 |
public class ReferenceDetailElement extends AbstractIdentifiableEntityDetailElement<Reference> |
52 | 49 |
implements IErrorIntolerableElement, IExceptionHandler { |
53 | 50 |
|
54 |
|
|
55 |
|
|
56 | 51 |
private ToggleableTextElement toggleableAbbrevCache; |
57 | 52 |
|
58 | 53 |
private TextWithLabelElement text_edition; |
... | ... | |
102 | 97 |
this.isWizard = isWizard; |
103 | 98 |
} |
104 | 99 |
|
105 |
|
|
106 |
/** {@inheritDoc} */ |
|
107 | 100 |
@Override |
108 | 101 |
protected void createControls(ICdmFormElement formElement, |
109 | 102 |
Reference entity, int style) { |
... | ... | |
423 | 416 |
reference.getLsid(), style); |
424 | 417 |
|
425 | 418 |
} |
419 |
|
|
426 | 420 |
private void createUri(ICdmFormElement element, |
427 | 421 |
Reference reference, int style) { |
428 | 422 |
|
... | ... | |
433 | 427 |
} |
434 | 428 |
|
435 | 429 |
} |
436 |
/** {@inheritDoc} */ |
|
430 |
|
|
437 | 431 |
@Override |
438 | 432 |
public void handleEvent(Object eventSource) { |
439 | 433 |
if (eventSource == combo_referenceType) { |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermVocabularyDetailElement.java | ||
---|---|---|
16 | 16 |
/** |
17 | 17 |
* @author l.morris |
18 | 18 |
* @date 20 Dec 2011 |
19 |
* |
|
20 | 19 |
*/ |
21 | 20 |
public class TermVocabularyDetailElement extends AbstractTermBaseDetailElement<TermVocabulary> { |
22 | 21 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/BioCaseEditorInput.java | ||
---|---|---|
27 | 27 |
/** |
28 | 28 |
* @author pplitzner |
29 | 29 |
* @date 25.02.2014 |
30 |
* |
|
31 | 30 |
*/ |
32 | 31 |
public class BioCaseEditorInput extends DataImportEditorInput<SpecimenOrObservationBase<?>> { |
33 | 32 |
|
... | ... | |
80 | 79 |
}); |
81 | 80 |
} |
82 | 81 |
|
83 |
/* (non-Javadoc) |
|
84 |
* @see java.lang.Object#hashCode() |
|
85 |
*/ |
|
86 | 82 |
@Override |
87 | 83 |
public int hashCode() { |
88 | 84 |
final int prime = 31; |
... | ... | |
91 | 87 |
return result; |
92 | 88 |
} |
93 | 89 |
|
94 |
/* (non-Javadoc) |
|
95 |
* @see java.lang.Object#equals(java.lang.Object) |
|
96 |
*/ |
|
97 | 90 |
@Override |
98 | 91 |
public boolean equals(Object obj) { |
99 | 92 |
if (this == obj) { |
... | ... | |
115 | 108 |
} |
116 | 109 |
return true; |
117 | 110 |
} |
118 |
} |
|
111 |
} |
Also available in: Unified diff
cleanup