Project

General

Profile

« Previous | Next » 

Revision b1b16714

Added by Andreas Kohlbecker over 4 years ago

renaming SpecimenTypeDesignationWorkingsetEditorPresenterTest to SpecimenTypeDesignationWorkingSetServiceImplTest and fixing test data

View differences:

src/main/java/eu/etaxonomy/cdm/service/SpecimenTypeDesignationWorkingSetServiceImpl.java
60 60
        specimenDeleteConfigurer.setDeleteFromIndividualsAssociation(true);
61 61
        specimenDeleteConfigurer.setDeleteFromTypeDesignation(true);
62 62
        specimenDeleteConfigurer.setDeleteMolecularData(true);
63
        specimenDeleteConfigurer.setDeleteFromTypeDesignation(true);
64 63
    }
65 64

  
66 65
    public static final List<String> TAXON_NAME_INIT_STRATEGY = Arrays.asList(new String []{
......
194 193
     */
195 194
    protected void deleteSpecimenTypeDesignation(SpecimenTypeDesignationWorkingSetDTO<? extends VersionableEntity> dto, SpecimenTypeDesignation std) {
196 195

  
196
        if(dto.getOwner() instanceof Registration){
197
            Registration registration = (Registration) dto.getOwner();
198
            registration.getTypeDesignations().clear();
199
            repo.getRegistrationService().save(registration);
200
        } else {
201
            throw new RuntimeException("Unimplemented owner type");
202
        }
197 203
        DerivedUnit du = std.getTypeSpecimen();
198
        du.removeSpecimenTypeDesignation(std);
199 204
        DerivationEvent derivationEvent = du.getDerivedFrom();
205

  
206
        du.removeSpecimenTypeDesignation(std);
200 207
        derivationEvent.removeDerivative(du);
201 208
        std.setTypeSpecimen(null);
202
        repo.getNameService().deleteTypeDesignation(dto.getTypifiedName(), std);
203 209
        repo.getOccurrenceService().delete(du, specimenDeleteConfigurer);
210
        repo.getNameService().deleteTypeDesignation(dto.getTypifiedName(), std);
204 211
//        if(derivationEvent.getDerivatives().size() == 0){
205 212
//          getRepo().getEventBaseService().delete(derivationEvent);
206 213
//      }
src/test/java/eu/etaxonomy/cdm/service/SpecimenTypeDesignationWorkingSetServiceImplTest.java
1
/**
2
* Copyright (C) 2017 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
*/
9
package eu.etaxonomy.cdm.service;
10

  
11
import java.io.FileNotFoundException;
12
import java.net.URI;
13
import java.net.URISyntaxException;
14

  
15
import org.junit.Assert;
16
import org.junit.Ignore;
17
import org.junit.Test;
18
import org.unitils.dbunit.annotation.DataSet;
19
import org.unitils.spring.annotation.SpringBeanByName;
20
import org.unitils.spring.annotation.SpringBeanByType;
21

  
22
import eu.etaxonomy.cdm.CdmVaadinIntegrationTest;
23
import eu.etaxonomy.cdm.api.application.CdmRepository;
24
import eu.etaxonomy.cdm.api.utility.DerivedUnitConversionException;
25
import eu.etaxonomy.cdm.model.agent.Team;
26
import eu.etaxonomy.cdm.model.common.DefinedTerm;
27
import eu.etaxonomy.cdm.model.common.Language;
28
import eu.etaxonomy.cdm.model.common.LanguageString;
29
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
30
import eu.etaxonomy.cdm.model.name.Rank;
31
import eu.etaxonomy.cdm.model.name.Registration;
32
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
33
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
34
import eu.etaxonomy.cdm.model.name.TaxonName;
35
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
36
import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
37
import eu.etaxonomy.cdm.model.occurrence.MediaSpecimen;
38
import eu.etaxonomy.cdm.model.reference.Reference;
39
import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
40
import eu.etaxonomy.cdm.vaadin.model.registration.KindOfUnitTerms;
41
import eu.etaxonomy.cdm.vaadin.model.registration.SpecimenTypeDesignationDTO;
42
import eu.etaxonomy.cdm.vaadin.model.registration.SpecimenTypeDesignationWorkingSetDTO;
43

  
44
/**
45
 * @author a.kohlbecker
46
 * @since Nov 17, 2017
47
 *
48
 */
49
public class SpecimenTypeDesignationWorkingSetServiceImplTest extends CdmVaadinIntegrationTest{
50

  
51
    @SpringBeanByName
52
    private CdmRepository cdmRepository;
53

  
54
    @SpringBeanByType
55
    private ISpecimenTypeDesignationWorkingSetService service;
56

  
57
    int registrationId = 5000;
58

  
59
    private Integer publicationId = 5000;
60

  
61
    private Integer typifiedNameId = 5000;
62

  
63
    String[] includeTableNames_create = new String[]{"TAXONNAME", "REFERENCE", "AGENTBASE", "HOMOTYPICALGROUP", "REGISTRATION",
64
            "HIBERNATE_SEQUENCES"};
65

  
66
    String[] includeTableNames_delete = new String[]{"TAXONNAME", "REFERENCE", "AGENTBASE", "HOMOTYPICALGROUP", "REGISTRATION",
67
            "DERIVATIONEVENT", "GATHERINGEVENT", "LANGUAGESTRING", "SPECIMENOROBSERVATIONBASE", "TYPEDESIGNATIONBASE",
68
            "REGISTRATION_TYPEDESIGNATIONBASE", "TAXONNAME_TYPEDESIGNATIONBASE", "SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT",
69
            "MEDIA", "MEDIA_REPRESENTATION", "MEDIAREPRESENTATION", "MEDIAREPRESENTATIONPART",
70
            "AUDITEVENT",
71
            "HIBERNATE_SEQUENCES"
72
            };
73

  
74

  
75
    @Test
76
    @DataSet("SpecimenTypeDesignationWorkingSetServiceImplTest.xml")
77
    public void createAndEditTest() throws DerivedUnitConversionException, URISyntaxException, FileNotFoundException {
78

  
79
//        printDataSetWithNull(System.err, new String[]{"USERACCOUNT", "GROUPS", "USERACCOUNT_GRANTEDAUTHORITYIMPL", "USERACCOUNT_PERMISSIONGROUP"
80
//                , "PERMISSIONGROUP", "PERMISSIONGROUP_GRANTEDAUTHORITYIMPL", "GRANTEDAUTHORITYIMPL"});
81

  
82
       //printDataSetWithNull(System.err, debugTables);
83
//        writeDbUnitDataSetFile(new String[]{"AUDITEVENT", "DEFINEDTERMBASE", "DEFINEDTERMBASE_AUD", "DEFINEDTERMBASE_REPRESENTATION", "DEFINEDTERMBASE_REPRESENTATION_AUD",
84
//                "REPRESENTATION", "REPRESENTATION_AUD", "HIBERNATE_SEQUENCES"},
85
//                "RegistrationTerms");
86

  
87
       SpecimenTypeDesignationWorkingSetDTO<Registration> workingset = service.create(registrationId, publicationId, typifiedNameId);
88

  
89
       Assert.assertNotNull(workingset.getOwner());
90
       Assert.assertEquals(Registration.class, workingset.getOwner().getClass());
91

  
92
       workingset.getFieldUnit().setFieldNotes("FieldNotes");
93
       workingset.getFieldUnit().setFieldNumber("FieldNumber");
94
       workingset.getFieldUnit().getGatheringEvent().setLocality(LanguageString.NewInstance("Somewhere", Language.ENGLISH()));
95

  
96
       SpecimenTypeDesignationDTO specimenTypeDesignationDTO = new SpecimenTypeDesignationDTO();
97
       specimenTypeDesignationDTO.setKindOfUnit((DefinedTerm)cdmRepository.getTermService().load(KindOfUnitTerms.PUBLISHED_IMAGE().getUuid()));
98
       specimenTypeDesignationDTO.setMediaUri(new URI("http://foo.bar.com/image1"));
99
       specimenTypeDesignationDTO.setTypeStatus(SpecimenTypeDesignationStatus.HOLOTYPE());
100
       specimenTypeDesignationDTO.setAccessionNumber("TEST_1");
101

  
102
       workingset.getSpecimenTypeDesignationDTOs().add(specimenTypeDesignationDTO);
103

  
104
       service.save(workingset);
105

  
106
       //printDataSetWithNull(System.err, new String[]{"TYPEDESIGNATIONBASE", "SPECIMENOROBSERVATIONBASE"});
107

  
108
       workingset = service.loadDtoByIds(registrationId, 0);
109

  
110
       Assert.assertNotNull(specimenTypeDesignationDTO.asSpecimenTypeDesignation().getTypeSpecimen());
111
       Assert.assertEquals(MediaSpecimen.class, specimenTypeDesignationDTO.asSpecimenTypeDesignation().getTypeSpecimen().getClass());
112
       Assert.assertNotNull(specimenTypeDesignationDTO.asSpecimenTypeDesignation().getTypeSpecimen().getOriginals().iterator().next());
113
       Assert.assertEquals(FieldUnit.class, specimenTypeDesignationDTO.asSpecimenTypeDesignation().getTypeSpecimen().getOriginals().iterator().next().getClass());
114
       Assert.assertEquals("FieldNumber", ((FieldUnit)specimenTypeDesignationDTO.asSpecimenTypeDesignation().getTypeSpecimen().getOriginals().iterator().next()).getFieldNumber());
115

  
116
       SpecimenTypeDesignationDTO specimenTypeDesignationDTO2 = new SpecimenTypeDesignationDTO();
117
       specimenTypeDesignationDTO2.setKindOfUnit((DefinedTerm)cdmRepository.getTermService().load(KindOfUnitTerms.SPECIMEN().getUuid()));
118
       specimenTypeDesignationDTO2.setTypeStatus(SpecimenTypeDesignationStatus.HOLOTYPE());
119
       specimenTypeDesignationDTO2.setAccessionNumber("TEST_2");
120

  
121
       workingset.getSpecimenTypeDesignationDTOs().add(specimenTypeDesignationDTO2);
122

  
123
       service.save(workingset);
124

  
125
       workingset = service.loadDtoByIds(registrationId, 0);
126
       Assert.assertTrue(workingset.getSpecimenTypeDesignationDTOs().size() == 2);
127

  
128

  
129
       //FIXME this fails: Assert.assertEquals("There must only be one FieldUnit and one MediaSpecimen", 2, cdmRepository.getOccurrenceService().count(DerivedUnit.class));
130

  
131
       // write test data for delete test
132
       /*
133
       // printDataSetWithNull(System.err, includeTableNames_delete);
134
        writeDbUnitDataSetFile(includeTableNames_delete, "deleteTest");
135
        */
136

  
137
    }
138

  
139
    @Test
140
    @DataSet("SpecimenTypeDesignationWorkingSetServiceImplTest-deleteTest.xml")
141
    @Ignore
142
    public void deleteTypeDesignationTest() {
143

  
144
        // printDataSetWithNull(System.err, includeTableNames_delete);
145

  
146
        SpecimenTypeDesignationWorkingSetDTO<Registration> workingset = service.loadDtoByIds(registrationId, 0);
147
        Assert.assertTrue(workingset.getSpecimenTypeDesignationDTOs().size() == 2);
148

  
149
        SpecimenTypeDesignationDTO deleteDTO = null;
150
        for(SpecimenTypeDesignationDTO stdDTO : workingset.getSpecimenTypeDesignationDTOs()){
151
            if(stdDTO.getAccessionNumber().equals("TEST_1")){
152
                deleteDTO = stdDTO;
153
                break;
154
            }
155
        }
156
        workingset.getSpecimenTypeDesignationDTOs().remove(deleteDTO);
157

  
158
        // TODO once https://dev.e-taxonomy.eu/redmine/issues/7077 is fixed dissociating from the Registration could be removed here
159
        Registration reg = workingset.getOwner();
160
        SpecimenTypeDesignation std = deleteDTO.asSpecimenTypeDesignation();
161
        reg.getTypeDesignations().remove(std);
162

  
163
        service.save(workingset);
164

  
165
        //printDataSetWithNull(System.err, new String[]{"TYPEDESIGNATIONBASE", "SPECIMENOROBSERVATIONBASE"});
166

  
167
        workingset = service.loadDtoByIds(registrationId, 0);
168
        Assert.assertEquals(1, workingset.getSpecimenTypeDesignationDTOs().size());
169

  
170
    }
171

  
172
    @Test
173
    @DataSet("SpecimenTypeDesignationWorkingSetServiceImplTest-deleteTest.xml")
174
    public void deleteWorkingsetTest() {
175

  
176
        printDataSetWithNull(System.err, includeTableNames_delete);
177

  
178
        SpecimenTypeDesignationWorkingSetDTO<Registration> workingset = service.loadDtoByIds(registrationId, 0);
179
        service.delete(workingset, true);
180

  
181
//        UUID gatheringEventUUID = UUID.fromString("23d40440-38bb-46c1-af11-6e25dcfa0145");
182
//        UUID fieldUnitUUID = UUID.fromString("22be718a-6f21-4b74-aae3-bb7d7d659e1c");
183
//        UUID mediaSpecimenUUID = UUID.fromString("10eceb2c-9b51-458e-8dcd-2cb92cc558a9");
184
//        UUID specimenUUID = UUID.fromString("2e384f8e-fbb0-44eb-9d5f-1b7235493932");
185
//        UUID typeDesignation1UUID = UUID.fromString("a1896ae2-4396-4243-988e-3d74058b44ab");
186
//        UUID typeDesignation2UUID = UUID.fromString("a1896ae2-4396-4243-988e-3d74058b44ab");
187

  
188

  
189
        Assert.assertEquals("All TypeDesignations should have been deleted", 0, cdmRepository.getNameService().getAllTypeDesignations(10, 0).size());
190
        Assert.assertEquals("All derived units should have been deleted", 0, cdmRepository.getOccurrenceService().count(DerivedUnit.class));
191
        Assert.assertEquals("FieldUnit should have been deleted", 0, cdmRepository.getOccurrenceService().count(FieldUnit.class));
192
        // FIXME Assert.assertEquals("Gathering event should have been deleted by orphan remove", 0, cdmRepository.getEventBaseService().count(GatheringEvent.class));
193
        // FIXME Assert.assertEquals("Media should have been deleted ", 0, cdmRepository.getMediaService().count(null));
194

  
195
        printDataSetWithNull(System.err, includeTableNames_delete);
196
    }
197

  
198
    // ---------------------- TestData -------------------------------------------
199

  
200

  
201
    @Override
202
    // @Test
203
    public void createTestDataSet() throws FileNotFoundException {
204
        createRegistration();
205
    }
206

  
207
    private void createRegistration() throws FileNotFoundException {
208

  
209
        Team team = Team.NewTitledInstance("Novis, Braidwood & Kilroy", "Novis, Braidwood & Kilroy");
210
        Reference nomRef = ReferenceFactory.newArticle();
211
        nomRef = cdmRepository.getReferenceService().save(nomRef);
212
        publicationId = nomRef.getId();
213

  
214
        nomRef.setAuthorship(team);
215
        nomRef.setTitle("P.M. Novis, J. Braidwood & C. Kilroy, Small diatoms (Bacillariophyta) in cultures from the Styx River, New Zealand, including descriptions of three new species in Phytotaxa 64");
216
        TaxonName name = TaxonName.NewInstance(NomenclaturalCode.ICNAFP, Rank.SPECIES(), "Planothidium", null,  "victori", null, null, nomRef, "11-45", null);
217
        name = cdmRepository.getNameService().save(name);
218
        typifiedNameId = name.getId();
219

  
220
        Registration reg = Registration.NewInstance();
221
        reg.setName(name);
222
        reg = cdmRepository.getRegistrationService().save(reg);
223
        registrationId = reg.getId();
224

  
225

  
226
        printDataSetWithNull(System.err, includeTableNames_create);
227

  
228
        writeDbUnitDataSetFile(includeTableNames_create);
229
    }
230

  
231

  
232

  
233

  
234

  
235

  
236

  
237
}
src/test/java/eu/etaxonomy/cdm/service/SpecimenTypeDesignationWorkingsetEditorPresenterTest.java
1
/**
2
* Copyright (C) 2017 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
*/
9
package eu.etaxonomy.cdm.service;
10

  
11
import java.io.FileNotFoundException;
12
import java.net.URI;
13
import java.net.URISyntaxException;
14

  
15
import org.junit.Assert;
16
import org.junit.Ignore;
17
import org.junit.Test;
18
import org.unitils.dbunit.annotation.DataSet;
19
import org.unitils.spring.annotation.SpringBeanByName;
20
import org.unitils.spring.annotation.SpringBeanByType;
21

  
22
import eu.etaxonomy.cdm.CdmVaadinIntegrationTest;
23
import eu.etaxonomy.cdm.api.application.CdmRepository;
24
import eu.etaxonomy.cdm.api.utility.DerivedUnitConversionException;
25
import eu.etaxonomy.cdm.model.agent.Team;
26
import eu.etaxonomy.cdm.model.common.DefinedTerm;
27
import eu.etaxonomy.cdm.model.common.Language;
28
import eu.etaxonomy.cdm.model.common.LanguageString;
29
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
30
import eu.etaxonomy.cdm.model.name.Rank;
31
import eu.etaxonomy.cdm.model.name.Registration;
32
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
33
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
34
import eu.etaxonomy.cdm.model.name.TaxonName;
35
import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
36
import eu.etaxonomy.cdm.model.occurrence.MediaSpecimen;
37
import eu.etaxonomy.cdm.model.reference.Reference;
38
import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
39
import eu.etaxonomy.cdm.vaadin.model.registration.KindOfUnitTerms;
40
import eu.etaxonomy.cdm.vaadin.model.registration.SpecimenTypeDesignationDTO;
41
import eu.etaxonomy.cdm.vaadin.model.registration.SpecimenTypeDesignationWorkingSetDTO;
42

  
43
/**
44
 * @author a.kohlbecker
45
 * @since Nov 17, 2017
46
 *
47
 */
48
public class SpecimenTypeDesignationWorkingsetEditorPresenterTest extends CdmVaadinIntegrationTest{
49

  
50
    @SpringBeanByName
51
    private CdmRepository cdmRepository;
52

  
53
    @SpringBeanByType
54
    private ISpecimenTypeDesignationWorkingSetService service;
55

  
56
    int registrationId = 5000;
57

  
58
    private Integer publicationId = 5000;
59

  
60
    private Integer typifiedNameId = 5000;
61

  
62
    String[] includeTableNames_create = new String[]{"TAXONNAME", "REFERENCE", "AGENTBASE", "HOMOTYPICALGROUP", "REGISTRATION",
63
            "HIBERNATE_SEQUENCES"};
64

  
65
    String[] includeTableNames_delete = new String[]{"TAXONNAME", "REFERENCE", "AGENTBASE", "HOMOTYPICALGROUP", "REGISTRATION",
66
            "DERIVATIONEVENT", "GATHERINGEVENT", "LANGUAGESTRING", "SPECIMENOROBSERVATIONBASE", "TYPEDESIGNATIONBASE",
67
            "REGISTRATION_TYPEDESIGNATIONBASE", "TAXONNAME_TYPEDESIGNATIONBASE", "SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT",
68
            "MEDIA", "MEDIA_REPRESENTATION", "MEDIAREPRESENTATION", "MEDIAREPRESENTATIONPART",
69
            "HIBERNATE_SEQUENCES"
70
            };
71

  
72

  
73
    @Test
74
    @DataSet("SpecimenTypeDesignationWorkingsetEditorPresenterTest.xml")
75
    public void createAndEditTest() throws DerivedUnitConversionException, URISyntaxException, FileNotFoundException {
76

  
77
//        printDataSetWithNull(System.err, new String[]{"USERACCOUNT", "GROUPS", "USERACCOUNT_GRANTEDAUTHORITYIMPL", "USERACCOUNT_PERMISSIONGROUP"
78
//                , "PERMISSIONGROUP", "PERMISSIONGROUP_GRANTEDAUTHORITYIMPL", "GRANTEDAUTHORITYIMPL"});
79

  
80
       //printDataSetWithNull(System.err, debugTables);
81
//        writeDbUnitDataSetFile(new String[]{"AUDITEVENT", "DEFINEDTERMBASE", "DEFINEDTERMBASE_AUD", "DEFINEDTERMBASE_REPRESENTATION", "DEFINEDTERMBASE_REPRESENTATION_AUD",
82
//                "REPRESENTATION", "REPRESENTATION_AUD", "HIBERNATE_SEQUENCES"},
83
//                "RegistrationTerms");
84

  
85
       SpecimenTypeDesignationWorkingSetDTO<Registration> workingset = service.create(registrationId, publicationId, typifiedNameId);
86

  
87
       Assert.assertNotNull(workingset.getOwner());
88
       Assert.assertEquals(Registration.class, workingset.getOwner().getClass());
89

  
90
       workingset.getFieldUnit().setFieldNotes("FieldNotes");
91
       workingset.getFieldUnit().setFieldNumber("FieldNumber");
92
       workingset.getFieldUnit().getGatheringEvent().setLocality(LanguageString.NewInstance("Somewhere", Language.ENGLISH()));
93

  
94
       SpecimenTypeDesignationDTO specimenTypeDesignationDTO = new SpecimenTypeDesignationDTO();
95
       specimenTypeDesignationDTO.setKindOfUnit((DefinedTerm)cdmRepository.getTermService().load(KindOfUnitTerms.PUBLISHED_IMAGE().getUuid()));
96
       specimenTypeDesignationDTO.setMediaUri(new URI("http://foo.bar.com/image1"));
97
       specimenTypeDesignationDTO.setTypeStatus(SpecimenTypeDesignationStatus.HOLOTYPE());
98
       specimenTypeDesignationDTO.setAccessionNumber("TEST_1");
99

  
100
       workingset.getSpecimenTypeDesignationDTOs().add(specimenTypeDesignationDTO);
101

  
102
       service.save(workingset);
103

  
104
       //printDataSetWithNull(System.err, new String[]{"TYPEDESIGNATIONBASE", "SPECIMENOROBSERVATIONBASE"});
105

  
106
       workingset = service.loadDtoByIds(registrationId, 0);
107

  
108
       Assert.assertNotNull(specimenTypeDesignationDTO.asSpecimenTypeDesignation().getTypeSpecimen());
109
       Assert.assertEquals(MediaSpecimen.class, specimenTypeDesignationDTO.asSpecimenTypeDesignation().getTypeSpecimen().getClass());
110
       Assert.assertNotNull(specimenTypeDesignationDTO.asSpecimenTypeDesignation().getTypeSpecimen().getOriginals().iterator().next());
111
       Assert.assertEquals(FieldUnit.class, specimenTypeDesignationDTO.asSpecimenTypeDesignation().getTypeSpecimen().getOriginals().iterator().next().getClass());
112
       Assert.assertEquals("FieldNumber", ((FieldUnit)specimenTypeDesignationDTO.asSpecimenTypeDesignation().getTypeSpecimen().getOriginals().iterator().next()).getFieldNumber());
113

  
114
       SpecimenTypeDesignationDTO specimenTypeDesignationDTO2 = new SpecimenTypeDesignationDTO();
115
       specimenTypeDesignationDTO2.setKindOfUnit((DefinedTerm)cdmRepository.getTermService().load(KindOfUnitTerms.SPECIMEN().getUuid()));
116
       specimenTypeDesignationDTO2.setTypeStatus(SpecimenTypeDesignationStatus.HOLOTYPE());
117
       specimenTypeDesignationDTO2.setAccessionNumber("TEST_2");
118

  
119
       workingset.getSpecimenTypeDesignationDTOs().add(specimenTypeDesignationDTO2);
120

  
121
       service.save(workingset);
122

  
123
       workingset = service.loadDtoByIds(registrationId, 0);
124
       Assert.assertTrue(workingset.getSpecimenTypeDesignationDTOs().size() == 2);
125

  
126

  
127
       //FIXME this fails: Assert.assertEquals("There must only be one FieldUnit and one MediaSpecimen", 2, cdmRepository.getOccurrenceService().count(DerivedUnit.class));
128

  
129
       // write test data for delete test
130
       /*
131
       // printDataSetWithNull(System.err, includeTableNames_delete);
132
        writeDbUnitDataSetFile(includeTableNames_delete, "deleteTest");
133
        */
134

  
135
    }
136

  
137
    @Test
138
    @DataSet("SpecimenTypeDesignationWorkingsetEditorPresenterTest-deleteTest.xml")
139
    @Ignore
140
    public void deleteTypeDesignationTest() {
141

  
142
        // printDataSetWithNull(System.err, includeTableNames_delete);
143

  
144
        SpecimenTypeDesignationWorkingSetDTO<Registration> workingset = service.loadDtoByIds(registrationId, 0);
145
        Assert.assertTrue(workingset.getSpecimenTypeDesignationDTOs().size() == 2);
146

  
147
        SpecimenTypeDesignationDTO deleteDTO = null;
148
        for(SpecimenTypeDesignationDTO stdDTO : workingset.getSpecimenTypeDesignationDTOs()){
149
            if(stdDTO.getAccessionNumber().equals("TEST_1")){
150
                deleteDTO = stdDTO;
151
                break;
152
            }
153
        }
154
        workingset.getSpecimenTypeDesignationDTOs().remove(deleteDTO);
155

  
156
        // TODO once https://dev.e-taxonomy.eu/redmine/issues/7077 is fixed dissociating from the Registration could be removed here
157
        Registration reg = workingset.getOwner();
158
        SpecimenTypeDesignation std = deleteDTO.asSpecimenTypeDesignation();
159
        reg.getTypeDesignations().remove(std);
160

  
161
        service.save(workingset);
162

  
163
        //printDataSetWithNull(System.err, new String[]{"TYPEDESIGNATIONBASE", "SPECIMENOROBSERVATIONBASE"});
164

  
165
        workingset = service.loadDtoByIds(registrationId, 0);
166
        Assert.assertEquals(1, workingset.getSpecimenTypeDesignationDTOs().size());
167

  
168
    }
169

  
170
    @Test
171
    @DataSet("SpecimenTypeDesignationWorkingsetEditorPresenterTest-deleteTest.xml")
172
    @Ignore
173
    public void deleteWorkingsetTest() {
174

  
175
        SpecimenTypeDesignationWorkingSetDTO<Registration> workingset = service.loadDtoByIds(registrationId, 0);
176
        //TODO implement ...
177

  
178

  
179
    }
180

  
181
    // ---------------------- TestData -------------------------------------------
182

  
183

  
184
    @Override
185
    // @Test
186
    public void createTestDataSet() throws FileNotFoundException {
187
        createRegistration();
188
    }
189

  
190
    private void createRegistration() throws FileNotFoundException {
191

  
192
        Team team = Team.NewTitledInstance("Novis, Braidwood & Kilroy", "Novis, Braidwood & Kilroy");
193
        Reference nomRef = ReferenceFactory.newArticle();
194
        nomRef = cdmRepository.getReferenceService().save(nomRef);
195
        publicationId = nomRef.getId();
196

  
197
        nomRef.setAuthorship(team);
198
        nomRef.setTitle("P.M. Novis, J. Braidwood & C. Kilroy, Small diatoms (Bacillariophyta) in cultures from the Styx River, New Zealand, including descriptions of three new species in Phytotaxa 64");
199
        TaxonName name = TaxonName.NewInstance(NomenclaturalCode.ICNAFP, Rank.SPECIES(), "Planothidium", null,  "victori", null, null, nomRef, "11-45", null);
200
        name = cdmRepository.getNameService().save(name);
201
        typifiedNameId = name.getId();
202

  
203
        Registration reg = Registration.NewInstance();
204
        reg.setName(name);
205
        reg = cdmRepository.getRegistrationService().save(reg);
206
        registrationId = reg.getId();
207

  
208

  
209
        printDataSetWithNull(System.err, includeTableNames_create);
210

  
211
        writeDbUnitDataSetFile(includeTableNames_create);
212
    }
213

  
214

  
215

  
216

  
217

  
218

  
219

  
220
}
src/test/resources/eu/etaxonomy/cdm/service/SpecimenTypeDesignationWorkingSetServiceImplTest-deleteTest.xml
1
<?xml version='1.0' encoding='UTF-8'?>
2
<dataset>
3
  <TAXONNAME ID="5000" CREATED="2017-11-23 15:32:58.0" UUID="47d9263e-b32a-42af-98ea-5528f154384f" UPDATED="[null]" NAMETYPE="ICNAFP" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="Planothidium victori" APPENDEDPHRASE="[null]" FULLTITLECACHE="Planothidium victori in - undefined journal -: 11-45" NOMENCLATURALMICROREFERENCE="11-45" PARSINGPROBLEM="0" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PROTECTEDFULLTITLECACHE="false" AUTHORSHIPCACHE="" BINOMHYBRID="false" GENUSORUNINOMIAL="Planothidium" HYBRIDFORMULA="false" INFRAGENERICEPITHET="[null]" INFRASPECIFICEPITHET="[null]" MONOMHYBRID="false" NAMECACHE="Planothidium victori" PROTECTEDAUTHORSHIPCACHE="false" PROTECTEDNAMECACHE="false" SPECIFICEPITHET="victori" TRINOMHYBRID="false" NAMEAPPROBATION="[null]" SUBGENUSAUTHORSHIP="[null]" ANAMORPHIC="false" CULTIVARNAME="[null]" ACRONYM="[null]" BREED="[null]" ORIGINALPUBLICATIONYEAR="[null]" PUBLICATIONYEAR="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" HOMOTYPICALGROUP_ID="5000" NOMENCLATURALREFERENCE_ID="5000" RANK_ID="765" BASIONYMAUTHORSHIP_ID="[null]" COMBINATIONAUTHORSHIP_ID="[null]" EXBASIONYMAUTHORSHIP_ID="[null]" EXCOMBINATIONAUTHORSHIP_ID="[null]"/>
4
  <REFERENCE ID="5000" CREATED="2017-11-23 15:32:58.0" UUID="45804c65-7df9-42fd-b43a-818a8958c264" UPDATED="2017-11-23 15:32:58.33" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="Novis, Braidwood &amp; Kilroy, P.M. Novis, J. Braidwood &amp; C. Kilroy, Small diatoms (Bacillariophyta) in cultures from the Styx River, New Zealand, including descriptions of three new species in Phytotaxa 64 in - undefined journal -" DATEPUBLISHED_END="[null]" DATEPUBLISHED_FREETEXT="[null]" DATEPUBLISHED_START="[null]" EDITION="[null]" EDITOR="[null]" ISBN="[null]" ISSN="[null]" DOI="[null]" NOMENCLATURALLYRELEVANT="false" ORGANIZATION="[null]" PAGES="[null]" PARSINGPROBLEM="0" PLACEPUBLISHED="[null]" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PUBLISHER="[null]" REFERENCEABSTRACT="[null]" SERIESPART="[null]" TITLE="P.M. Novis, J. Braidwood &amp; C. Kilroy, Small diatoms (Bacillariophyta) in cultures from the Styx River, New Zealand, including descriptions of three new species in Phytotaxa 64" ABBREVTITLE="[null]" ABBREVTITLECACHE="Novis, Braidwood &amp; Kilroy, P.M. Novis, J. Braidwood &amp; C. Kilroy, Small diatoms (Bacillariophyta) in cultures from the Styx River, New Zealand, including descriptions of three new species in Phytotaxa 64 in - undefined journal -" PROTECTEDABBREVTITLECACHE="false" REFTYPE="ART" URI="[null]" VOLUME="[null]" ACCESSED="[null]" LASTRETRIEVED="[null]" EXTERNALID="[null]" EXTERNALLINK="[null]" AUTHORITYTYPE="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" AUTHORSHIP_ID="5000" INREFERENCE_ID="[null]" INSTITUTION_ID="[null]" SCHOOL_ID="[null]"/>
5
  <AGENTBASE DTYPE="Team" ID="5000" CREATED="2017-11-23 15:32:58.0" UUID="05555fcb-72bf-49d0-9677-4de87f13e9ed" UPDATED="[null]" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="true" TITLECACHE="Novis, Braidwood &amp; Kilroy" PROTECTEDCOLLECTORTITLECACHE="false" COLLECTORTITLE="[null]" PROTECTEDNOMENCLATURALTITLECACHE="true" NOMENCLATURALTITLE="Novis, Braidwood &amp; Kilroy" CODE="[null]" NAME="[null]" FIRSTNAME="[null]" INITIALS="[null]" LASTNAME="[null]" LIFESPAN_END="[null]" LIFESPAN_FREETEXT="[null]" LIFESPAN_START="[null]" PREFIX="[null]" SUFFIX="[null]" HASMOREMEMBERS="false" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" ISPARTOF_ID="[null]"/>
6
  <HOMOTYPICALGROUP ID="5000" CREATED="2017-11-23 15:32:58.0" UUID="042ac145-cf9f-47c2-b4a1-8a4350e234eb" UPDATED="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]"/>
7
  <REGISTRATION ID="5000" CREATED="2017-11-23 15:32:58.0" UUID="c8bb4e70-ca85-43c3-ae81-c90a2b41a93f" UPDATED="[null]" IDENTIFIER="[null]" REGISTRATIONDATE="[null]" SPECIFICIDENTIFIER="[null]" STATUS="PREP" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" INSTITUTION_ID="[null]" NAME_ID="5000" SUBMITTER_ID="[null]"/>
8
  <DERIVATIONEVENT ID="5000" CREATED="2017-11-24 16:26:03.0" UUID="42610c79-b50f-4d86-94e6-9f775266f6e5" UPDATED="[null]" DESCRIPTION="[null]" TIMEPERIOD_END="[null]" TIMEPERIOD_FREETEXT="[null]" TIMEPERIOD_START="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" ACTOR_ID="[null]" INSTITUTION_ID="[null]" TYPE_ID="1998"/>
9
  <DERIVATIONEVENT ID="5001" CREATED="2017-11-24 16:26:04.0" UUID="50537c4e-e8cf-45e7-9e9d-e73197d17be8" UPDATED="[null]" DESCRIPTION="[null]" TIMEPERIOD_END="[null]" TIMEPERIOD_FREETEXT="[null]" TIMEPERIOD_START="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" ACTOR_ID="[null]" INSTITUTION_ID="[null]" TYPE_ID="1998"/>
10
  <GATHERINGEVENT ID="5000" CREATED="2017-11-24 16:26:03.0" UUID="23d40440-38bb-46c1-af11-6e25dcfa0145" UPDATED="[null]" DESCRIPTION="[null]" TIMEPERIOD_END="[null]" TIMEPERIOD_FREETEXT="[null]" TIMEPERIOD_START="[null]" ABSOLUTEELEVATION="[null]" ABSOLUTEELEVATIONMAX="[null]" ABSOLUTEELEVATIONTEXT="[null]" COLLECTINGMETHOD="[null]" DISTANCETOGROUND="[null]" DISTANCETOGROUNDMAX="[null]" DISTANCETOGROUNDTEXT="[null]" DISTANCETOWATERSURFACE="[null]" DISTANCETOWATERSURFACEMAX="[null]" DISTANCETOWATERSURFACETEXT="[null]" EXACTLOCATION_ERRORRADIUS="[null]" EXACTLOCATION_LATITUDE="[null]" EXACTLOCATION_LONGITUDE="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" ACTOR_ID="[null]" COUNTRY_ID="[null]" EXACTLOCATION_REFERENCESYSTEM_ID="[null]" LOCALITY_ID="5000"/>
11
  <LANGUAGESTRING ID="5000" CREATED="2017-11-24 16:26:03.0" UUID="c63419cd-445c-4086-a03a-c2d200ad6fe5" UPDATED="[null]" TEXT="Somewhere" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" LANGUAGE_ID="406"/>
12
  <SPECIMENOROBSERVATIONBASE DTYPE="FieldUnit" ID="5001" CREATED="2017-11-24 16:26:03.0" UUID="22be718a-6f21-4b74-aae3-bb7d7d659e1c" UPDATED="2017-11-24 16:26:04.307" RECORDBASIS="FU" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="Somewhere, FieldNumber." PROTECTEDIDENTITYCACHE="false" IDENTITYCACHE="[null]" PUBLISH="true" INDIVIDUALCOUNT="[null]" PREFERREDSTABLEURI="[null]" ACCESSIONNUMBER="[null]" BARCODE="[null]" CATALOGNUMBER="[null]" COLLECTORSNUMBER="[null]" EXSICCATUM="[null]" ORIGINALLABELINFO="[null]" FIELDNOTES="FieldNotes" FIELDNUMBER="FieldNumber" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" LIFESTAGE_ID="[null]" SEX_ID="[null]" KINDOFUNIT_ID="[null]" COLLECTION_ID="[null]" DERIVEDFROM_ID="[null]" STOREDUNDER_ID="[null]" PRESERVATION_ID="[null]" GATHERINGEVENT_ID="5000" PRIMARYCOLLECTOR_ID="[null]" MEDIASPECIMEN_ID="[null]" DNAQUALITY_ID="[null]"/>
13
  <SPECIMENOROBSERVATIONBASE DTYPE="MediaSpecimen" ID="5002" CREATED="2017-11-24 16:26:04.0" UUID="10eceb2c-9b51-458e-8dcd-2cb92cc558a9" UPDATED="2017-11-24 16:26:04.308" RECORDBASIS="SI" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="Somewhere, FieldNumber (TEST_1)." PROTECTEDIDENTITYCACHE="false" IDENTITYCACHE="[null]" PUBLISH="true" INDIVIDUALCOUNT="[null]" PREFERREDSTABLEURI="[null]" ACCESSIONNUMBER="TEST_1" BARCODE="[null]" CATALOGNUMBER="[null]" COLLECTORSNUMBER="[null]" EXSICCATUM="[null]" ORIGINALLABELINFO="[null]" FIELDNOTES="[null]" FIELDNUMBER="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" LIFESTAGE_ID="[null]" SEX_ID="[null]" KINDOFUNIT_ID="2065" COLLECTION_ID="[null]" DERIVEDFROM_ID="5000" STOREDUNDER_ID="[null]" PRESERVATION_ID="[null]" GATHERINGEVENT_ID="[null]" PRIMARYCOLLECTOR_ID="[null]" MEDIASPECIMEN_ID="5000" DNAQUALITY_ID="[null]"/>
14
  <SPECIMENOROBSERVATIONBASE DTYPE="DerivedUnit" ID="5003" CREATED="2017-11-24 16:26:04.0" UUID="2e384f8e-fbb0-44eb-9d5f-1b7235493932" UPDATED="2017-11-24 16:26:04.309" RECORDBASIS="PS" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="Somewhere, FieldNumber (TEST_2)." PROTECTEDIDENTITYCACHE="false" IDENTITYCACHE="[null]" PUBLISH="true" INDIVIDUALCOUNT="[null]" PREFERREDSTABLEURI="[null]" ACCESSIONNUMBER="TEST_2" BARCODE="[null]" CATALOGNUMBER="[null]" COLLECTORSNUMBER="[null]" EXSICCATUM="[null]" ORIGINALLABELINFO="[null]" FIELDNOTES="[null]" FIELDNUMBER="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" LIFESTAGE_ID="[null]" SEX_ID="[null]" KINDOFUNIT_ID="2064" COLLECTION_ID="[null]" DERIVEDFROM_ID="5001" STOREDUNDER_ID="[null]" PRESERVATION_ID="[null]" GATHERINGEVENT_ID="[null]" PRIMARYCOLLECTOR_ID="[null]" MEDIASPECIMEN_ID="[null]" DNAQUALITY_ID="[null]"/>
15
  <TYPEDESIGNATIONBASE DTYPE="SpecimenTypeDesignation" ID="5000" CREATED="2017-11-24 16:26:03.0" UUID="a1896ae2-4396-4243-988e-3d74058b44ab" UPDATED="[null]" CITATIONMICROREFERENCE="[null]" ORIGINALNAMESTRING="[null]" NOTDESIGNATED="false" CONSERVEDTYPE="[null]" REJECTEDTYPE="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" CITATION_ID="5000" TYPESTATUS_ID="821" TYPENAME_ID="[null]" TYPESPECIMEN_ID="5002"/>
16
  <TYPEDESIGNATIONBASE DTYPE="SpecimenTypeDesignation" ID="5001" CREATED="2017-11-24 16:26:04.0" UUID="9824e111-1598-4187-ba89-8a27fb5dcaf9" UPDATED="[null]" CITATIONMICROREFERENCE="[null]" ORIGINALNAMESTRING="[null]" NOTDESIGNATED="false" CONSERVEDTYPE="[null]" REJECTEDTYPE="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" CITATION_ID="5000" TYPESTATUS_ID="821" TYPENAME_ID="[null]" TYPESPECIMEN_ID="5003"/>
17
  <REGISTRATION_TYPEDESIGNATIONBASE REGISTRATIONS_ID="5000" TYPEDESIGNATIONS_ID="5000"/>
18
  <REGISTRATION_TYPEDESIGNATIONBASE REGISTRATIONS_ID="5000" TYPEDESIGNATIONS_ID="5001"/>
19
  <TAXONNAME_TYPEDESIGNATIONBASE TAXONNAME_ID="5000" TYPEDESIGNATIONS_ID="5000"/>
20
  <TAXONNAME_TYPEDESIGNATIONBASE TAXONNAME_ID="5000" TYPEDESIGNATIONS_ID="5001"/>
21
  <SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT ORIGINALS_ID="5001" DERIVATIONEVENTS_ID="5000"/>
22
  <SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT ORIGINALS_ID="5001" DERIVATIONEVENTS_ID="5001"/>
23
  <MEDIA DTYPE="Media" ID="5000" CREATED="2017-11-24 16:26:04.0" UUID="10130fe6-a176-4a6b-8606-6546976400d4" UPDATED="2017-11-24 16:26:04.307" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="image1" MEDIACREATED="[null]" CITATIONMICROREFERENCE="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" ARTIST_ID="[null]" CITATION_ID="[null]"/>
24
  <MEDIAREPRESENTATION ID="5000" CREATED="2017-11-24 16:26:04.0" UUID="7cb1eb82-3792-4206-886a-f9848d18a2c7" UPDATED="[null]" MIMETYPE="[null]" SUFFIX="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" MEDIA_ID="5000"/>
25
  <MEDIAREPRESENTATIONPART DTYPE="MediaRepresentationPart" ID="5000" CREATED="2017-11-24 16:26:04.0" UUID="5b7ba042-7e17-4918-abdd-990ee1f56fc0" UPDATED="[null]" SIZE="[null]" URI="http://foo.bar.com/image1" DURATION="[null]" HEIGHT="[null]" WIDTH="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" REPRESENTATION_ID="5000" SORTINDEX="0"/>
26
  <AUDITEVENT />
27
  <SPECIMENOROBSERVATIONBASE_AUD />
28
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="AgentBase" NEXT_VAL="5001"/>
29
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="AuditEvent" NEXT_VAL="5000"/>
30
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="CdmMetaData" NEXT_VAL="5010"/>
31
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="DefinedTermBase" NEXT_VAL="7193"/>
32
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="DerivationEvent" NEXT_VAL="5002"/>
33
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="GatheringEvent" NEXT_VAL="5001"/>
34
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="GrantedAuthorityImpl" NEXT_VAL="5034"/>
35
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="HomotypicalGroup" NEXT_VAL="5001"/>
36
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="LanguageString" NEXT_VAL="5001"/>
37
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="Media" NEXT_VAL="5001"/>
38
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="MediaRepresentation" NEXT_VAL="5001"/>
39
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="MediaRepresentationPart" NEXT_VAL="5001"/>
40
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="PermissionGroup" NEXT_VAL="5010"/>
41
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="Reference" NEXT_VAL="5001"/>
42
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="Registration" NEXT_VAL="5001"/>
43
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="Representation" NEXT_VAL="7297"/>
44
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="SpecimenOrObservationBase" NEXT_VAL="5004"/>
45
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="TaxonName" NEXT_VAL="5001"/>
46
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="TermVocabulary" NEXT_VAL="5045"/>
47
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="TypeDesignationBase" NEXT_VAL="5002"/>
48
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="UserAccount" NEXT_VAL="5002"/>
49
</dataset>
src/test/resources/eu/etaxonomy/cdm/service/SpecimenTypeDesignationWorkingSetServiceImplTest.xml
1
<?xml version='1.0' encoding='UTF-8'?>
2
<dataset>
3
  <TAXONNAME ID="5000" CREATED="2017-11-24 22:17:26.0" UUID="bd294483-8383-4a5c-bf76-ffa3e104dc9e" UPDATED="2017-11-24 22:17:27.447" NAMETYPE="ICNAFP" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="Planothidium victori" APPENDEDPHRASE="[null]" FULLTITLECACHE="Planothidium victori in - undefined journal -: 11-45" NOMENCLATURALMICROREFERENCE="11-45" PARSINGPROBLEM="0" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PROTECTEDFULLTITLECACHE="false" AUTHORSHIPCACHE="" BINOMHYBRID="false" GENUSORUNINOMIAL="Planothidium" HYBRIDFORMULA="false" INFRAGENERICEPITHET="[null]" INFRASPECIFICEPITHET="[null]" MONOMHYBRID="false" NAMECACHE="Planothidium victori" PROTECTEDAUTHORSHIPCACHE="false" PROTECTEDNAMECACHE="false" SPECIFICEPITHET="victori" TRINOMHYBRID="false" NAMEAPPROBATION="[null]" SUBGENUSAUTHORSHIP="[null]" ANAMORPHIC="false" CULTIVARNAME="[null]" ACRONYM="[null]" BREED="[null]" ORIGINALPUBLICATIONYEAR="[null]" PUBLICATIONYEAR="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" HOMOTYPICALGROUP_ID="5000" NOMENCLATURALREFERENCE_ID="5000" RANK_ID="765" BASIONYMAUTHORSHIP_ID="[null]" COMBINATIONAUTHORSHIP_ID="[null]" EXBASIONYMAUTHORSHIP_ID="[null]" EXCOMBINATIONAUTHORSHIP_ID="[null]"/>
4
  <REFERENCE ID="5000" CREATED="2017-11-24 22:17:26.0" UUID="ed1c8722-015b-4a94-82a6-0b42e03d0e92" UPDATED="2017-11-24 22:17:27.448" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="Novis, Braidwood &amp; Kilroy, P.M. Novis, J. Braidwood &amp; C. Kilroy, Small diatoms (Bacillariophyta) in cultures from the Styx River, New Zealand, including descriptions of three new species in Phytotaxa 64 in - undefined journal -" DATEPUBLISHED_END="[null]" DATEPUBLISHED_FREETEXT="[null]" DATEPUBLISHED_START="[null]" EDITION="[null]" EDITOR="[null]" ISBN="[null]" ISSN="[null]" DOI="[null]" NOMENCLATURALLYRELEVANT="false" ORGANIZATION="[null]" PAGES="[null]" PARSINGPROBLEM="0" PLACEPUBLISHED="[null]" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PUBLISHER="[null]" REFERENCEABSTRACT="[null]" SERIESPART="[null]" TITLE="P.M. Novis, J. Braidwood &amp; C. Kilroy, Small diatoms (Bacillariophyta) in cultures from the Styx River, New Zealand, including descriptions of three new species in Phytotaxa 64" ABBREVTITLE="[null]" ABBREVTITLECACHE="Novis, Braidwood &amp; Kilroy, P.M. Novis, J. Braidwood &amp; C. Kilroy, Small diatoms (Bacillariophyta) in cultures from the Styx River, New Zealand, including descriptions of three new species in Phytotaxa 64 in - undefined journal -" PROTECTEDABBREVTITLECACHE="false" REFTYPE="ART" URI="[null]" VOLUME="[null]" ACCESSED="[null]" LASTRETRIEVED="[null]" EXTERNALID="[null]" EXTERNALLINK="[null]" AUTHORITYTYPE="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" AUTHORSHIP_ID="5000" INREFERENCE_ID="[null]" INSTITUTION_ID="[null]" SCHOOL_ID="[null]"/>
5
  <AGENTBASE DTYPE="Team" ID="5000" CREATED="2017-11-24 22:17:26.0" UUID="5e7b791e-d17f-4378-9a47-923ebebc9b6a" UPDATED="2017-11-24 22:17:27.449" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="true" TITLECACHE="Novis, Braidwood &amp; Kilroy" PROTECTEDCOLLECTORTITLECACHE="false" COLLECTORTITLE="[null]" PROTECTEDNOMENCLATURALTITLECACHE="true" NOMENCLATURALTITLE="Novis, Braidwood &amp; Kilroy" CODE="[null]" NAME="[null]" FIRSTNAME="[null]" INITIALS="[null]" LASTNAME="[null]" LIFESPAN_END="[null]" LIFESPAN_FREETEXT="[null]" LIFESPAN_START="[null]" PREFIX="[null]" SUFFIX="[null]" HASMOREMEMBERS="false" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" ISPARTOF_ID="[null]"/>
6
  <HOMOTYPICALGROUP ID="5000" CREATED="2017-11-24 22:17:26.0" UUID="76cb5ec1-ac61-4c40-a0e2-1bb738f04575" UPDATED="2017-11-24 22:17:27.448" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]"/>
7
  <REGISTRATION ID="5000" CREATED="2017-11-24 22:17:27.0" UUID="247090ee-31b4-4738-970c-69813e785a86" UPDATED="[null]" IDENTIFIER="[null]" REGISTRATIONDATE="[null]" SPECIFICIDENTIFIER="[null]" STATUS="PREP" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" INSTITUTION_ID="[null]" NAME_ID="5000" SUBMITTER_ID="[null]"/>
8
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="AgentBase" NEXT_VAL="5001"/>
9
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="AuditEvent" NEXT_VAL="5005"/>
10
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="CdmMetaData" NEXT_VAL="5005"/>
11
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="GrantedAuthorityImpl" NEXT_VAL="5017"/>
12
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="HomotypicalGroup" NEXT_VAL="5001"/>
13
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="PermissionGroup" NEXT_VAL="5005"/>
14
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="Reference" NEXT_VAL="5001"/>
15
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="Registration" NEXT_VAL="5001"/>
16
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="TaxonName" NEXT_VAL="5001"/>
17
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="UserAccount" NEXT_VAL="5001"/>
18
</dataset>
src/test/resources/eu/etaxonomy/cdm/service/SpecimenTypeDesignationWorkingsetEditorPresenterTest-deleteTest.xml
1
<?xml version='1.0' encoding='UTF-8'?>
2
<dataset>
3
  <TAXONNAME DTYPE="[null]" ID="5000" CREATED="2017-11-23 15:32:58.0" UUID="47d9263e-b32a-42af-98ea-5528f154384f" UPDATED="[null]" NAMETYPE="ICNAFP" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="Planothidium victori" APPENDEDPHRASE="[null]" FULLTITLECACHE="Planothidium victori in - undefined journal -: 11-45" NOMENCLATURALMICROREFERENCE="11-45" PARSINGPROBLEM="0" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PROTECTEDFULLTITLECACHE="false" AUTHORSHIPCACHE="" BINOMHYBRID="false" GENUSORUNINOMIAL="Planothidium" HYBRIDFORMULA="false" INFRAGENERICEPITHET="[null]" INFRASPECIFICEPITHET="[null]" MONOMHYBRID="false" NAMECACHE="Planothidium victori" PROTECTEDAUTHORSHIPCACHE="false" PROTECTEDNAMECACHE="false" SPECIFICEPITHET="victori" TRINOMHYBRID="false" NAMEAPPROBATION="[null]" SUBGENUSAUTHORSHIP="[null]" ANAMORPHIC="false" CULTIVARNAME="[null]" ACRONYM="[null]" BREED="[null]" ORIGINALPUBLICATIONYEAR="[null]" PUBLICATIONYEAR="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" HOMOTYPICALGROUP_ID="5000" NOMENCLATURALREFERENCE_ID="5000" RANK_ID="765" BASIONYMAUTHORSHIP_ID="[null]" COMBINATIONAUTHORSHIP_ID="[null]" EXBASIONYMAUTHORSHIP_ID="[null]" EXCOMBINATIONAUTHORSHIP_ID="[null]"/>
4
  <REFERENCE DTYPE="[null]" ID="5000" CREATED="2017-11-23 15:32:58.0" UUID="45804c65-7df9-42fd-b43a-818a8958c264" UPDATED="2017-11-23 15:32:58.33" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="Novis, Braidwood &amp; Kilroy, P.M. Novis, J. Braidwood &amp; C. Kilroy, Small diatoms (Bacillariophyta) in cultures from the Styx River, New Zealand, including descriptions of three new species in Phytotaxa 64 in - undefined journal -" DATEPUBLISHED_END="[null]" DATEPUBLISHED_FREETEXT="[null]" DATEPUBLISHED_START="[null]" EDITION="[null]" EDITOR="[null]" ISBN="[null]" ISSN="[null]" DOI="[null]" NOMENCLATURALLYRELEVANT="false" ORGANIZATION="[null]" PAGES="[null]" PARSINGPROBLEM="0" PLACEPUBLISHED="[null]" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PUBLISHER="[null]" REFERENCEABSTRACT="[null]" SERIESPART="[null]" TITLE="P.M. Novis, J. Braidwood &amp; C. Kilroy, Small diatoms (Bacillariophyta) in cultures from the Styx River, New Zealand, including descriptions of three new species in Phytotaxa 64" ABBREVTITLE="[null]" ABBREVTITLECACHE="Novis, Braidwood &amp; Kilroy, P.M. Novis, J. Braidwood &amp; C. Kilroy, Small diatoms (Bacillariophyta) in cultures from the Styx River, New Zealand, including descriptions of three new species in Phytotaxa 64 in - undefined journal -" PROTECTEDABBREVTITLECACHE="false" REFTYPE="ART" URI="[null]" VOLUME="[null]" ACCESSED="[null]" LASTRETRIEVED="[null]" EXTERNALID="[null]" EXTERNALLINK="[null]" AUTHORITYTYPE="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" AUTHORSHIP_ID="5000" INREFERENCE_ID="[null]" INSTITUTION_ID="[null]" SCHOOL_ID="[null]"/>
5
  <AGENTBASE DTYPE="Team" ID="5000" CREATED="2017-11-23 15:32:58.0" UUID="05555fcb-72bf-49d0-9677-4de87f13e9ed" UPDATED="[null]" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="true" TITLECACHE="Novis, Braidwood &amp; Kilroy" PROTECTEDCOLLECTORTITLECACHE="false" COLLECTORTITLE="[null]" PROTECTEDNOMENCLATURALTITLECACHE="true" NOMENCLATURALTITLE="Novis, Braidwood &amp; Kilroy" CODE="[null]" NAME="[null]" FIRSTNAME="[null]" INITIALS="[null]" LASTNAME="[null]" LIFESPAN_END="[null]" LIFESPAN_FREETEXT="[null]" LIFESPAN_START="[null]" PREFIX="[null]" SUFFIX="[null]" HASMOREMEMBERS="false" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" ISPARTOF_ID="[null]"/>
6
  <HOMOTYPICALGROUP ID="5000" CREATED="2017-11-23 15:32:58.0" UUID="042ac145-cf9f-47c2-b4a1-8a4350e234eb" UPDATED="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]"/>
7
  <REGISTRATION ID="5000" CREATED="2017-11-23 15:32:58.0" UUID="c8bb4e70-ca85-43c3-ae81-c90a2b41a93f" UPDATED="[null]" IDENTIFIER="[null]" REGISTRATIONDATE="[null]" SPECIFICIDENTIFIER="[null]" STATUS="PREP" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" INSTITUTION_ID="[null]" NAME_ID="5000" SUBMITTER_ID="[null]"/>
8
  <DERIVATIONEVENT ID="5000" CREATED="2017-11-24 16:26:03.0" UUID="42610c79-b50f-4d86-94e6-9f775266f6e5" UPDATED="[null]" DESCRIPTION="[null]" TIMEPERIOD_END="[null]" TIMEPERIOD_FREETEXT="[null]" TIMEPERIOD_START="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" ACTOR_ID="[null]" INSTITUTION_ID="[null]" TYPE_ID="1998"/>
9
  <DERIVATIONEVENT ID="5001" CREATED="2017-11-24 16:26:04.0" UUID="50537c4e-e8cf-45e7-9e9d-e73197d17be8" UPDATED="[null]" DESCRIPTION="[null]" TIMEPERIOD_END="[null]" TIMEPERIOD_FREETEXT="[null]" TIMEPERIOD_START="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" ACTOR_ID="[null]" INSTITUTION_ID="[null]" TYPE_ID="1998"/>
10
  <GATHERINGEVENT ID="5000" CREATED="2017-11-24 16:26:03.0" UUID="23d40440-38bb-46c1-af11-6e25dcfa0145" UPDATED="[null]" DESCRIPTION="[null]" TIMEPERIOD_END="[null]" TIMEPERIOD_FREETEXT="[null]" TIMEPERIOD_START="[null]" ABSOLUTEELEVATION="[null]" ABSOLUTEELEVATIONMAX="[null]" ABSOLUTEELEVATIONTEXT="[null]" COLLECTINGMETHOD="[null]" DISTANCETOGROUND="[null]" DISTANCETOGROUNDMAX="[null]" DISTANCETOGROUNDTEXT="[null]" DISTANCETOWATERSURFACE="[null]" DISTANCETOWATERSURFACEMAX="[null]" DISTANCETOWATERSURFACETEXT="[null]" EXACTLOCATION_ERRORRADIUS="[null]" EXACTLOCATION_LATITUDE="[null]" EXACTLOCATION_LONGITUDE="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" ACTOR_ID="[null]" COUNTRY_ID="[null]" EXACTLOCATION_REFERENCESYSTEM_ID="[null]" LOCALITY_ID="5000"/>
11
  <LANGUAGESTRING ID="5000" CREATED="2017-11-24 16:26:03.0" UUID="c63419cd-445c-4086-a03a-c2d200ad6fe5" UPDATED="[null]" TEXT="Somewhere" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" LANGUAGE_ID="406"/>
12
  <SPECIMENOROBSERVATIONBASE DTYPE="DerivedUnit" ID="5000" CREATED="2017-11-24 16:26:03.0" UUID="19c99c0d-6c61-4bf0-9594-7405cf3fc3bc" UPDATED="2017-11-24 16:26:04.305" RECORDBASIS="PS" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="Somewhere, FieldNumber." PROTECTEDIDENTITYCACHE="false" IDENTITYCACHE="[null]" PUBLISH="true" INDIVIDUALCOUNT="[null]" PREFERREDSTABLEURI="[null]" ACCESSIONNUMBER="[null]" BARCODE="[null]" CATALOGNUMBER="[null]" COLLECTORSNUMBER="[null]" EXSICCATUM="[null]" ORIGINALLABELINFO="[null]" FIELDNOTES="[null]" FIELDNUMBER="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" LIFESTAGE_ID="[null]" SEX_ID="[null]" KINDOFUNIT_ID="2065" COLLECTION_ID="[null]" DERIVEDFROM_ID="5000" STOREDUNDER_ID="[null]" PRESERVATION_ID="[null]" GATHERINGEVENT_ID="[null]" PRIMARYCOLLECTOR_ID="[null]" MEDIASPECIMEN_ID="[null]" DNAQUALITY_ID="[null]"/>
13
  <SPECIMENOROBSERVATIONBASE DTYPE="FieldUnit" ID="5001" CREATED="2017-11-24 16:26:03.0" UUID="22be718a-6f21-4b74-aae3-bb7d7d659e1c" UPDATED="2017-11-24 16:26:04.307" RECORDBASIS="FU" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="Somewhere, FieldNumber." PROTECTEDIDENTITYCACHE="false" IDENTITYCACHE="[null]" PUBLISH="true" INDIVIDUALCOUNT="[null]" PREFERREDSTABLEURI="[null]" ACCESSIONNUMBER="[null]" BARCODE="[null]" CATALOGNUMBER="[null]" COLLECTORSNUMBER="[null]" EXSICCATUM="[null]" ORIGINALLABELINFO="[null]" FIELDNOTES="FieldNotes" FIELDNUMBER="FieldNumber" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" LIFESTAGE_ID="[null]" SEX_ID="[null]" KINDOFUNIT_ID="[null]" COLLECTION_ID="[null]" DERIVEDFROM_ID="[null]" STOREDUNDER_ID="[null]" PRESERVATION_ID="[null]" GATHERINGEVENT_ID="5000" PRIMARYCOLLECTOR_ID="[null]" MEDIASPECIMEN_ID="[null]" DNAQUALITY_ID="[null]"/>
14
  <SPECIMENOROBSERVATIONBASE DTYPE="MediaSpecimen" ID="5002" CREATED="2017-11-24 16:26:04.0" UUID="10eceb2c-9b51-458e-8dcd-2cb92cc558a9" UPDATED="2017-11-24 16:26:04.308" RECORDBASIS="SI" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="Somewhere, FieldNumber (TEST_1)." PROTECTEDIDENTITYCACHE="false" IDENTITYCACHE="[null]" PUBLISH="true" INDIVIDUALCOUNT="[null]" PREFERREDSTABLEURI="[null]" ACCESSIONNUMBER="TEST_1" BARCODE="[null]" CATALOGNUMBER="[null]" COLLECTORSNUMBER="[null]" EXSICCATUM="[null]" ORIGINALLABELINFO="[null]" FIELDNOTES="[null]" FIELDNUMBER="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" LIFESTAGE_ID="[null]" SEX_ID="[null]" KINDOFUNIT_ID="2065" COLLECTION_ID="[null]" DERIVEDFROM_ID="5000" STOREDUNDER_ID="[null]" PRESERVATION_ID="[null]" GATHERINGEVENT_ID="[null]" PRIMARYCOLLECTOR_ID="[null]" MEDIASPECIMEN_ID="5000" DNAQUALITY_ID="[null]"/>
15
  <SPECIMENOROBSERVATIONBASE DTYPE="DerivedUnit" ID="5003" CREATED="2017-11-24 16:26:04.0" UUID="2e384f8e-fbb0-44eb-9d5f-1b7235493932" UPDATED="2017-11-24 16:26:04.309" RECORDBASIS="PS" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="Somewhere, FieldNumber (TEST_2)." PROTECTEDIDENTITYCACHE="false" IDENTITYCACHE="[null]" PUBLISH="true" INDIVIDUALCOUNT="[null]" PREFERREDSTABLEURI="[null]" ACCESSIONNUMBER="TEST_2" BARCODE="[null]" CATALOGNUMBER="[null]" COLLECTORSNUMBER="[null]" EXSICCATUM="[null]" ORIGINALLABELINFO="[null]" FIELDNOTES="[null]" FIELDNUMBER="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" LIFESTAGE_ID="[null]" SEX_ID="[null]" KINDOFUNIT_ID="2064" COLLECTION_ID="[null]" DERIVEDFROM_ID="5001" STOREDUNDER_ID="[null]" PRESERVATION_ID="[null]" GATHERINGEVENT_ID="[null]" PRIMARYCOLLECTOR_ID="[null]" MEDIASPECIMEN_ID="[null]" DNAQUALITY_ID="[null]"/>
16
  <TYPEDESIGNATIONBASE DTYPE="SpecimenTypeDesignation" ID="5000" CREATED="2017-11-24 16:26:03.0" UUID="a1896ae2-4396-4243-988e-3d74058b44ab" UPDATED="[null]" CITATIONMICROREFERENCE="[null]" ORIGINALNAMESTRING="[null]" NOTDESIGNATED="false" CONSERVEDTYPE="[null]" REJECTEDTYPE="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" CITATION_ID="5000" TYPESTATUS_ID="821" TYPENAME_ID="[null]" TYPESPECIMEN_ID="5002"/>
17
  <TYPEDESIGNATIONBASE DTYPE="SpecimenTypeDesignation" ID="5001" CREATED="2017-11-24 16:26:04.0" UUID="9824e111-1598-4187-ba89-8a27fb5dcaf9" UPDATED="[null]" CITATIONMICROREFERENCE="[null]" ORIGINALNAMESTRING="[null]" NOTDESIGNATED="false" CONSERVEDTYPE="[null]" REJECTEDTYPE="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" CITATION_ID="5000" TYPESTATUS_ID="821" TYPENAME_ID="[null]" TYPESPECIMEN_ID="5003"/>
18
  <REGISTRATION_TYPEDESIGNATIONBASE REGISTRATIONS_ID="5000" TYPEDESIGNATIONS_ID="5000"/>
19
  <REGISTRATION_TYPEDESIGNATIONBASE REGISTRATIONS_ID="5000" TYPEDESIGNATIONS_ID="5001"/>
20
  <TAXONNAME_TYPEDESIGNATIONBASE TAXONNAME_ID="5000" TYPEDESIGNATIONS_ID="5000"/>
21
  <TAXONNAME_TYPEDESIGNATIONBASE TAXONNAME_ID="5000" TYPEDESIGNATIONS_ID="5001"/>
22
  <SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT ORIGINALS_ID="5001" DERIVATIONEVENTS_ID="5000"/>
23
  <SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT ORIGINALS_ID="5001" DERIVATIONEVENTS_ID="5001"/>
24
  <MEDIA DTYPE="Media" ID="5000" CREATED="2017-11-24 16:26:04.0" UUID="10130fe6-a176-4a6b-8606-6546976400d4" UPDATED="2017-11-24 16:26:04.307" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="image1" MEDIACREATED="[null]" CITATIONMICROREFERENCE="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" ARTIST_ID="[null]" CITATION_ID="[null]"/>
25
  <MEDIAREPRESENTATION ID="5000" CREATED="2017-11-24 16:26:04.0" UUID="7cb1eb82-3792-4206-886a-f9848d18a2c7" UPDATED="[null]" MIMETYPE="[null]" SUFFIX="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" MEDIA_ID="5000"/>
26
  <MEDIAREPRESENTATIONPART DTYPE="MediaRepresentationPart" ID="5000" CREATED="2017-11-24 16:26:04.0" UUID="5b7ba042-7e17-4918-abdd-990ee1f56fc0" UPDATED="[null]" SIZE="[null]" URI="http://foo.bar.com/image1" DURATION="[null]" HEIGHT="[null]" WIDTH="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" REPRESENTATION_ID="5000" SORTINDEX="0"/>
27
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="AgentBase" NEXT_VAL="5001"/>
28
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="AuditEvent" NEXT_VAL="5007"/>
29
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="CdmMetaData" NEXT_VAL="5010"/>
30
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="DefinedTermBase" NEXT_VAL="7193"/>
31
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="DerivationEvent" NEXT_VAL="5002"/>
32
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="GatheringEvent" NEXT_VAL="5001"/>
33
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="GrantedAuthorityImpl" NEXT_VAL="5034"/>
34
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="HomotypicalGroup" NEXT_VAL="5001"/>
35
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="LanguageString" NEXT_VAL="5001"/>
36
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="Media" NEXT_VAL="5001"/>
37
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="MediaRepresentation" NEXT_VAL="5001"/>
38
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="MediaRepresentationPart" NEXT_VAL="5001"/>
39
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="PermissionGroup" NEXT_VAL="5010"/>
40
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="Reference" NEXT_VAL="5001"/>
41
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="Registration" NEXT_VAL="5001"/>
42
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="Representation" NEXT_VAL="7297"/>
43
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="SpecimenOrObservationBase" NEXT_VAL="5004"/>
44
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="TaxonName" NEXT_VAL="5001"/>
45
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="TermVocabulary" NEXT_VAL="5045"/>
46
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="TypeDesignationBase" NEXT_VAL="5002"/>
47
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="UserAccount" NEXT_VAL="5002"/>
48
</dataset>
src/test/resources/eu/etaxonomy/cdm/service/SpecimenTypeDesignationWorkingsetEditorPresenterTest.xml
1
<?xml version='1.0' encoding='UTF-8'?>
2
<dataset>
3
  <TAXONNAME ID="5000" CREATED="2017-11-24 22:17:26.0" UUID="bd294483-8383-4a5c-bf76-ffa3e104dc9e" UPDATED="2017-11-24 22:17:27.447" NAMETYPE="ICNAFP" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="Planothidium victori" APPENDEDPHRASE="[null]" FULLTITLECACHE="Planothidium victori in - undefined journal -: 11-45" NOMENCLATURALMICROREFERENCE="11-45" PARSINGPROBLEM="0" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PROTECTEDFULLTITLECACHE="false" AUTHORSHIPCACHE="" BINOMHYBRID="false" GENUSORUNINOMIAL="Planothidium" HYBRIDFORMULA="false" INFRAGENERICEPITHET="[null]" INFRASPECIFICEPITHET="[null]" MONOMHYBRID="false" NAMECACHE="Planothidium victori" PROTECTEDAUTHORSHIPCACHE="false" PROTECTEDNAMECACHE="false" SPECIFICEPITHET="victori" TRINOMHYBRID="false" NAMEAPPROBATION="[null]" SUBGENUSAUTHORSHIP="[null]" ANAMORPHIC="false" CULTIVARNAME="[null]" ACRONYM="[null]" BREED="[null]" ORIGINALPUBLICATIONYEAR="[null]" PUBLICATIONYEAR="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" HOMOTYPICALGROUP_ID="5000" NOMENCLATURALREFERENCE_ID="5000" RANK_ID="765" BASIONYMAUTHORSHIP_ID="[null]" COMBINATIONAUTHORSHIP_ID="[null]" EXBASIONYMAUTHORSHIP_ID="[null]" EXCOMBINATIONAUTHORSHIP_ID="[null]"/>
4
  <REFERENCE ID="5000" CREATED="2017-11-24 22:17:26.0" UUID="ed1c8722-015b-4a94-82a6-0b42e03d0e92" UPDATED="2017-11-24 22:17:27.448" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="Novis, Braidwood &amp; Kilroy, P.M. Novis, J. Braidwood &amp; C. Kilroy, Small diatoms (Bacillariophyta) in cultures from the Styx River, New Zealand, including descriptions of three new species in Phytotaxa 64 in - undefined journal -" DATEPUBLISHED_END="[null]" DATEPUBLISHED_FREETEXT="[null]" DATEPUBLISHED_START="[null]" EDITION="[null]" EDITOR="[null]" ISBN="[null]" ISSN="[null]" DOI="[null]" NOMENCLATURALLYRELEVANT="false" ORGANIZATION="[null]" PAGES="[null]" PARSINGPROBLEM="0" PLACEPUBLISHED="[null]" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PUBLISHER="[null]" REFERENCEABSTRACT="[null]" SERIESPART="[null]" TITLE="P.M. Novis, J. Braidwood &amp; C. Kilroy, Small diatoms (Bacillariophyta) in cultures from the Styx River, New Zealand, including descriptions of three new species in Phytotaxa 64" ABBREVTITLE="[null]" ABBREVTITLECACHE="Novis, Braidwood &amp; Kilroy, P.M. Novis, J. Braidwood &amp; C. Kilroy, Small diatoms (Bacillariophyta) in cultures from the Styx River, New Zealand, including descriptions of three new species in Phytotaxa 64 in - undefined journal -" PROTECTEDABBREVTITLECACHE="false" REFTYPE="ART" URI="[null]" VOLUME="[null]" ACCESSED="[null]" LASTRETRIEVED="[null]" EXTERNALID="[null]" EXTERNALLINK="[null]" AUTHORITYTYPE="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" AUTHORSHIP_ID="5000" INREFERENCE_ID="[null]" INSTITUTION_ID="[null]" SCHOOL_ID="[null]"/>
5
  <AGENTBASE DTYPE="Team" ID="5000" CREATED="2017-11-24 22:17:26.0" UUID="5e7b791e-d17f-4378-9a47-923ebebc9b6a" UPDATED="2017-11-24 22:17:27.449" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="true" TITLECACHE="Novis, Braidwood &amp; Kilroy" PROTECTEDCOLLECTORTITLECACHE="false" COLLECTORTITLE="[null]" PROTECTEDNOMENCLATURALTITLECACHE="true" NOMENCLATURALTITLE="Novis, Braidwood &amp; Kilroy" CODE="[null]" NAME="[null]" FIRSTNAME="[null]" INITIALS="[null]" LASTNAME="[null]" LIFESPAN_END="[null]" LIFESPAN_FREETEXT="[null]" LIFESPAN_START="[null]" PREFIX="[null]" SUFFIX="[null]" HASMOREMEMBERS="false" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" ISPARTOF_ID="[null]"/>
6
  <HOMOTYPICALGROUP ID="5000" CREATED="2017-11-24 22:17:26.0" UUID="76cb5ec1-ac61-4c40-a0e2-1bb738f04575" UPDATED="2017-11-24 22:17:27.448" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]"/>
7
  <REGISTRATION ID="5000" CREATED="2017-11-24 22:17:27.0" UUID="247090ee-31b4-4738-970c-69813e785a86" UPDATED="[null]" IDENTIFIER="[null]" REGISTRATIONDATE="[null]" SPECIFICIDENTIFIER="[null]" STATUS="PREP" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" INSTITUTION_ID="[null]" NAME_ID="5000" SUBMITTER_ID="[null]"/>
8
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="AgentBase" NEXT_VAL="5001"/>
9
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="AuditEvent" NEXT_VAL="5005"/>
10
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="CdmMetaData" NEXT_VAL="5005"/>
11
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="GrantedAuthorityImpl" NEXT_VAL="5017"/>
12
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="HomotypicalGroup" NEXT_VAL="5001"/>
13
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="PermissionGroup" NEXT_VAL="5005"/>
14
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="Reference" NEXT_VAL="5001"/>
15
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="Registration" NEXT_VAL="5001"/>
16
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="TaxonName" NEXT_VAL="5001"/>
17
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="UserAccount" NEXT_VAL="5001"/>
18
</dataset>

Also available in: Unified diff