/**
- *
- */
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
package eu.etaxonomy.taxeditor.ui.element;
-import java.net.URI;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashSet;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
import eu.etaxonomy.cdm.common.DOI;
+import eu.etaxonomy.cdm.common.URI;
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.agent.ORCID;
import eu.etaxonomy.cdm.model.agent.Person;
import eu.etaxonomy.cdm.model.term.IEnumTerm;
import eu.etaxonomy.cdm.model.term.Representation;
import eu.etaxonomy.cdm.model.term.TermBase;
+import eu.etaxonomy.cdm.model.term.TermTree;
import eu.etaxonomy.cdm.model.term.TermType;
import eu.etaxonomy.cdm.model.term.TermVocabulary;
+import eu.etaxonomy.cdm.persistence.dto.TermDto;
+import eu.etaxonomy.cdm.persistence.dto.TermVocabularyDto;
import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.ui.section.description.detail.TextDataDetailElement;
import eu.etaxonomy.taxeditor.ui.section.feature.CharacterDetailElement;
import eu.etaxonomy.taxeditor.ui.section.feature.CharacterDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.feature.CharacterDtoDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.feature.CharacterDtoDetailSection;
import eu.etaxonomy.taxeditor.ui.section.feature.CharacterNodeDetailElement;
import eu.etaxonomy.taxeditor.ui.section.feature.CharacterNodeDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.feature.CharacterNodeDtoDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.feature.CharacterNodeDtoDetailSection;
import eu.etaxonomy.taxeditor.ui.section.feature.FeatureDistributionDetailElement;
import eu.etaxonomy.taxeditor.ui.section.feature.FeatureDistributionDetailSection;
import eu.etaxonomy.taxeditor.ui.section.feature.FeatureNodeDetailElement;
import eu.etaxonomy.taxeditor.ui.section.feature.FeatureNodeDetailSection;
import eu.etaxonomy.taxeditor.ui.section.feature.FeatureTreeDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.feature.FeatureTreeDetailElementForNode;
import eu.etaxonomy.taxeditor.ui.section.feature.FeatureTreeDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.feature.FeatureTreeDetailSectionForNode;
import eu.etaxonomy.taxeditor.ui.section.feature.InapplicableIfCollectionElement;
import eu.etaxonomy.taxeditor.ui.section.feature.InapplicableIfEntityCollectionSection;
+import eu.etaxonomy.taxeditor.ui.section.feature.InapplicableIfEntityCollectionSectionForNode;
import eu.etaxonomy.taxeditor.ui.section.feature.OnlyApplicableIfCollectionElement;
import eu.etaxonomy.taxeditor.ui.section.feature.OnlyApplicableIfEntityCollectionSection;
+import eu.etaxonomy.taxeditor.ui.section.feature.OnlyApplicableIfEntityCollectionSectionForNode;
import eu.etaxonomy.taxeditor.ui.section.grantedAuthority.GrantedAuthorityCollectionElement;
import eu.etaxonomy.taxeditor.ui.section.grantedAuthority.GrantedAuthorityDetailElement;
import eu.etaxonomy.taxeditor.ui.section.grantedAuthority.GrantedAuthorityDetailSection;
import eu.etaxonomy.taxeditor.ui.section.name.NomenclaturalStatusSection;
import eu.etaxonomy.taxeditor.ui.section.name.NonViralNameDetailElement;
import eu.etaxonomy.taxeditor.ui.section.name.NonViralNameDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.name.ProtologueElement;
-import eu.etaxonomy.taxeditor.ui.section.name.ProtologueSection;
import eu.etaxonomy.taxeditor.ui.section.name.RuleConsideredElement;
import eu.etaxonomy.taxeditor.ui.section.name.SpecimenTypeDesignationElement;
import eu.etaxonomy.taxeditor.ui.section.name.TextTypeDesignationElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.TissueSampleGeneralDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.media.MediaSpecimenGeneralDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.media.MediaSpecimenGeneralDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.reference.AdvancedNomenclaturalSourceElement;
+import eu.etaxonomy.taxeditor.ui.section.reference.AdvancedSourceElement;
import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailElement;
import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalSourceElement;
import eu.etaxonomy.taxeditor.ui.section.reference.OriginalSourceAdvancedSection;
import eu.etaxonomy.taxeditor.ui.section.reference.OriginalSourceElement;
import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailElement;
import eu.etaxonomy.taxeditor.ui.section.vocabulary.FeatureDetailElement;
import eu.etaxonomy.taxeditor.ui.section.vocabulary.MeasurementUnitCollectionElement;
import eu.etaxonomy.taxeditor.ui.section.vocabulary.MeasurementUnitCollectionSection;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.MeasurementUnitDtoCollectionElement;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.MeasurementUnitDtoCollectionSection;
import eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailSection;
import eu.etaxonomy.taxeditor.ui.section.vocabulary.PresenceAbsenceTermDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.RecommendedModifierDtoVocabulariesElement;
import eu.etaxonomy.taxeditor.ui.section.vocabulary.RecommendedModifierVocabulariesCollectionSection;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.RecommendedModifierVocabulariesDtoCollectionSection;
import eu.etaxonomy.taxeditor.ui.section.vocabulary.RecommendedModifierVocabulariesElement;
import eu.etaxonomy.taxeditor.ui.section.vocabulary.StateVocabularyCollectionElement;
import eu.etaxonomy.taxeditor.ui.section.vocabulary.StateVocabularyCollectionSection;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.StateVocabularyDtoCollectionElement;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.StateVocabularyDtoCollectionSection;
import eu.etaxonomy.taxeditor.ui.section.vocabulary.StatisticalMeasureCollectionElement;
import eu.etaxonomy.taxeditor.ui.section.vocabulary.StatisticalMeasureCollectionSection;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.StatisticalMeasureDtoCollectionElement;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.StatisticalMeasureDtoCollectionSection;
import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermMediaSection;
import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailElement;
import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailSection;
return element;
}
+ public TranslatableRepresentationElement createTranslatableRepresentationElementDto(ICdmFormElement parentElement, Representation representation, TermDto term,int textHeight, int style, boolean fillDetails) {
+ TranslatableRepresentationElement element = new TranslatableRepresentationElement(this, parentElement, representation, term, textHeight, style, fillDetails);
+ adapt(element);
+ parentElement.addElement(element);
+ return element;
+ }
+
+
public KeyStatementElement createKeyStatementElement(ICdmFormElement parentElement, String labelString,
KeyStatement keyStatement, int textHeight, int style) {
KeyStatementElement element = new KeyStatementElement(this, parentElement, labelString, keyStatement,
parentElement.addElement(element);
return element;
}
+
/**
* @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
*/
int style) {
return this.createDefinedTermComboElement(termType, null, null, parentElement, labelString, selection, true, style, false, null);
}
+ public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElementDto(
+ TermType termType,
+ ICdmFormElement parentElement,
+ String labelString,
+ TermDto selection,
+ int style) {
+ return this.createDefinedTermComboElement(termType, null, null, parentElement, labelString, selection, true, style, false, null);
+ }
public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
List<T> terms,
int style) {
return this.createDefinedTermComboElement(null, null, terms, parentElement, labelString, selection, true, style, false, null);
}
+
public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
List<T> terms,
ICdmFormElement parentElement,
int style) {
return this.createDefinedTermComboElement(null, null, terms, parentElement, labelString, selection, addEmptyElement, style, false, null);
}
+
public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
TermType termType,
ICdmFormElement parentElement,
int style,
boolean useAbbrevLabel,
Comparator<T> comparator) {
+
if(termType!=null){
TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termType, labelString, selection, addEmptyElement, style, useAbbrevLabel, comparator);
adapt(element);
}
}
+ private <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
+ TermType termType,
+ TermVocabulary<?> termVocabulary,
+ List<T> terms,
+ ICdmFormElement parentElement,
+ String labelString,
+ TermDto selection,
+ boolean addEmptyElement,
+ int style,
+ boolean useAbbrevLabel,
+ Comparator<T> comparator) {
+ if(termType!=null){
+ TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termType, labelString, selection, addEmptyElement, style, useAbbrevLabel, comparator);
+ adapt(element);
+ parentElement.addElement(element);
+ return element;
+ }
+
+ else {
+ //this should never happen
+ return null;
+ }
+ }
+
public NameRelationshipTypeCombo createNameRelationshipTypeCombo(ICdmFormElement parentElement,
String labelString,
int style,
return element;
}
+ public <TERM extends DefinedTermBase<TERM>, VOC extends TermVocabulary<TERM>> VocabularyComboElement<TERM, VOC> createVocabularyDtoComboElement(
+ TermType termType, String label, TermVocabularyDto selection, ICdmFormElement parentElement, int style) {
+ VocabularyComboElement<TERM, VOC> element = new VocabularyComboElement<TERM, VOC>(this, parentElement, termType, label, selection, style);
+ adapt(element);
+ parentElement.addElement(element);
+ return element;
+ }
+
/**
* <p>
* createBrowserElement
* </p>
*
* @param imageUri
- * a {@link java.net.URI} object.
+ * a {@link eu.etaxonomy.cdm.common.URI} object.
* @param style
* a int.
* @param parentElement
* a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
* object.
* @param imageUri
- * a {@link java.net.URI} object.
+ * a {@link eu.etaxonomy.cdm.common.URI} object.
* @param style
* a int.
* @return a {@link eu.etaxonomy.taxeditor.ui.element.ImageElement} object.
}
/**
- * <p>
- * createToggleableTextField
- * </p>
- *
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
- * object.
- * @param labelString
- * a {@link java.lang.String} object.
- * @param initialText
- * a {@link java.lang.String} object.
- * @param initialState
- * a boolean.
- * @param style
- * a int.
- * @return a {@link eu.etaxonomy.taxeditor.ui.element.ToggleableTextElement}
- * object.
+ * createToggleableTextField with relevance
*/
public ToggleableTextElement createToggleableTextField(ICdmFormElement parentElement, String labelString,
- String initialText, boolean initialState, int style) {
+ String initialText, boolean initialState, CacheRelevance relevance, int style) {
ToggleableTextElement element = new ToggleableTextElement(this, parentElement, labelString, initialText,
- initialState, style | orientation);
+ initialState, relevance, style | orientation);
adapt(element);
parentElement.addElement(element);
}
/**
- * <p>
+ * like {@link #createToggleableTextField(ICdmFormElement, String, String, boolean, CacheRelevance, int)}
+ * but with predefined cache relevance == 1
+ */
+ public ToggleableTextElement createToggleableTextField(ICdmFormElement parentElement, String labelString,
+ String initialText, boolean initialState, int style) {
+ return createToggleableTextField(parentElement, labelString, initialText, initialState, CacheRelevance.CACHE1, style);
+ }
+
+
+ /**
* createTimePeriodElement
- * </p>
- *
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
- * object.
- * @param labelString
- * a {@link java.lang.String} object.
- * @param timePeriod
- * a {@link eu.etaxonomy.cdm.model.common.TimePeriod} object.
- * @param style
- * a int.
- * @return a {@link eu.etaxonomy.taxeditor.ui.element.TimePeriodElement}
- * object.
*/
public TimePeriodElement createTimePeriodElement(ICdmFormElement parentElement, String labelString,
TimePeriod timePeriod, int style) {
}
/**
- * <p>
* createVerbatimTimePeriodElement
- * </p>
- *
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
- * object.
- * @param labelString
- * a {@link java.lang.String} object.
- * @param timePeriod
- * a {@link eu.etaxonomy.cdm.model.common.VerbatimTimePeriod} object.
- * @param style
- * a int.
- * @return a {@link eu.etaxonomy.taxeditor.ui.element.VerbatimTimePeriodElement}
- * object.
*/
public VerbatimTimePeriodElement createVerbatimTimePeriodElement(ICdmFormElement parentElement, String labelString,
VerbatimTimePeriod timePeriod, int style) {
return element;
}
-
-
/**
- * <p>
* createGatheringEventUnitElement
- * </p>
- *
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
- * object.
- * @param labelString
- * a {@link java.lang.String} object.
- * @param timePeriod
- * a {@link eu.etaxonomy.cdm.model.common.GatheringEvent} object.
- * @param style
- * a int.
- * @return a {@link eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement}
- * object.
*/
public GatheringEventUnitElement createGatheringEventUnitElement(
ICdmFormElement parentElement,
}
/**
- * <p>
* createPointElement
- * </p>
- *
- * @param style
- * a int.
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
- * object.
- * @param point
- * a {@link eu.etaxonomy.cdm.model.location.Point} object.
- * @return a {@link eu.etaxonomy.taxeditor.ui.element.PointElement} object.
*/
public PointElement createPointElement(ICdmFormElement parentElement, Point point, int style) {
PointElement element = new PointElement(this, parentElement, point, style);
return section;
}
+ public CharacterNodeDtoDetailSection createCharacterNodeDtoDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ CharacterNodeDtoDetailSection section = new CharacterNodeDtoDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
public CharacterDetailSection createCharacterDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
CharacterDetailSection section = new CharacterDetailSection(this, conversation, parentElement, selectionProvider, style);
addAndAdaptSection(parentElement, section);
return section;
}
+ public CharacterDtoDetailSection createCharacterDtoDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ CharacterDtoDetailSection section = new CharacterDtoDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
public CharacterNodeDetailElement createCharacterNodeDetailElement(ICdmFormElement parentElement, int style){
CharacterNodeDetailElement element = new CharacterNodeDetailElement(this, parentElement);
addAndAdaptElement(parentElement, element);
return element;
}
+ public CharacterNodeDtoDetailElement createCharacterNodeDtoDetailElement(ICdmFormElement parentElement, int style){
+ CharacterNodeDtoDetailElement element = new CharacterNodeDtoDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
public CharacterDetailElement createCharacterDetailElement(ICdmFormElement parentElement, int style){
CharacterDetailElement element = new CharacterDetailElement(this, parentElement);
addAndAdaptElement(parentElement, element);
return element;
}
+ public CharacterDtoDetailElement createCharacterDtoDetailElement(ICdmFormElement parentElement, int style){
+ CharacterDtoDetailElement element = new CharacterDtoDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
public FeatureTreeDetailElement createFeatureTreeDetailElement(ICdmFormElement parentElement, int style){
FeatureTreeDetailElement element = new FeatureTreeDetailElement(this, parentElement);
return element;
}
+ /**
+ * @param parentElement
+ * @param style
+ * @return
+ */
+ public AbstractCdmDetailElement<TermTree> createFeatureTreeDetailElementForTree(
+ AbstractCdmDetailSection<TermTree> parentElement, int style) {
+ FeatureTreeDetailElementForNode element = new FeatureTreeDetailElementForNode(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
public FeatureNodeDetailElement createFeatureNodeDetailElement(ICdmFormElement parentElement, int style){
FeatureNodeDetailElement element = new FeatureNodeDetailElement(this, parentElement);
addAndAdaptElement(parentElement, element);
addAndAdaptSection(parentElement, section);
return section;
}
+ public FeatureTreeDetailSectionForNode createFeatureTreeDetailSectionForTree(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ FeatureTreeDetailSectionForNode section = new FeatureTreeDetailSectionForNode(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
public ReferenceDetailSection createReferenceDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
ReferenceDetailSection section = new ReferenceDetailSection(this, conversation, parentElement, selectionProvider, style);
return section;
}
+ public AdvancedSourceElement createAdvancedSourceDetailElement(ICdmFormElement parentElement, int style){
+ AdvancedSourceElement element = new AdvancedSourceElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public AdvancedSourceElement createAdvancedNomenclaturalSourceDetailElement(ICdmFormElement parentElement, int style){
+ AdvancedNomenclaturalSourceElement element = new AdvancedNomenclaturalSourceElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
public SingleSourceSection createSingleSourceSection(ConversationHolder conversation, ICdmFormElement parentElement, CdmBase cdmEntity, ISelectionProvider selectionProvider, String label, int style){
SingleSourceSection section = new SingleSourceSection(this, conversation, parentElement, cdmEntity, selectionProvider, style, label);
addAndAdaptSection(parentElement, section);
return element;
}
+
+ public NomenclaturalSourceElement createNomenclaturalSourceElement(ICdmFormElement parentElement, CdmBase cdmEntity, String label){
+ NomenclaturalSourceElement element = new NomenclaturalSourceElement(this, parentElement, cdmEntity, label);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
public TaxonRelationshipDetailElement createTaxonRelationshipDetailElement(ICdmFormElement parentElement){
TaxonRelationshipDetailElement element = new TaxonRelationshipDetailElement(this, parentElement);
addAndAdaptElement(parentElement, element);
return element;
}
- public ReferenceDetailElement createReferenceDetailElement(ICdmFormElement parentElement, int style, boolean isWizard){
- ReferenceDetailElement element = new ReferenceDetailElement(this, parentElement, style, isWizard);
+ public ReferenceDetailElement createReferenceDetailElement(ICdmFormElement parentElement, int style){
+ ReferenceDetailElement element = new ReferenceDetailElement(this, parentElement, style);
addAndAdaptElement(parentElement, element);
return element;
}
return section;
}
+ public InapplicableIfEntityCollectionSectionForNode createInapplicableIfEntityCollectionSectionForNode(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ InapplicableIfEntityCollectionSectionForNode section = new InapplicableIfEntityCollectionSectionForNode(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public OnlyApplicableIfEntityCollectionSectionForNode createOnlyApplicableIfEntityCollectionSectionForNode(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ OnlyApplicableIfEntityCollectionSectionForNode section = new OnlyApplicableIfEntityCollectionSectionForNode(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
public AnnotationSection createAnnotationSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
AnnotationSection section = new AnnotationSection(this, conversation, parentElement, style);
addAndAdaptSection(parentElement, section);
return section;
}
- public ProtologueSection createProtologueSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
- ProtologueSection section = new ProtologueSection(this, conversation, parentElement, style);
+// public ProtologueSection createProtologueSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+// ProtologueSection section = new ProtologueSection(this, conversation, parentElement, style);
+// addAndAdaptSection(parentElement, section);
+// return section;
+// }
+ public ExternalLinksSection createExternalLinksSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ ExternalLinksSection section = new ExternalLinksSection(this, conversation, parentElement, style);
addAndAdaptSection(parentElement, section);
return section;
}
- public ExternalLinksSection createExternalLinksSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
- ExternalLinksSection section = new ExternalLinksSection(this, conversation, parentElement, style);
+
+ public ExternalLinksSection createExternalLinksSection(ConversationHolder conversation, ICdmFormElement parentElement, String label, int style){
+ ExternalLinksSection section = new ExternalLinksSection(this, conversation, parentElement, label, style);
addAndAdaptSection(parentElement, section);
return section;
}
return section;
}
+ public StateVocabularyDtoCollectionSection createStateVocabulariesDtoSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ StateVocabularyDtoCollectionSection section = new StateVocabularyDtoCollectionSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
public RecommendedModifierVocabulariesCollectionSection createRecommendedModifierVocabulariesCollectionSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
RecommendedModifierVocabulariesCollectionSection section = new RecommendedModifierVocabulariesCollectionSection(this, conversation, parentElement, style);
addAndAdaptSection(parentElement, section);
return section;
}
+ public RecommendedModifierVocabulariesDtoCollectionSection createRecommendedModifierVocabulariesDtoCollectionSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ RecommendedModifierVocabulariesDtoCollectionSection section = new RecommendedModifierVocabulariesDtoCollectionSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
public MeasurementUnitCollectionSection createMeasurementUnitCollectionSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
MeasurementUnitCollectionSection section = new MeasurementUnitCollectionSection(this, conversation, parentElement, style);
return section;
}
+ public MeasurementUnitDtoCollectionSection createMeasurementUnitDtoCollectionSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ MeasurementUnitDtoCollectionSection section = new MeasurementUnitDtoCollectionSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
public StatisticalMeasureCollectionSection createStatisticalMeasureCollectionSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
StatisticalMeasureCollectionSection section = new StatisticalMeasureCollectionSection(this, conversation, parentElement, style);
addAndAdaptSection(parentElement, section);
return section;
}
+ public StatisticalMeasureDtoCollectionSection createStatisticalMeasureDtoCollectionSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ StatisticalMeasureDtoCollectionSection section = new StatisticalMeasureDtoCollectionSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
public CollectingAreasDetailSection createCollectingAreasDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
CollectingAreasDetailSection section = new CollectingAreasDetailSection(this, conversation, parentElement, style);
addAndAdaptSection(parentElement, section);
return section;
}
-
public AbstractEntityCollectionElement createEntityCollectionElement(AbstractFormSection parentElement,
Object versionableEntity, SelectionListener removeListener, Color backgroundColor, int style) {
AbstractEntityCollectionElement<?> element = null;
// this is the special case for protologs, maybe we can do this
// differently when API improves
DescriptionElementBase descriptionElement = (DescriptionElementBase) entity;
- if (descriptionElement.getFeature().equals(Feature.PROTOLOGUE())) {
- element = new ProtologueElement(this, parentElement, descriptionElement, removeListener, style);
- }
+// if (descriptionElement.getFeature().equals(Feature.PROTOLOGUE())) {
+// element = new ProtologueElement(this, parentElement, descriptionElement, removeListener, style);
+// }
} else if (entity instanceof Identifier) {
if(parentElement instanceof AbstractSampleDesignationDetailSection){
element = new SampleDesignationTextDetailElement(this, parentElement, (Identifier<DnaSample>) entity, removeListener, backgroundColor, style);
default:
break;
}
- } else if (entity instanceof MeasurementUnit) {
+ }else if (entity instanceof TermVocabularyDto) {
+ TermVocabularyDto termVocabulary = (TermVocabularyDto)entity;
+ switch (termVocabulary.getTermType()) {
+ case State:
+ element = new StateVocabularyDtoCollectionElement(this, parentElement, termVocabulary, removeListener, backgroundColor, style);
+ break;
+ case Modifier:
+ element = new RecommendedModifierDtoVocabulariesElement(this, parentElement, termVocabulary, removeListener, backgroundColor, style);
+ break;
+ default:
+ break;
+ }
+ }else if (entity instanceof MeasurementUnit) {
element = new MeasurementUnitCollectionElement(this, parentElement, (MeasurementUnit) entity, removeListener, backgroundColor, style);
- } else if (entity instanceof StatisticalMeasure) {
+ }else if (entity instanceof TermDto) {
+ if(((TermDto)entity).getTermType().equals(TermType.MeasurementUnit)){
+ element = new MeasurementUnitDtoCollectionElement(this, parentElement, (TermDto) entity, removeListener, backgroundColor, style);
+ }else if (((TermDto)entity).getTermType().equals(TermType.StatisticalMeasure)){
+ element = new StatisticalMeasureDtoCollectionElement(this, parentElement, (TermDto) entity, removeListener, backgroundColor, style);
+ }
+ }else if (entity instanceof StatisticalMeasure) {
element = new StatisticalMeasureCollectionElement(this, parentElement, (StatisticalMeasure) entity, removeListener, backgroundColor, style);
} else if (entity instanceof FeatureState && parentElement instanceof InapplicableIfEntityCollectionSection) {
element = new InapplicableIfCollectionElement(this, parentElement, (FeatureState) entity, removeListener, backgroundColor, style);
}
+
+
// public RichTextWithLabelElement createRichTextLabelElement(ICdmFormElement parentElement, String labelString, String initialText, int textHeight, int style) {
// RichTextWithLabelElement element = new RichTextWithLabelElement(this, parentElement, labelString,
// initialText, textHeight, style);