+ /**
+ * <p>
+ * createPartialElement
+ * </p>
+ *
+ * @param parentElement
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+ * object.
+ * @param labelString
+ * a {@link java.lang.String} object.
+ * @param partial
+ * a {@link org.joda.time.Partial} object.
+ * @param style
+ * a int.
+ * @return a {@link eu.etaxonomy.taxeditor.ui.element.PartialElement}
+ * object.
+ */
+ public PartialElement createPartialElement(ICdmFormElement parentElement, String labelString, Partial partial,
+ int style) {
+ PartialElement element = new PartialElement(this, parentElement, labelString, style);
+ adapt(element);
+ parentElement.addElement(element);
+ return element;
+ }
+
+ /**
+ * <p>
+ * addSelectionListener
+ * </p>
+ *
+ * @param listener
+ * a {@link org.eclipse.swt.events.SelectionListener} object.
+ */
+ public void addSelectionListener(SelectionListener listener) {
+ selectionListenerList.add(listener);
+ }
+
+ /**
+ * <p>
+ * removeSelectionListener
+ * </p>
+ *
+ * @param listener
+ * a {@link org.eclipse.swt.events.SelectionListener} object.
+ */
+ public void removeSelectionListener(SelectionListener listener) {
+ if (listener == null) {
+ AbstractUtility.error(this.getClass(),
+ "Tried to remove a selection listener from this factories listeners but was null", null);
+ } else {
+ selectionListenerList.remove(listener);
+ }
+ }
+
+ /**
+ * <p>
+ * addPropertyChangeListener
+ * </p>
+ *
+ * @param listener
+ * a {@link org.eclipse.jface.util.IPropertyChangeListener}
+ * object.
+ */
+ public void addPropertyChangeListener(IPropertyChangeListener listener) {
+ if (propertyChangeListeners.contains(listener)) {
+ return;
+ }
+ propertyChangeListeners.add(0, listener);
+ }
+
+ /**
+ * <p>
+ * removePropertyChangeListener
+ * </p>
+ *
+ * @param listener
+ * a {@link org.eclipse.jface.util.IPropertyChangeListener}
+ * object.
+ */
+ public void removePropertyChangeListener(IPropertyChangeListener listener) {
+ propertyChangeListeners.remove(listener);
+ }
+
+ /**
+ * @return the propertyChangeListeners
+ */
+ public List<IPropertyChangeListener> getPropertyChangeListeners() {
+ return propertyChangeListeners;
+ }
+
+ /**
+ * <p>
+ * createHorizontalSeparator
+ * </p>
+ *
+ * @param parentElement
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+ * object.
+ * @param style
+ * a int.
+ * @return a {@link org.eclipse.swt.widgets.Label} object.
+ */
+ public Label createHorizontalSeparator(ICdmFormElement parentElement, int style) {
+ Label separator = this.createSeparator(parentElement.getLayoutComposite(), SWT.HORIZONTAL | style);
+ separator.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
+ return separator;
+ }
+
+ /**
+ * <p>
+ * createVersionElement
+ * </p>
+ *
+ * @param parentElement
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+ * object.
+ * @param entity
+ * a {@link eu.etaxonomy.cdm.model.common.VersionableEntity}
+ * object.
+ * @param style
+ * a int.
+ * @return a
+ * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionElement}
+ * object.
+ */
+ public VersionElement createVersionElement(ICdmFormElement parentElement, VersionableEntity entity, int style) {
+ VersionElement element = new VersionElement(this, parentElement, entity, style);
+ adapt(element);
+ parentElement.addElement(element);
+ return element;
+ }
+
+ /**
+ * @param cdmBaseSection
+ * @param object
+ * @param style
+ * @return
+ */
+ public CdmBaseElement createCdmBaseElement(ICdmFormElement parentElement, CdmBase entity, int style) {
+ CdmBaseElement element = new CdmBaseElement(this, parentElement, entity, style);
+ adapt(element);
+ parentElement.addElement(element);
+ return element;
+ }
+
+ /**
+ * <p>
+ * createVersionSection
+ * </p>
+ *
+ * @param parentElement
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+ * object.
+ * @param style
+ * a int.
+ * @return a
+ * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection}
+ * object.
+ */
+ public VersionSection createVersionSection(ICdmFormElement parentElement, int style) {
+ VersionSection section = new VersionSection(this, parentElement, style);
+ parentElement.addElement(section);
+ adapt(section);
+ return section;
+ }
+
+ /**
+ * @param parent
+ * @param i
+ * @return
+ */
+ public CdmBaseSection createCdmBaseSection(ICdmFormElement parentElement, int style) {
+ CdmBaseSection section = new CdmBaseSection(this, parentElement, style);
+ parentElement.addElement(section);
+ adapt(section);
+ return section;
+ }
+
+ /**
+ * <p>
+ * createEmptyElement
+ * </p>
+ *
+ * @param parentElement
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+ * object.
+ * @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
+ */
+ public EmptyElement createEmptyElement(ICdmFormElement parentElement) {
+ EmptyElement element = new EmptyElement(this, parentElement, null, SWT.NULL);
+ adapt(element);
+ parentElement.addElement(element);
+ return element;
+ }
+
+ /**
+ * <p>
+ * createHeadlineSection
+ * </p>
+ *
+ * @param parentElement
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+ * object.
+ * @return a
+ * {@link eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection}
+ * object.
+ */
+ public HeadlineSection createHeadlineSection(ICdmFormElement parentElement) {
+ HeadlineSection section = new HeadlineSection(this, parentElement, SWT.NULL);
+ parentElement.addElement(section);
+ adapt(section);
+ return section;
+ }
+
+ /**
+ * <p>
+ * createParsingMessageElement
+ * </p>
+ *
+ * @param parentElement
+ * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
+ * object.
+ * @param parserProblem
+ * a {@link eu.etaxonomy.cdm.strategy.parser.ParserProblem}
+ * object.
+ * @param style
+ * a int.
+ * @return a
+ * {@link eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessageElement}
+ * object.
+ */
+ public ParsingMessageElement createParsingMessageElement(ICdmFormElement parentElement,
+ ParserProblem parserProblem, int style) {
+ ParsingMessageElement element = new ParsingMessageElement(this, parentElement, parserProblem, style);
+ adapt(element);
+ parentElement.addElement(element);
+ return element;
+ }
+
+ public AbstractFormSection createDefinedTermDetailSection(Class definedTermClass, ConversationHolder conversation,
+ ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
+
+ AbstractFormSection section = new DefinedTermDetailSection(this, definedTermClass, conversation, parentElement,
+ selectionProvider, style);
+
+ parentElement.addElement(section);
+ adapt(section);
+ return section;
+
+ }
+
+ /**
+ * @param definedTermClass
+ * @param formElement
+ * @param style
+ * @return
+ */
+ public AbstractCdmDetailElement createDefinedTermDetailElement(Class definedTermClass,
+ AbstractCdmDetailSection parentElement, int style) {
+ AbstractCdmDetailElement element = null;
+
+ if (NamedArea.class.isAssignableFrom(definedTermClass)) {
+ element = new eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement(this, parentElement);
+ } else if (definedTermClass.equals(Feature.class)) {
+ element = new FeatureDetailElement(this, parentElement);
+ } else {
+ element = new DefinedTermDetailElement(this, parentElement);
+ }
+
+ adapt(element);
+ parentElement.addElement(element);
+ return element;
+ }
+
+
+ //--------DetailSections---------
+ public NameDetailSection createNameDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ NameDetailSection section = new NameDetailSection(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);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public NomenclaturalReferenceDetailSection createNomenclaturalReferenceDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ NomenclaturalReferenceDetailSection section = new NomenclaturalReferenceDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public TaxonBaseDetailSection createTaxonBaseDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ TaxonBaseDetailSection section = new TaxonBaseDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public AuthorshipDetailSection createAuthorshipDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ AuthorshipDetailSection section = new AuthorshipDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public TeamOrPersonBaseDetailSection createTeamOrPersonBaseDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ TeamOrPersonBaseDetailSection section = new TeamOrPersonBaseDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public TeamDetailSection createTeamDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ TeamDetailSection section = new TeamDetailSection(this, conversation, parentElement, null, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public PersonDetailSection createPersonDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ PersonDetailSection section = new PersonDetailSection(this, conversation, parentElement, null, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public DescriptionDetailSection createDescriptionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ DescriptionDetailSection section = new DescriptionDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public DescriptionElementDetailSection createDescriptionElementDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ DescriptionElementDetailSection section = new DescriptionElementDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public ParsingMessagesSection createParsingMessagesSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ ParsingMessagesSection section = new ParsingMessagesSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public NonViralNameDetailSection createNonViralNameDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ NonViralNameDetailSection section = new NonViralNameDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public MediaDetailsSection createMediaDetailsSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ MediaDetailsSection section = new MediaDetailsSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public DerivedUnitFacadeDetailSection createDerivedUnitFacadeDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ DerivedUnitFacadeDetailSection section = new DerivedUnitFacadeDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public FieldUnitDetailSection createFieldUnitDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ FieldUnitDetailSection section = new FieldUnitDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public GatheringEventDetailSection createGatheringEventDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ GatheringEventDetailSection section = new GatheringEventDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public DerivedUnitBaseDetailSection createDerivedUnitBaseDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ DerivedUnitBaseDetailSection section = new DerivedUnitBaseDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public NaturalLanguageSection createNaturalLanguageSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ NaturalLanguageSection section = new NaturalLanguageSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public FeatureDistributionDetailSection createFeatureDistributionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ FeatureDistributionDetailSection section = new FeatureDistributionDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public ClassificationDetailSection createClassificationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ ClassificationDetailSection section = new ClassificationDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public TaxonNodeDetailSection createTaxonNodeDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ TaxonNodeDetailSection section = new TaxonNodeDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public PolytomousKeyDetailSection createPolytomousKeyDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ PolytomousKeyDetailSection section = new PolytomousKeyDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public PolytomousKeyNodeDetailSection createPolytomousKeyNodeDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ PolytomousKeyNodeDetailSection section = new PolytomousKeyNodeDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public InstitutionDetailSection createInstitutionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ InstitutionDetailSection section = new InstitutionDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public FieldUnitGeneralDetailSection createFieldUnitGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ FieldUnitGeneralDetailSection section = new FieldUnitGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public DerivedUnitGeneralDetailSection createDerivedUnitGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ DerivedUnitGeneralDetailSection section = new DerivedUnitGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public PreservedSpecimenGeneralDetailSection createPreservedSpecimenGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ PreservedSpecimenGeneralDetailSection section = new PreservedSpecimenGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public TissueSampleGeneralDetailSection createTissueSampleGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ TissueSampleGeneralDetailSection section = new TissueSampleGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public DnaSampleGeneralDetailSection createDnaSampleGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ DnaSampleGeneralDetailSection section = new DnaSampleGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public SequenceGeneralDetailSection createSequenceGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ SequenceGeneralDetailSection section = new SequenceGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public SequenceReferenceCollectionDetailSection createSequenceReferenceCollectionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ SequenceReferenceCollectionDetailSection section = new SequenceReferenceCollectionDetailSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public SingleReadGeneralDetailSection createSingleReadGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ SingleReadGeneralDetailSection section = new SingleReadGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public AmplificationGeneralDetailSection createAmplificationGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ AmplificationGeneralDetailSection section = new AmplificationGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public SpecimenScanGeneralDetailSection createSpecimenScanGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ SpecimenScanGeneralDetailSection section = new SpecimenScanGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public LivingPlantPhotoGeneralDetailSection createLivingPlantPhotoGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ LivingPlantPhotoGeneralDetailSection section = new LivingPlantPhotoGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public ArtworkGeneralDetailSection createArtworkGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ ArtworkGeneralDetailSection section = new ArtworkGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public HybridDetailSection createHybridDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ HybridDetailSection section = new HybridDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public UserDetailSection createUserDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ UserDetailSection section = new UserDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public GroupDetailSection createGroupDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ GroupDetailSection section = new GroupDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public DeterminationDetailSection createDeterminationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ DeterminationDetailSection section = new DeterminationDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public PreservedSpecimenDeterminationDetailSection createPreservedSpecimenDeterminationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ PreservedSpecimenDeterminationDetailSection section = new PreservedSpecimenDeterminationDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public TaxonRelationshipDetailSection createTaxonRelationshipDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ TaxonRelationshipDetailSection section = new TaxonRelationshipDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public ReferencedEntityDetailSection createReferencedEntityDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ ReferencedEntityDetailSection section = new ReferencedEntityDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public TermVocabularyDetailSection createTermVocabularyDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ TermVocabularyDetailSection section = new TermVocabularyDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public GatheringEventDetailSection createGatheringSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ GatheringEventDetailSection section = new GatheringEventDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public NamedAreaDetailSection createNamedAreaDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ NamedAreaDetailSection section = new NamedAreaDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public UseRecordDetailSection createUseRecordDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ UseRecordDetailSection section = new UseRecordDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ private void addAndAdaptSection(ICdmFormElement parentElement, AbstractFormSection<?> section) {
+ parentElement.addElement(section);
+ adapt(section);
+ }
+
+ //--------DetailElements------------
+
+ public UseRecordDetailElement createUseRecordDetailElement(ICdmFormElement parentElement){
+ UseRecordDetailElement element = new UseRecordDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public DefinedTermDetailElement<NamedAreaLevel> createNamedAreaLevelElement(ICdmFormElement parentElement){
+ DefinedTermDetailElement<NamedAreaLevel> element = new DefinedTermDetailElement<NamedAreaLevel>(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement createNamedAreaDetailElement(ICdmFormElement parentElement){
+ eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement element = new eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public TermVocabularyDetailElement createTermVocabularyDetailElement(ICdmFormElement parentElement){
+ TermVocabularyDetailElement element = new TermVocabularyDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public ReferenceEntityDetailElement createReferenceEntityDetailElement(ICdmFormElement parentElement){
+ ReferenceEntityDetailElement element = new ReferenceEntityDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public TaxonRelationshipDetailElement createTaxonRelationshipDetailElement(ICdmFormElement parentElement){
+ TaxonRelationshipDetailElement element = new TaxonRelationshipDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public GrantedAuthorityDetailElement createGrantedAuthorityDetailElement(ICdmFormElement parentElement){
+ GrantedAuthorityDetailElement element = new GrantedAuthorityDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public GroupDetailElement createGroupDetailElement(ICdmFormElement parentElement){
+ GroupDetailElement element = new GroupDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public UserDetailElement createUserDetailElement(ICdmFormElement parentElement){
+ UserDetailElement element = new UserDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public HybridDetailElement createHybridDetailElement(ICdmFormElement parentElement){
+ HybridDetailElement element = new HybridDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public InstitutionDetailElement createInstitutionDetailElement(ICdmFormElement parentElement){
+ InstitutionDetailElement element = new InstitutionDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public PolytomousKeyNodeDetailElement createPolytomousKeyNodeDetailElement(ICdmFormElement parentElement){
+ PolytomousKeyNodeDetailElement element = new PolytomousKeyNodeDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public PolytomousKeyDetailElement createPolytomousKeyDetailElement(ICdmFormElement parentElement){
+ PolytomousKeyDetailElement element = new PolytomousKeyDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public CollectionDetailElement createCollectionDetailElement(ICdmFormElement parentElement){
+ CollectionDetailElement element = new CollectionDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public TaxonNodeDetailElement createTaxonNodeDetailElement(ICdmFormElement parentElement){
+ TaxonNodeDetailElement element = new TaxonNodeDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public ClassificationDetailElement createClassificationDetailElement(ICdmFormElement parentElement){
+ ClassificationDetailElement element = new ClassificationDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public FeatureDistributionDetailElement createFeatureDistributionDetailElement(ICdmFormElement parentElement){
+ FeatureDistributionDetailElement element = new FeatureDistributionDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public NaturalLanguageDetailElement createNaturalLanguageDetailElement(ICdmFormElement parentElement){
+ NaturalLanguageDetailElement element = new NaturalLanguageDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public DerivedUnitFacadeDetailElement createDerivedUnitFacadeDetailElement(ICdmFormElement parentElement){
+ DerivedUnitFacadeDetailElement element = new DerivedUnitFacadeDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public NonViralNameDetailElement createNonViralNameDetailElement(ICdmFormElement parentElement){
+ NonViralNameDetailElement element = new NonViralNameDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public DescriptionElementDetailElement createDescriptionElementDetailElement(ICdmFormElement parentElement, int style){
+ DescriptionElementDetailElement element = new DescriptionElementDetailElement(this, parentElement, style);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public DescriptionDetailElement createDescriptionDetailElement(ICdmFormElement parentElement, int style){
+ DescriptionDetailElement element = new DescriptionDetailElement(this, parentElement, style);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public PersonDetailElement createPersonDetailElement(ICdmFormElement parentElement, int style){
+ PersonDetailElement element = new PersonDetailElement(this, parentElement, style);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public TeamDetailElement createTeamDetailElement(ICdmFormElement parentElement, int style){
+ TeamDetailElement element = new TeamDetailElement(this, parentElement, style);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public AuthorshipDetailElement createAuthorshipDetailElement(ICdmFormElement parentElement, int style){
+ AuthorshipDetailElement element = new AuthorshipDetailElement(this, parentElement, style);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public TaxonBaseDetailElement createTaxonBaseDetailElement(ICdmFormElement parentElement, int style){
+ TaxonBaseDetailElement element = new TaxonBaseDetailElement(this, parentElement, style);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public NameDetailElement createNameDetailElement(ICdmFormElement parentElement, int style){
+ NameDetailElement element = new NameDetailElement(this, parentElement, style);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public ReferenceDetailElement createReferenceDetailElement(ICdmFormElement parentElement, int style){
+ ReferenceDetailElement element = new ReferenceDetailElement(this, parentElement, style);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public NomenclaturalReferenceDetailElement createNomenclaturalReferenceDetailElement(ICdmFormElement parentElement, int style){
+ NomenclaturalReferenceDetailElement element = new NomenclaturalReferenceDetailElement(this, parentElement, style);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+
+ public FieldUnitGeneralDetailElement createFieldUnitGeneralDetailElement(ICdmFormElement parentElement){
+ FieldUnitGeneralDetailElement element = new FieldUnitGeneralDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public DerivedUnitGeneralDetailElement createDerivedUnitGeneralDetailElement(ICdmFormElement parentElement){
+ DerivedUnitGeneralDetailElement element = new DerivedUnitGeneralDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public PreservedSpecimenGeneralDetailElement createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement){
+ PreservedSpecimenGeneralDetailElement element = new PreservedSpecimenGeneralDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public TissueSampleGeneralDetailElement createTissueSampleGeneralDetailElement(ICdmFormElement parentElement){
+ TissueSampleGeneralDetailElement element = new TissueSampleGeneralDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public DnaSampleGeneralDetailElement createDnaSampleGeneralDetailElement(ICdmFormElement parentElement){
+ DnaSampleGeneralDetailElement element = new DnaSampleGeneralDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public SequenceGeneralDetailElement createSequenceGeneralDetailElement(ICdmFormElement parentElement){
+ SequenceGeneralDetailElement element = new SequenceGeneralDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public SingleReadGeneralDetailElement createSingleReadGeneralDetailElement(ICdmFormElement parentElement){
+ SingleReadGeneralDetailElement element = new SingleReadGeneralDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public AmplificationGeneralDetailElement createAmplificationGeneralDetailElement(ICdmFormElement parentElement){
+ AmplificationGeneralDetailElement element = new AmplificationGeneralDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public SpecimenScanGeneralDetailElement createSpecimenScanGeneralDetailElement(ICdmFormElement parentElement){
+ SpecimenScanGeneralDetailElement element = new SpecimenScanGeneralDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public LivingPlantPhotoGeneralDetailElement createLivingPlantPhotoGeneralDetailElement(ICdmFormElement parentElement){
+ LivingPlantPhotoGeneralDetailElement element = new LivingPlantPhotoGeneralDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public ArtworkGeneralDetailElement createArtworkGeneralDetailElement(ICdmFormElement parentElement){
+ ArtworkGeneralDetailElement element = new ArtworkGeneralDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+
+ public GatheringEventDetailElement createGatheringEventDetailElement(ICdmFormElement parentElement) {
+ GatheringEventDetailElement element = new GatheringEventDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public FieldUnitDetailElement createFieldUnitDetailElement(ICdmFormElement parentElement) {
+ FieldUnitDetailElement element = new FieldUnitDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+
+ public DerivedUnitBaseDetailElement createDerivedUnitBaseDetailElement(ICdmFormElement parentElement) {
+ DerivedUnitBaseDetailElement element = new DerivedUnitBaseDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public PreservedSpecimenDetailElement createPreservedSpecimenDetailElement(ICdmFormElement parentElement) {
+ PreservedSpecimenDetailElement element = new PreservedSpecimenDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public PreservedSpecimenDeterminationDetailElement createPreservedSpecimenDeterminationDetailElement(ICdmFormElement parentElement) {
+ PreservedSpecimenDeterminationDetailElement element = new PreservedSpecimenDeterminationDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ public DeterminationDetailElement createDeterminationDetailElement(ICdmFormElement parentElement) {
+ DeterminationDetailElement element = new DeterminationDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
+ /**
+ * @param parentElement
+ * @param element
+ */
+ private void addAndAdaptElement(ICdmFormElement parentElement, AbstractCdmDetailElement<?> element) {
+ adapt(element);
+ parentElement.addElement(element);
+ }
+
+ //--------EntityCollectionSection----------
+ public TeamMemberSection createTeamMemberSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ TeamMemberSection section = new TeamMemberSection(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 CreditSection createCreditSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ CreditSection section = new CreditSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public DescriptionElementSourceSection createDescriptionElementSourceSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ DescriptionElementSourceSection section = new DescriptionElementSourceSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public ExtensionSection createExtensionSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ ExtensionSection section = new ExtensionSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public MarkerSection createMarkerSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ MarkerSection section = new MarkerSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public MediaSection createMediaSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ MediaSection section = new MediaSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public DescriptionElementMediaSection createDescriptionElementMediaSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ DescriptionElementMediaSection section = new DescriptionElementMediaSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public MediaRepresentationSection createMediaRepresentationSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ MediaRepresentationSection section = new MediaRepresentationSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public MediaRepresentationPartSection createMediaRepresentationPartSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ MediaRepresentationPartSection section = new MediaRepresentationPartSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public ModifierSection createModifierSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ ModifierSection section = new ModifierSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public NomenclaturalStatusSection createNomenclaturalStatusSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ NomenclaturalStatusSection section = new NomenclaturalStatusSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public NameRelationshipDetailSection createNameRelationshipDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ NameRelationshipDetailSection section = new NameRelationshipDetailSection(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);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public RightsSection createRightsSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ RightsSection section = new RightsSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public SourceSection createSourceSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ SourceSection section = new SourceSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public ScopeSection createScopeSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ ScopeSection section = new ScopeSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public DescriptionSourceSection createDescriptionSourceSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ DescriptionSourceSection section = new DescriptionSourceSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public TypeDesignationSection createTypeDesignationSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ TypeDesignationSection section = new TypeDesignationSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public StateDataSection createStateDataSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ StateDataSection section = new StateDataSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public StatisticalMeasurementValueSection createStatisticalMeasurementValueSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ StatisticalMeasurementValueSection section = new StatisticalMeasurementValueSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public DescribedSpecimenSection createDescribedSpecimenSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ DescribedSpecimenSection section = new DescribedSpecimenSection(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 CurrentDeterminationDetailSection createCurrentDeterminationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ CurrentDeterminationDetailSection section = new CurrentDeterminationDetailSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public PreservedSpecimenCurrentDeterminationDetailSection createPreservedSpecimenCurrentDeterminationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ PreservedSpecimenCurrentDeterminationDetailSection section = new PreservedSpecimenCurrentDeterminationDetailSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public DeterminationHistoryDetailSection createDeterminationHistoryDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ DeterminationHistoryDetailSection section = new DeterminationHistoryDetailSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public PreservedSpecimenDeterminationHistoryDetailSection createPreservedSpecimenDeterminationHistoryDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ PreservedSpecimenDeterminationHistoryDetailSection section = new PreservedSpecimenDeterminationHistoryDetailSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public SpecimenCollectionDetailSection createSpecimenCollectionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ SpecimenCollectionDetailSection section = new SpecimenCollectionDetailSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public PreservedSpecimenSourceCollectionDetailSection createPreservedSpecimenSourceCollectionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ PreservedSpecimenSourceCollectionDetailSection section = new PreservedSpecimenSourceCollectionDetailSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public SourceCollectionDetailSection createSourceCollectionDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ SourceCollectionDetailSection section = new SourceCollectionDetailSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public GeographicalScopeDetailSection createGeographicalScopeDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ GeographicalScopeDetailSection section = new GeographicalScopeDetailSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public ScopeRestrictionSection createScopeRestrictionSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ ScopeRestrictionSection section = new ScopeRestrictionSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public MemberDetailSection createMemberDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ MemberDetailSection section = new MemberDetailSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public GrantedAuthorityDetailSection createGrantedAuthorityDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ GrantedAuthorityDetailSection section = new GrantedAuthorityDetailSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public GroupsByUserDetailSection createGroupsByUserDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ GroupsByUserDetailSection section = new GroupsByUserDetailSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public TaxonomicScopeSection createTaxonomicScopeSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ TaxonomicScopeSection section = new TaxonomicScopeSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ /**
+ * <p>
+ * createEntityCollectionElement
+ * </p>
+ *
+ * @param removeListener
+ * a {@link org.eclipse.swt.events.SelectionListener} object.
+ * @param style
+ * a int.
+ * @param parentElement
+ * a
+ * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
+ * object.
+ * @param versionableEntity
+ * a {@link eu.etaxonomy.cdm.model.common.IVersionableEntity}
+ * object.
+ * @param backgroundColor
+ * a {@link org.eclipse.swt.graphics.Color} object.
+ * @return a
+ * {@link eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement}
+ * object.
+ */
+ public AbstractEntityCollectionElement createEntityCollectionElement(AbstractFormSection parentElement,
+ Object versionableEntity, SelectionListener removeListener, Color backgroundColor, int style) {
+ AbstractEntityCollectionElement element = null;
+
+ Object entity = HibernateProxyHelper.deproxy(versionableEntity);
+
+ if (entity instanceof Annotation) {
+ element = new AnnotationElement(this, parentElement, (Annotation) entity, removeListener, style);
+ } else if (entity instanceof Person) {
+ element = new TeamMemberElement(this, parentElement, (Person) entity, removeListener, style);
+ } else if (entity instanceof Credit) {
+ element = new CreditElement(this, parentElement, (Credit) entity, removeListener, style);
+ } else if (entity instanceof Extension) {
+ element = new ExtensionElement(this, parentElement, (Extension) entity, removeListener, style);
+ } else if (entity instanceof Marker) {
+ element = new MarkerElement(this, parentElement, (Marker) entity, removeListener, style);
+ } else if (entity instanceof Media) {
+ element = new MediaElement(this, parentElement, (Media) entity, removeListener, style);
+ } else if (entity instanceof MediaRepresentation) {
+ element = new MediaRepresentationElement(this, parentElement, (MediaRepresentation) entity, removeListener,
+ style);
+ } else if (entity instanceof ImageFile) {
+ element = new ImageFileElement(this, parentElement, (ImageFile) entity, removeListener, style);
+ } else if (entity instanceof MediaRepresentationPart) {
+ element = new MediaRepresentationPartElement(this, parentElement, (MediaRepresentationPart) entity,
+ removeListener, style);
+ } else if (entity instanceof NomenclaturalStatus) {
+ element = new NomenclaturalStatusElement(this, parentElement, (NomenclaturalStatus) entity, removeListener,
+ style);
+ } else if (entity instanceof Rights) {
+ element = new RightsElement(this, parentElement, (Rights) entity, removeListener, style);
+ } else if (entity instanceof DescriptionElementSource) {
+ element = new DescriptionElementSourceElement(this, parentElement, (DescriptionElementSource) entity,
+ removeListener, style);
+ } else if (entity instanceof IdentifiableSource) {
+ element = new IdentifiableSourceElement(this, parentElement, (IdentifiableSource) entity, removeListener,
+ style);
+ } else if (entity instanceof DefinedTerm) {
+ switch(((DefinedTerm)entity).getTermType()) {
+ case Scope:
+ element = new ScopeElement(this,
+ parentElement,
+ (DefinedTerm) entity,
+ removeListener,
+ style);
+ break;
+ case Modifier:
+ element = new ModifierElement(this,
+ parentElement,
+ (DefinedTerm) entity,
+ removeListener,
+ style);
+ break;
+ default:
+ //FIXME : Actually we should through an exception here
+ element = null;
+ break;