Revision 6c9baadc
Added by Katja Luther almost 4 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/FeatureDtoContentProvider.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2020 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.definedterm; |
|
10 |
|
|
11 |
import java.util.ArrayList; |
|
12 |
import java.util.Collection; |
|
13 |
import java.util.HashSet; |
|
14 |
|
|
15 |
import eu.etaxonomy.cdm.api.service.IVocabularyService; |
|
16 |
import eu.etaxonomy.cdm.persistence.dto.FeatureDto; |
|
17 |
import eu.etaxonomy.cdm.persistence.dto.TermDto; |
|
18 |
import eu.etaxonomy.cdm.persistence.dto.TermVocabularyDto; |
|
19 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
|
20 |
|
|
21 |
/** |
|
22 |
* @author k.luther |
|
23 |
* @since Jun 11, 2020 |
|
24 |
*/ |
|
25 |
public class FeatureDtoContentProvider extends TermDtoContentProvider { |
|
26 |
|
|
27 |
boolean isAvailableForTaxon = true; |
|
28 |
boolean isAvailableForTaxonName = true; |
|
29 |
boolean isAvailableForOccurrence = true; |
|
30 |
|
|
31 |
public FeatureDtoContentProvider(boolean isAvailableForTaxon, boolean isAvailableForTaxonName, boolean isAvailableForOccurrence){ |
|
32 |
super(); |
|
33 |
this.isAvailableForOccurrence = isAvailableForOccurrence; |
|
34 |
this.isAvailableForTaxon = isAvailableForTaxon; |
|
35 |
this.isAvailableForTaxonName = isAvailableForTaxonName; |
|
36 |
} |
|
37 |
|
|
38 |
@Override |
|
39 |
public Object[] getChildren(Object parentElement) { |
|
40 |
Collection<TermDto> children = new HashSet<>(); |
|
41 |
if(parentElement instanceof TermVocabularyDto){ |
|
42 |
children.addAll(getChildTerms((TermVocabularyDto)parentElement)); |
|
43 |
} else if(parentElement instanceof FeatureDto){ |
|
44 |
if(((FeatureDto) parentElement).getIncludes()!=null){ |
|
45 |
for (TermDto child: ((FeatureDto) parentElement).getIncludes()){ |
|
46 |
if (child instanceof FeatureDto){ |
|
47 |
FeatureDto featureChild= (FeatureDto)child; |
|
48 |
if (featureChild.isAvailableForOccurrence() && isAvailableForOccurrence) { |
|
49 |
children.add(featureChild); |
|
50 |
} |
|
51 |
else if (featureChild.isAvailableForTaxon() && isAvailableForTaxon) { |
|
52 |
children.add(featureChild); |
|
53 |
}else if (featureChild.isAvailableForTaxonName() && isAvailableForTaxonName) { |
|
54 |
children.add(featureChild); |
|
55 |
} |
|
56 |
} |
|
57 |
} |
|
58 |
|
|
59 |
} |
|
60 |
if(((FeatureDto) parentElement).getGeneralizationOf()!=null){ |
|
61 |
for (TermDto child: ((FeatureDto) parentElement).getGeneralizationOf()){ |
|
62 |
if (child instanceof FeatureDto){ |
|
63 |
FeatureDto featureChild= (FeatureDto)child; |
|
64 |
if (featureChild.isAvailableForOccurrence() && isAvailableForOccurrence) { |
|
65 |
children.add(featureChild); |
|
66 |
} |
|
67 |
else if (featureChild.isAvailableForTaxon() && isAvailableForTaxon) { |
|
68 |
children.add(featureChild); |
|
69 |
}else if (featureChild.isAvailableForTaxonName() && isAvailableForTaxonName) { |
|
70 |
children.add(featureChild); |
|
71 |
} |
|
72 |
} |
|
73 |
} |
|
74 |
|
|
75 |
} |
|
76 |
} |
|
77 |
return children.toArray(); |
|
78 |
} |
|
79 |
|
|
80 |
|
|
81 |
|
|
82 |
@Override |
|
83 |
public Collection<TermDto> getChildTerms(TermVocabularyDto voc) { |
|
84 |
Collection<TermDto> children = getVocabularyToChildTermMap().get(voc); |
|
85 |
Collection<TermDto> filteredChildren = new HashSet<>(); |
|
86 |
if(children==null || children.isEmpty()){ |
|
87 |
children = new ArrayList<>(CdmStore.getService(IVocabularyService.class).getCompleteTermHierarchy(voc)); |
|
88 |
for (TermDto child: children){ |
|
89 |
if (child instanceof FeatureDto){ |
|
90 |
FeatureDto featureChild= (FeatureDto)child; |
|
91 |
if (featureChild.isAvailableForOccurrence() && isAvailableForOccurrence) { |
|
92 |
filteredChildren.add(featureChild); |
|
93 |
} |
|
94 |
else if (featureChild.isAvailableForTaxon() && isAvailableForTaxon) { |
|
95 |
filteredChildren.add(featureChild); |
|
96 |
}else if (featureChild.isAvailableForTaxonName() && isAvailableForTaxonName) { |
|
97 |
filteredChildren.add(featureChild); |
|
98 |
} |
|
99 |
} |
|
100 |
} |
|
101 |
|
|
102 |
getVocabularyToChildTermMap().put(voc, filteredChildren); |
|
103 |
}else{ |
|
104 |
filteredChildren = children; |
|
105 |
} |
|
106 |
return filteredChildren; |
|
107 |
} |
|
108 |
|
|
109 |
|
|
110 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java | ||
---|---|---|
59 | 59 |
import eu.etaxonomy.cdm.model.common.Annotation; |
60 | 60 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
61 | 61 |
import eu.etaxonomy.cdm.model.common.Credit; |
62 |
import eu.etaxonomy.cdm.model.common.ExtendedTimePeriod; |
|
62 | 63 |
import eu.etaxonomy.cdm.model.common.Extension; |
63 | 64 |
import eu.etaxonomy.cdm.model.common.ICdmBase; |
64 | 65 |
import eu.etaxonomy.cdm.model.common.IdentifiableSource; |
... | ... | |
87 | 88 |
import eu.etaxonomy.cdm.model.description.StatisticalMeasure; |
88 | 89 |
import eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue; |
89 | 90 |
import eu.etaxonomy.cdm.model.description.TaxonInteraction; |
91 |
import eu.etaxonomy.cdm.model.description.TemporalData; |
|
90 | 92 |
import eu.etaxonomy.cdm.model.description.TextData; |
91 | 93 |
import eu.etaxonomy.cdm.model.location.NamedArea; |
92 | 94 |
import eu.etaxonomy.cdm.model.location.NamedAreaLevel; |
... | ... | |
190 | 192 |
import eu.etaxonomy.taxeditor.ui.section.description.detail.IndividualsAssociationDetailElement; |
191 | 193 |
import eu.etaxonomy.taxeditor.ui.section.description.detail.QuantitativeDataDetailElement; |
192 | 194 |
import eu.etaxonomy.taxeditor.ui.section.description.detail.TaxonInteractionDetailElement; |
195 |
import eu.etaxonomy.taxeditor.ui.section.description.detail.TemporalDataDetailElement; |
|
193 | 196 |
import eu.etaxonomy.taxeditor.ui.section.description.detail.TextDataDetailElement; |
194 | 197 |
import eu.etaxonomy.taxeditor.ui.section.feature.CharacterDetailElement; |
195 | 198 |
import eu.etaxonomy.taxeditor.ui.section.feature.CharacterDetailSection; |
... | ... | |
2584 | 2587 |
|
2585 | 2588 |
public RightsSection createRightsSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){ |
2586 | 2589 |
RightsSection section = new RightsSection(this, conversation, parentElement, style); |
2590 |
|
|
2587 | 2591 |
addAndAdaptSection(parentElement, section); |
2588 | 2592 |
return section; |
2589 | 2593 |
} |
... | ... | |
3217 | 3221 |
} else if (entity instanceof TaxonInteraction) { |
3218 | 3222 |
detailedDescriptionElement = new TaxonInteractionDetailElement(this, parentElement, |
3219 | 3223 |
(TaxonInteraction) entity, style); |
3224 |
} else if (entity instanceof TemporalData) { |
|
3225 |
detailedDescriptionElement = new TemporalDataDetailElement(this, parentElement, (TemporalData) entity, style); |
|
3220 | 3226 |
} else if (entity instanceof TextData) { |
3221 | 3227 |
detailedDescriptionElement = new TextDataDetailElement(this, parentElement, (TextData) entity, style); |
3222 |
} else { |
|
3228 |
} |
|
3229 |
else { |
|
3223 | 3230 |
throw new IllegalStateException("There is no interface for the given description element"); |
3224 | 3231 |
} |
3225 | 3232 |
adapt(detailedDescriptionElement); |
... | ... | |
3328 | 3335 |
return element; |
3329 | 3336 |
} |
3330 | 3337 |
|
3338 |
/** |
|
3339 |
* @param extendedTimePeriodElement |
|
3340 |
* @param twistie |
|
3341 |
* @return |
|
3342 |
*/ |
|
3343 |
public ExtendedTimeDetailSection createExtendedTimeDetailSection( |
|
3344 |
ExtendedTimePeriodElement parentElement, int style) { |
|
3345 |
ExtendedTimeDetailSection section = new ExtendedTimeDetailSection(this, parentElement, style); |
|
3346 |
parentElement.addElement(section); |
|
3347 |
adapt(section); |
|
3348 |
return section; |
|
3349 |
} |
|
3350 |
public ExtendedTimePeriodElement createExtendedTimePeriodElement( |
|
3351 |
ICdmFormElement parentElement, String labelString, ExtendedTimePeriod timePeriod, int style) { |
|
3352 |
ExtendedTimePeriodElement section = new ExtendedTimePeriodElement(this, parentElement, labelString, timePeriod, style); |
|
3353 |
parentElement.addElement(section); |
|
3354 |
adapt(section); |
|
3355 |
return section; |
|
3356 |
} |
|
3357 |
|
|
3331 | 3358 |
|
3332 | 3359 |
// public RichTextWithLabelElement createRichTextLabelElement(ICdmFormElement parentElement, String labelString, String initialText, int textHeight, int style) { |
3333 | 3360 |
// RichTextWithLabelElement element = new RichTextWithLabelElement(this, parentElement, labelString, |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/DateDetailSection.java | ||
---|---|---|
13 | 13 |
public class DateDetailSection<T extends TimePeriod> |
14 | 14 |
extends AbstractFormSection<T> { |
15 | 15 |
protected TextWithLabelElement text_freeText; |
16 |
private PartialElement partialElement_start;
|
|
17 |
private PartialElement partialElement_end;
|
|
18 |
private CheckboxElement period_continue;
|
|
19 |
private TextWithLabelElement text_parseText;
|
|
20 |
private TextWithLabelElement text_VerbatimDate = null;
|
|
21 |
private int cursorPosition;
|
|
22 |
private boolean includeVerbatim;
|
|
16 |
protected PartialElement partialElement_start;
|
|
17 |
protected PartialElement partialElement_end;
|
|
18 |
protected CheckboxElement period_continue;
|
|
19 |
protected TextWithLabelElement text_parseText;
|
|
20 |
protected TextWithLabelElement text_VerbatimDate = null;
|
|
21 |
protected int cursorPosition;
|
|
22 |
protected boolean includeVerbatim;
|
|
23 | 23 |
|
24 | 24 |
public int getCursorPosition() { |
25 | 25 |
return cursorPosition; |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ExtendedTimeDetailSection.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2020 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.ui.element; |
|
10 |
|
|
11 |
import eu.etaxonomy.cdm.model.common.ExtendedTimePeriod; |
|
12 |
|
|
13 |
/** |
|
14 |
* @author k.luther |
|
15 |
* @since Jun 12, 2020 |
|
16 |
*/ |
|
17 |
public class ExtendedTimeDetailSection extends DateDetailSection<ExtendedTimePeriod> { |
|
18 |
|
|
19 |
private PartialElement partialElement_extremeStart; |
|
20 |
private PartialElement partialElement_extremeEnd; |
|
21 |
/** |
|
22 |
* @param formFactory |
|
23 |
* @param parentElement |
|
24 |
* @param includeVerbatim |
|
25 |
* @param style |
|
26 |
*/ |
|
27 |
protected ExtendedTimeDetailSection(CdmFormFactory formFactory, ICdmFormElement parentElement, |
|
28 |
int style) { |
|
29 |
super(formFactory, parentElement, false, style); |
|
30 |
|
|
31 |
// this.includeVerbatim = includeVerbatim; |
|
32 |
|
|
33 |
|
|
34 |
partialElement_extremeStart = formFactory.createPartialElement(this, "Extreme Start", null, style); |
|
35 |
partialElement_start = formFactory.createPartialElement(this, |
|
36 |
"Start ", null, style); |
|
37 |
|
|
38 |
period_continue = formFactory.createCheckbox(this, "Continue", false, style); |
|
39 |
period_continue.getMainControl().setLayoutData(LayoutConstants.FILL_HORIZONTALLY(6,1)); |
|
40 |
partialElement_end = formFactory.createPartialElement(this, "End ", |
|
41 |
null, style); |
|
42 |
|
|
43 |
partialElement_extremeEnd = formFactory.createPartialElement(this, "Extreme End ", |
|
44 |
null, style); |
|
45 |
|
|
46 |
text_freeText = formFactory.createTextWithLabelElement(this, |
|
47 |
"Freetext", null, style); |
|
48 |
text_freeText.getMainControl().setLayoutData( |
|
49 |
LayoutConstants.FILL_HORIZONTALLY(6, 1)); |
|
50 |
|
|
51 |
|
|
52 |
formFactory.addPropertyChangeListener(this); |
|
53 |
|
|
54 |
} |
|
55 |
|
|
56 |
@Override |
|
57 |
@SuppressWarnings("unchecked") |
|
58 |
protected ExtendedTimePeriod newInstance(){ |
|
59 |
return ExtendedTimePeriod.NewExtendedInstance(); |
|
60 |
|
|
61 |
} |
|
62 |
|
|
63 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ExtendedTimePeriodElement.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2020 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.ui.element; |
|
10 |
|
|
11 |
import org.eclipse.swt.graphics.Color; |
|
12 |
import org.eclipse.swt.widgets.Label; |
|
13 |
import org.eclipse.ui.forms.widgets.Section; |
|
14 |
|
|
15 |
import eu.etaxonomy.cdm.model.common.ExtendedTimePeriod; |
|
16 |
|
|
17 |
/** |
|
18 |
* @author k.luther |
|
19 |
* @since Jun 12, 2020 |
|
20 |
*/ |
|
21 |
public class ExtendedTimePeriodElement extends AbstractCdmFormElement implements ISelectable { |
|
22 |
|
|
23 |
protected ExtendedTimePeriod timePeriod; |
|
24 |
protected Label label; |
|
25 |
protected ExtendedTimeDetailSection section_dateDetails; |
|
26 |
|
|
27 |
/** |
|
28 |
* @param formFactory |
|
29 |
* @param parentElement |
|
30 |
* @param labelString |
|
31 |
* @param timePeriod |
|
32 |
* @param style |
|
33 |
*/ |
|
34 |
public ExtendedTimePeriodElement(CdmFormFactory formFactory, ICdmFormElement parentElement, String labelString, |
|
35 |
ExtendedTimePeriod timePeriod, int style) { |
|
36 |
super(formFactory, parentElement); |
|
37 |
label = formFactory.createLabel(getLayoutComposite(), labelString); |
|
38 |
|
|
39 |
addControl(label); |
|
40 |
|
|
41 |
section_dateDetails = createDateDetailSection(); |
|
42 |
addControl(section_dateDetails); |
|
43 |
|
|
44 |
setTimePeriod(timePeriod); |
|
45 |
|
|
46 |
formFactory.addPropertyChangeListener(this); |
|
47 |
} |
|
48 |
|
|
49 |
protected ExtendedTimeDetailSection createDateDetailSection() { |
|
50 |
return formFactory.createExtendedTimeDetailSection(this, |
|
51 |
Section.TWISTIE); |
|
52 |
} |
|
53 |
|
|
54 |
@Override |
|
55 |
public void setBackground(Color color) { |
|
56 |
label.setBackground(color); |
|
57 |
section_dateDetails.setBackground(color); |
|
58 |
} |
|
59 |
|
|
60 |
@Override |
|
61 |
public void setSelected(boolean selected) { |
|
62 |
setBackground(selected ? SELECTED : getPersistentBackground()); |
|
63 |
} |
|
64 |
|
|
65 |
public void setLabel(String string) { |
|
66 |
label.setText(string); |
|
67 |
} |
|
68 |
|
|
69 |
public void setTimePeriod(ExtendedTimePeriod timePeriod) { |
|
70 |
this.timePeriod = timePeriod; |
|
71 |
if (timePeriod != null) { |
|
72 |
section_dateDetails.setEntity(timePeriod); |
|
73 |
} |
|
74 |
} |
|
75 |
|
|
76 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/PartialElement.java | ||
---|---|---|
49 | 49 |
super(formFactory, formElement); |
50 | 50 |
|
51 | 51 |
TableWrapLayout layout = LayoutConstants.LAYOUT(7, false); |
52 |
layout.horizontalSpacing = 5; |
|
53 |
formElement.getLayoutComposite().setLayout(layout); |
|
52 |
formElement.getLayoutComposite().setLayout(layout); |
|
54 | 53 |
|
55 | 54 |
label = formFactory.createLabel(getLayoutComposite(), labelString); |
56 | 55 |
addControl(label); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TimePeriodElementBase.java | ||
---|---|---|
4 | 4 |
import org.eclipse.swt.graphics.Color; |
5 | 5 |
import org.eclipse.swt.widgets.Label; |
6 | 6 |
|
7 |
|
|
8 | 7 |
import eu.etaxonomy.cdm.model.common.TimePeriod; |
9 | 8 |
|
10 |
public abstract class TimePeriodElementBase<T extends TimePeriod>
|
|
11 |
extends AbstractCdmFormElement
|
|
9 |
public abstract class TimePeriodElementBase<T extends TimePeriod> |
|
10 |
extends AbstractCdmFormElement |
|
12 | 11 |
implements ISelectable { |
13 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
protected T timePeriod; |
|
16 |
protected Label label; |
|
17 |
protected DateDetailSection<T> section_dateDetails; |
|
18 |
|
|
14 | 19 |
/** |
15 | 20 |
* <p> |
16 | 21 |
* Constructor for TimePeriodElement. |
... | ... | |
45 | 50 |
formFactory.addPropertyChangeListener(this); |
46 | 51 |
} |
47 | 52 |
|
48 |
protected abstract DateDetailSection<T> createDateDetailSection(); |
|
49 |
|
|
50 |
protected T timePeriod; |
|
51 |
protected Label label; |
|
52 |
protected DateDetailSection<T> section_dateDetails; |
|
53 | 53 |
|
54 |
protected abstract DateDetailSection<T> createDateDetailSection(); |
|
54 | 55 |
|
55 | 56 |
/** |
56 | 57 |
* <p> |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionElementDetailSection.java | ||
---|---|---|
129 | 129 |
if(feature.isSupportsQuantitativeData()){count++;} |
130 | 130 |
if(feature.isSupportsTaxonInteraction()){count++;} |
131 | 131 |
if(feature.isSupportsTextData()){count++;} |
132 |
if(feature.isSupportsTemporalData()){count++;} |
|
132 | 133 |
return count > 1; |
133 | 134 |
} |
134 | 135 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/TemporalDataDetailElement.java | ||
---|---|---|
1 |
/** |
|
2 |
* Copyright (C) 2020 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.ui.section.description.detail; |
|
10 |
|
|
11 |
import eu.etaxonomy.cdm.model.description.TemporalData; |
|
12 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
|
13 |
import eu.etaxonomy.taxeditor.ui.element.ExtendedTimePeriodElement; |
|
14 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
|
15 |
|
|
16 |
/** |
|
17 |
* @author k.luther |
|
18 |
* @since Jun 12, 2020 |
|
19 |
*/ |
|
20 |
public class TemporalDataDetailElement extends AbstractDetailedDescriptionDetailElement<TemporalData> { |
|
21 |
|
|
22 |
ExtendedTimePeriodElement timePeriod; |
|
23 |
|
|
24 |
/** |
|
25 |
* @param formFactory |
|
26 |
* @param formElement |
|
27 |
* @param entity |
|
28 |
* @param style |
|
29 |
*/ |
|
30 |
public TemporalDataDetailElement(CdmFormFactory formFactory, ICdmFormElement formElement, TemporalData entity, |
|
31 |
int style) { |
|
32 |
super(formFactory, formElement, entity, style); |
|
33 |
|
|
34 |
} |
|
35 |
|
|
36 |
@Override |
|
37 |
protected void createControls(ICdmFormElement formElement, TemporalData entity, int style) { |
|
38 |
timePeriod = formFactory.createExtendedTimePeriodElement(formElement, "Flowering Season", entity.getPeriod(), style); |
|
39 |
|
|
40 |
|
|
41 |
} |
|
42 |
|
|
43 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/FeatureDetailElement.java | ||
---|---|---|
38 | 38 |
|
39 | 39 |
private CheckboxElement supportsCommonTaxonName; |
40 | 40 |
|
41 |
private CheckboxElement supportsTemporalData; |
|
42 |
|
|
41 | 43 |
private StateVocabularyCollectionSection sectionStateVocabularies; |
42 | 44 |
|
43 | 45 |
private MeasurementUnitCollectionSection sectionMeasurementUnits; |
... | ... | |
72 | 74 |
supportsTaxonInteraction = formFactory.createCheckbox(formElement, "Supports Taxon Interaction", entity.isSupportsTaxonInteraction(), style); |
73 | 75 |
supportsCategoricalData = formFactory.createCheckbox(formElement, "Supports Categorical Data", entity.isSupportsCategoricalData(), style); |
74 | 76 |
supportsCommonTaxonName = formFactory.createCheckbox(formElement, "Supports Common Taxon Name", entity.isSupportsCommonTaxonName(), style); |
77 |
supportsTemporalData = formFactory.createCheckbox(formElement, "Supports Temporal Data", entity.isSupportsTemporalData(), style); |
|
75 | 78 |
|
76 | 79 |
if (supportsCategoricalData.getSelection()) { |
77 | 80 |
sectionStateVocabularies = formFactory.createStateVocabulariesSection(getConversationHolder(), |
... | ... | |
144 | 147 |
else if(eventSource == supportsCommonTaxonName){ |
145 | 148 |
getEntity().setSupportsCommonTaxonName(supportsCommonTaxonName.getSelection()); |
146 | 149 |
} |
150 |
else if(eventSource == supportsTemporalData){ |
|
151 |
getEntity().setSupportsTemporalData(supportsTemporalData.getSelection()); |
|
152 |
} |
|
147 | 153 |
else if(eventSource == availableForSpecimenOrObservation){ |
148 | 154 |
getEntity().setAvailableForOccurrence(availableForSpecimenOrObservation.getSelection()); |
149 | 155 |
} |
Also available in: Unified diff
ref #8990: add temporal data to editor