Revision 1ff11053
Added by Andreas Kohlbecker over 6 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationDTO.java | ||
---|---|---|
26 | 26 |
import eu.etaxonomy.cdm.model.name.Registration; |
27 | 27 |
import eu.etaxonomy.cdm.model.name.RegistrationStatus; |
28 | 28 |
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation; |
29 |
import eu.etaxonomy.cdm.model.name.TaxonName; |
|
29 | 30 |
import eu.etaxonomy.cdm.model.name.TypeDesignationBase; |
30 | 31 |
import eu.etaxonomy.cdm.model.reference.INomenclaturalReference; |
31 | 32 |
import eu.etaxonomy.cdm.model.reference.IReference; |
33 |
import eu.etaxonomy.cdm.model.reference.Reference; |
|
32 | 34 |
import eu.etaxonomy.cdm.vaadin.model.EntityReference; |
33 | 35 |
import eu.etaxonomy.cdm.vaadin.model.TypedEntityReference; |
34 | 36 |
import eu.etaxonomy.cdm.vaadin.model.registration.SpecimenTypeDesignationWorkingSetDTO; |
... | ... | |
101 | 103 |
case TYPIFICATION: |
102 | 104 |
default: |
103 | 105 |
try { |
104 |
typeDesignationManager = new TypeDesignationSetManager(reg, reg.getTypeDesignations());
|
|
106 |
typeDesignationManager = new TypeDesignationSetManager(reg.getTypeDesignations()); |
|
105 | 107 |
summary = typeDesignationManager.buildString().print(); |
106 | 108 |
} catch (RegistrationValidationException e) { |
107 | 109 |
messages.add("Validation errors: " + e.getMessage()); |
... | ... | |
114 | 116 |
|
115 | 117 |
} |
116 | 118 |
|
119 |
/** |
|
120 |
* To create an initially empty DTO for which only the <code>typifiedName</code> and the <code>publication</code> are defined. |
|
121 |
* All TypeDesignations added to the <code>Registration</code> need to refer to the same <code>typifiedName</code> and must be |
|
122 |
* published in the same <code>publication</code>. |
|
123 |
* |
|
124 |
* @param reg |
|
125 |
* @param typifiedName |
|
126 |
*/ |
|
127 |
public RegistrationDTO(Registration reg, TaxonName typifiedName, Reference publication) { |
|
128 |
this.reg = reg; |
|
129 |
citation = publication; |
|
130 |
// create a TypeDesignationSetManager with only a reference to the typifiedName for validation |
|
131 |
typeDesignationManager = new TypeDesignationSetManager(typifiedName); |
|
132 |
} |
|
133 |
|
|
117 | 134 |
/** |
118 | 135 |
* @param reg |
119 | 136 |
* @return |
Also available in: Unified diff
ref #6169 feature completed: adding new type designation workingsets