Project

General

Profile

« Previous | Next » 

Revision ba884d9e

Added by Andreas Müller over 3 years ago

cleanup

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNamePopupEditor.java
74 74
/**
75 75
 * @author a.kohlbecker
76 76
 * @since May 22, 2017
77
 *
78 77
 */
79 78
@SpringComponent
80 79
@Scope("prototype")
......
170 169
    /**
171 170
     * By default  AnnotationType.EDITORIAL() is enabled.
172 171
     *
173
     *
174 172
     * @param editableAnotationTypes the editableAnotationTypes to set
175 173
     */
176 174
    @Override
......
178 176
        this.editableAnotationTypes = editableAnotationTypes;
179 177
    }
180 178

  
181
    /**
182
     * @param layout
183
     * @param dtoType
184
     */
185 179
    public TaxonNamePopupEditor() {
186 180
        super(new GridLayout(GRID_COLS, GRID_ROWS), TaxonNameDTO.class);
187 181
    }
188 182

  
189
    /**
190
     * {@inheritDoc}
191
     */
192 183
    @Override
193 184
    public String getWindowCaption() {
194 185
        return "Name editor";
195 186
    }
196 187

  
197

  
198
    /**
199
     * {@inheritDoc}
200
     */
201 188
    @Override
202 189
    public int getWindowWidth() {
203 190
        return 800;
204 191
    }
205 192

  
206
    /**
207
     * {@inheritDoc}
208
     */
209 193
    @Override
210 194
    public void focusFirst() {
211 195
        // none
......
218 202
        }
219 203
    }
220 204

  
221
    /**
222
     * {@inheritDoc}
223
     */
224 205
    @Override
225 206
    protected String getDefaultComponentStyles() {
226 207
        return "tiny";
227 208
    }
228 209

  
229
    /**
230
     * {@inheritDoc}
231
     */
232 210
    @Override
