cleanup
authorAndreas Müller <a.mueller@bgbm.org>
Tue, 6 Jun 2023 15:02:00 +0000 (17:02 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Tue, 6 Jun 2023 15:02:00 +0000 (17:02 +0200)
src/main/java/eu/etaxonomy/cdm/vaadin/model/name/NomenclaturalStatusDTO.java
src/main/java/eu/etaxonomy/cdm/vaadin/view/name/NomenclaturalStatusRow.java
src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNameEditorPresenter.java

index 3589b6c1eb910b25693b776a337bfea25391fa81..31e0e0655bcd7ddeffa7fe767d8ec809efef2762 100644 (file)
@@ -27,27 +27,25 @@ public class NomenclaturalStatusDTO implements Serializable {
 
     private Integer id = 0;
 
-    NomenclaturalStatusType type;
+    private NomenclaturalStatusType type;
 
-    Reference citation;
+    private String ruleConsidered;
 
-    NomenclaturalCodeEdition codeEdition;
+    private NomenclaturalCodeEdition codeEdition;
 
-    String citationMicroReference;
+    private Reference citation;
 
-    String ruleConsidered;
+    private String citationMicroReference;
 
     public static NomenclaturalStatusDTO from(NomenclaturalStatus nomStatus) {
         return new NomenclaturalStatusDTO(nomStatus.getId(), nomStatus.getType(), nomStatus.getCitation(),
                 nomStatus.getCitationMicroReference(), nomStatus.getRuleConsidered(), nomStatus.getCodeEdition());
-
     }
 
     public static NomenclaturalStatusDTO newInstance() {
         return new NomenclaturalStatusDTO();
     }
 
-
     /**
      * Update an existing or create a new {@link NomenclaturalStatus} for this
      * DTO.
@@ -75,7 +73,6 @@ public class NomenclaturalStatusDTO implements Serializable {
         }
         nomStatus.setCodeEdition(codeEdition);
         return nomStatus;
-
     }
 
     public NomenclaturalStatusDTO(Integer id, NomenclaturalStatusType type, Reference citation,
@@ -88,9 +85,6 @@ public class NomenclaturalStatusDTO implements Serializable {
         this.codeEdition = codeEdition;
     }
 
-    /**
-     *
-     */
     public NomenclaturalStatusDTO() {
         // TODO Auto-generated constructor stub
     }
index 1e0e7125ff5f6f9722ee559e4860bccee0bfc9cc..5532c8610c63c20749005757d4dc9a2e9d244d84 100644 (file)
@@ -39,7 +39,7 @@ public class NomenclaturalStatusRow extends CollectionRowItemCollection implemen
      * The fieldname must match the properties of the SpecimenTypeDesignationDTO
      */
     NativeSelect type = new NativeSelect();
-    ToOneRelatedEntityCombobox<Reference> citation = new ToOneRelatedEntityCombobox<Reference>(null, Reference.class);
+    ToOneRelatedEntityCombobox<Reference> citation = new ToOneRelatedEntityCombobox<>(null, Reference.class);
     TextField citationMicroReference = new TextFieldNFix();
     TextField ruleConsidered = new TextFieldNFix();
     NativeSelect codeEdition = new NativeSelect();
@@ -79,9 +79,6 @@ public class NomenclaturalStatusRow extends CollectionRowItemCollection implemen
         return visibleFields;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void updateRowItemsEnablement() {
         // nothing to do
index 9cd269ab9f120413dbae4e3115e6a90892d7e03b..79407cd7e9d99fa437843a34fcc568980b4cb1da 100644 (file)
@@ -19,8 +19,6 @@ import java.util.Set;
 import java.util.UUID;
 
 import org.apache.commons.lang3.StringUtils;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
 import org.hibernate.criterion.Restrictions;
 import org.springframework.context.annotation.Scope;
 import org.vaadin.spring.events.annotation.EventBusListenerMethod;
@@ -101,8 +99,6 @@ public class TaxonNameEditorPresenter
 
     private static final long serialVersionUID = -3538980627079389221L;
 
-    private static final Logger logger = LogManager.getLogger();
-
     private static final EnumSet<CRUD> SUB_EDITOR_CRUD = EnumSet.of(CRUD.UPDATE, CRUD.DELETE);
 
     private static final List<String> RELATED_NAME_INIT_STRATEGY = Arrays.asList("$", "nomenclaturalSource.annotations",
@@ -227,12 +223,13 @@ public class TaxonNameEditorPresenter
                     public NomenclaturalStatusRow create() {
                         NomenclaturalStatusRow row = new NomenclaturalStatusRow();
 
+                        //type
                         BeanItemContainer<DefinedTermBase> statusTypeItemContainer = cdmBeanItemContainerFactory.buildTermItemContainer(
                                 RegistrationTermLists.NOMENCLATURAL_STATUS_TYPE_UUIDS()
                                 );
                         row.type.setContainerDataSource(statusTypeItemContainer);
                         row.type.setItemCaptionMode(ItemCaptionMode.EXPLICIT);
-                        for (DefinedTermBase term : statusTypeItemContainer.getItemIds()) {
+                        for (DefinedTermBase<?> term : statusTypeItemContainer.getItemIds()) {
                             row.type.setItemCaption(term,
                                     term.getPreferredRepresentation(Language.DEFAULT()).getAbbreviatedLabel());
                         }