From: Andreas Müller Date: Fri, 19 Mar 2021 15:40:32 +0000 (+0100) Subject: cleanup X-Git-Tag: 5.22.0^2~57 X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/8053cf5ae0f0a3854120d4f7a0b4e90336c8005e cleanup --- diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionElementSourceSection.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionElementSourceSection.java index 009a127ac..a50582983 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionElementSourceSection.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionElementSourceSection.java @@ -1,6 +1,11 @@ /** - * - */ +* Copyright (C) 2018 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.section.description; import java.util.Collection; @@ -18,68 +23,27 @@ import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection; /** - *

* DescriptionElementSourceSection class. - *

* * @author n.hoffmann * @created Nov 17, 2009 - * @version 1.0 */ public class DescriptionElementSourceSection extends AbstractEntityCollectionSection { private Reference defaultSource; - - /** - *

- * Constructor for DescriptionElementSourceSection. - *

- * - * @param parentElement - * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} - * object. - * @param style - * a int. - * @param cdmFormFactory - * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} - * object. - * @param conversation - * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} - * object. - */ public DescriptionElementSourceSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) { super(cdmFormFactory, conversation, parentElement, "Sources", style); } - /** - *

- * Constructor for DescriptionElementSourceSection. - *

- * - * @param parentElement - * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} - * object. - * @param style - * a int. - * @param cdmFormFactory - * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} - * object. - * @param defaultSource - * a default reference for new sources. - * @param conversation - * a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} - * object. - */ public DescriptionElementSourceSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, Reference defaultSource, int style) { super(cdmFormFactory, conversation, parentElement, "Sources", style); this.defaultSource = defaultSource; } - /** {@inheritDoc} */ @Override public DescriptionElementSource createNewElement() { DescriptionElementSource source = DescriptionElementSource.NewInstance(OriginalSourceType.PrimaryTaxonomicSource); @@ -89,10 +53,9 @@ public class DescriptionElementSourceSection extends return source; } - /** {@inheritDoc} */ @Override public Collection getCollection(DescriptionElementBase entity) { - Collection sources = new HashSet(); + Collection sources = new HashSet<>(); sources.addAll(entity.getSources()); sources.addAll(entity.getInDescription().getSources()); return sources; @@ -100,22 +63,19 @@ public class DescriptionElementSourceSection extends @Override public Comparator getComparator() { - return new SourceComparator(); + return new SourceComparator<>(); } - /** {@inheritDoc} */ @Override public String getEmptyString() { return "No references yet."; } - /** {@inheritDoc} */ @Override protected String getTooltipString() { return "Create a new reference"; } - /** {@inheritDoc} */ @Override public void addElement(OriginalSourceBase element) { if (element instanceof DescriptionElementSource){ @@ -123,7 +83,6 @@ public class DescriptionElementSourceSection extends } } - /** {@inheritDoc} */ @Override public void removeElement(OriginalSourceBase element) { if (element instanceof DescriptionElementSource){ @@ -131,21 +90,13 @@ public class DescriptionElementSourceSection extends } } - /** - * {@inheritDoc} - */ @Override public DescriptionElementSource addExisting() { return null; } - /** - * {@inheritDoc} - */ @Override public boolean allowAddExisting() { return false; } - - -} +} \ No newline at end of file diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/AdvancedSourceElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/AdvancedSourceElement.java index 22431401b..b38cf4b43 100755 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/AdvancedSourceElement.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/AdvancedSourceElement.java @@ -63,9 +63,7 @@ public class AdvancedSourceElement extends AbstractCdmDetailElement