233 211
    protected void initContent() {
234 212

  
......
378 356
        nomStatusCollectionField = new ElementCollectionField<NomenclaturalStatus>(
379 357
                NomenclaturalStatus.class,
380 358
                new Instantiator<NomenclaturalStatus>() {
359
                    private static final long serialVersionUID = -2427045940046513092L;
381 360

  
382 361
                    @Override
383 362
                    public NomenclaturalStatus create() {
......
386 365
                },
387 366
                NomenclaturalStatusRow.class
388 367
                ){
368
                    private static final long serialVersionUID = -3130918034491809593L;
389 369

  
390 370
                    @Override
391 371
                    public void commit() throws SourceException, InvalidValueException {
......
395 375

  
396 376
                    @Override
397 377
                    public boolean isEmpty() {
398
                        Collection value = getValue();
378
                        Collection<?> value = getValue();
399 379
                        return value == null || value.isEmpty() ;
400 380
                    }
401 381

  
......
950 930
        super.cancel();
951 931
    }
952 932

  
953

  
954
    /**
955
     * {@inheritDoc}
956
     */
957 933
    @Override
958 934
    public ToOneRelatedEntityCombobox<Reference> getNomReferenceCombobox() {
959 935
        return nomReferenceCombobox;
960 936
    }
961 937

  
962

  
963
    /**
964
     * {@inheritDoc}
965
     */
966 938
    @Override
967 939
    public TextField getNomenclaturalReferenceDetail() {
968 940
        return nomenclaturalReferenceDetail;
969 941
    }
970 942

  
971
    /**
972
     * {@inheritDoc}
973
     */
974 943
    @Override
975 944
    public ToManyRelatedEntitiesComboboxSelect<TaxonName> getBasionymComboboxSelect() {
976 945
        return basionymsComboboxSelect;
977 946
    }
978 947

  
979
    /**
980
     * {@inheritDoc}
981
     */
982 948
    @Override
983 949
    public ToManyRelatedEntitiesComboboxSelect<TaxonName> getReplacedSynonymsComboboxSelect() {
984 950
        return replacedSynonymsComboboxSelect;
985 951
    }
986 952

  
987
    /**
988
     * {@inheritDoc}
989
     */
990 953
    @Override
991 954
    public NativeSelect getRankSelect() {
992 955
        return rankSelect;
993 956
    }
994 957

  
995
    /**
996
     * {@inheritDoc}
997
     */
998 958
    @Override
999 959
    public AbstractField<String> getGenusOrUninomialField(){
1000 960
        return genusOrUninomialField;
1001 961
    }
1002 962

  
1003
    /**
1004
     * @return the exBasionymAuthorshipField
1005
     */
1006 963
    @Override
1007 964
    public TeamOrPersonField getExBasionymAuthorshipField() {
1008 965
        return exBasionymAuthorshipField;
1009 966
    }
1010 967

  
1011
    /**
1012
     * @return the basionymAuthorshipField
1013
     */
1014 968
    @Override
1015 969
    public TeamOrPersonField getBasionymAuthorshipField() {
1016 970
        return basionymAuthorshipField;
1017 971
    }
1018 972

  
1019
    /**
1020
     * @return the combinationAuthorshipField
1021
     */
1022 973
    @Override
1023 974
    public TeamOrPersonField getCombinationAuthorshipField() {
1024 975
        return combinationAuthorshipField;
1025 976
    }
1026 977

  
1027
    /**
1028
     * @return the exCombinationAuthorshipField
1029
     */
1030 978
    @Override
1031 979
    public TeamOrPersonField getExCombinationAuthorshipField() {
1032 980
        return exCombinationAuthorshipField;
......
1088 1036
        return annotationsListField;
1089 1037
    }
1090 1038

  
1091
    /**
1092
     * {@inheritDoc}
1093
     */
1094 1039
    @Override
1095 1040
    public void setReadOnly(boolean readOnly) {
1096 1041
        super.setReadOnly(readOnly);
......
1128 1073
        nomStatusCollectionField.getLayout().iterator().forEachRemaining(c -> c.setReadOnly(readOnly));
1129 1074
    }
1130 1075

  
1131

  
1132
    /**
1133
     * @return the infraGenericEpithetField
1134
     */
1135 1076
    @Override
1136 1077
    public AbstractField<String> getInfraGenericEpithetField() {
1137 1078
        return infraGenericEpithetField;
1138 1079
    }
1139 1080

  
1140
    /**
1141
     * @return the specificEpithetField
1142
     */
1143 1081
    @Override
1144 1082
    public AbstractField<String> getSpecificEpithetField() {
1145 1083
        return specificEpithetField;
1146 1084
    }
1147 1085

  
1148
    /**
1149
     * @return the infraSpecificEpithetField
1150
     */
1151 1086
    @Override
1152 1087
    public AbstractField<String> getInfraSpecificEpithetField() {
1153 1088
        return infraSpecificEpithetField;
......
1162 1097
    public ElementCollectionField<NomenclaturalStatus> getNomStatusCollectionField(){
1163 1098
        return nomStatusCollectionField;
1164 1099
    }
1165

  
1166 1100
}
src/test/java/eu/etaxonomy/cdm/vaadin/util/CdmSpringContextHelperTest.java
1
/**
2
* Copyright (C) 2019 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
1 9
package eu.etaxonomy.cdm.vaadin.util;
2 10

  
3 11
import java.util.UUID;
......
11 19
import eu.etaxonomy.cdm.model.taxon.Taxon;
12 20
import eu.etaxonomy.cdm.vaadin.CdmVaadinBaseTest;
13 21

  
14

  
15 22
@DataSet
16 23
public class CdmSpringContextHelperTest extends CdmVaadinBaseTest {
17 24

  
18

  
19

  
20 25
	@Test
21 26
	public void testTaxonService() {
22 27

  
......
26 31

  
27 32
		Taxon taxon2 = CdmBase.deproxy(taxonService.find(UUID.fromString("b989a278-c414-49f7-9a10-7d784700e4c4")),Taxon.class);
28 33
		Assert.assertEquals(taxon2.getTitleCache(), "Manduca Hubner, 1807 sec. cate-sphingidae.org");
29

  
30 34
	}
31 35
}
src/test/resources/eu/etaxonomy/cdm/vaadin/util/CdmSpringContextHelperTest.xml
1 1
<?xml version='1.0' encoding='UTF-8'?>
2
<dataset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../dataset.xsd">
2
<dataset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../database/schema/dataset.xsd">
3 3

  
4 4
  <REFERENCE ID="2" CREATED="2008-12-10 09:56:07.0" UUID="ad4322b7-4b05-48af-be70-f113e46c545e" UPDATED="2008-12-10 09:56:07.253" TITLECACHE="cate-sphingidae.org" PROTECTEDTITLECACHE="true" PROTECTEDABBREVTITLECACHE="false" ABBREVTITLECACHE="Sp. Pl." ABBREVTITLE="Sp. Pl." NOMENCLATURALLYRELEVANT="false" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PARSINGPROBLEM="0"/>
5 5
  
6
  
7 6
  <TAXONBASE DTYPE="Taxon" ID="3" SEC_ID="2" CREATED="2008-12-10 09:56:07.0" UUID="54e767ee-894e-4540-a758-f906ecb4e2d9" UPDATED="2008-12-10 09:56:07.253" TITLECACHE="Sphingidae Linnaeus, 1758 sec. cate-sphingidae.org" PROTECTEDTITLECACHE="true" PUBLISH="true" DOUBTFUL="false" USENAMECACHE="false" TAXONSTATUSUNKNOWN="false" NAME_ID="3"/>
8
  
9 7
  <TAXONBASE DTYPE="Taxon" ID="6" SEC_ID="2" CREATED="2008-12-10 09:56:07.0" UUID="b989a278-c414-49f7-9a10-7d784700e4c4" UPDATED="2008-12-10 09:56:07.253" TITLECACHE="Manduca Hubner, 1807 sec. cate-sphingidae.org" PROTECTEDTITLECACHE="true" PUBLISH="true" DOUBTFUL="false" USENAMECACHE="false" TAXONSTATUSUNKNOWN="false" NAME_ID="6"/>
10 8
  
11 9
  <TAXONNAME NAMETYPE="ICZN" ID="3" CREATED="2008-12-10 09:56:07.0" UUID="9640a158-2bdb-4cbc-bff6-8f77e781f86b" UPDATED="2008-12-10 09:56:07.238" TITLECACHE="Sphingidae Linnaeus, 1758" PROTECTEDTITLECACHE="true" FULLTITLECACHE="" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PARSINGPROBLEM="0" PROTECTEDFULLTITLECACHE="true" AUTHORSHIPCACHE="Linnaeus, 1758" NAMECACHE="Sphingidae" PROTECTEDAUTHORSHIPCACHE="true" PROTECTEDNAMECACHE="true" ANAMORPHIC="false" BINOMHYBRID="[null]" HYBRIDFORMULA="[null]" MONOMHYBRID="[null]" TRINOMHYBRID="[null]" HOMOTYPICALGROUP_ID="3" RANK_ID="782" GENUSORUNINOMIAL="Sphingidae" NOMENCLATURALREFERENCE_ID="1"/>

Also available in: Unified diff