Project

General

Profile

Revision c6c60718

IDc6c60718a1ba1859df00889f73a00fc1b583ef78
Parent 3cc62172
Child a26ed8d5

Added by Andreas Müller 2 months ago

ref #6581 fix source type in TypeDesignationBase

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/TypeDesignationBase.java
39 39
import eu.etaxonomy.cdm.model.common.CdmBase;
40 40
import eu.etaxonomy.cdm.model.common.IdentifiableSource;
41 41
import eu.etaxonomy.cdm.model.common.SourcedEntityBase;
42
import eu.etaxonomy.cdm.model.description.DescriptionElementSource;
42 43
import eu.etaxonomy.cdm.model.reference.ICdmTarget;
43 44
import eu.etaxonomy.cdm.model.reference.OriginalSourceType;
44 45
import eu.etaxonomy.cdm.model.reference.Reference;
......
115 116
    @XmlSchemaType(name = "IDREF")
116 117
    @OneToOne(fetch = FetchType.LAZY, orphanRemoval=true)
117 118
    @Cascade({CascadeType.SAVE_UPDATE,CascadeType.MERGE, CascadeType.DELETE})
118
    private IdentifiableSource source;
119
    private DescriptionElementSource source;
119 120

  
120 121
    @XmlElementWrapper(name = "TypifiedNames")
121 122
    @XmlElement(name = "TypifiedName")
......
177 178
     * @see							TaxonName#getTypeDesignations()
178 179
     */
179 180
    protected TypeDesignationBase(Reference citation, String citationMicroReference, String originalNameString, boolean notDesignated){
180
        this(IdentifiableSource.NewPrimarySourceInstance(citation, citationMicroReference), originalNameString, notDesignated);
181
        this(DescriptionElementSource.NewPrimarySourceInstance(citation, citationMicroReference), originalNameString, notDesignated);
181 182
    }
182 183

  
183 184
    /**
......
194 195
     * @see                         #isNotDesignated()
195 196
     * @see                         TaxonName#getTypeDesignations()
196 197
     */
197
    protected TypeDesignationBase(IdentifiableSource source, String originalNameString, boolean notDesignated){
198
    protected TypeDesignationBase(DescriptionElementSource source, String originalNameString, boolean notDesignated){
198 199
        super();
199 200
        this.notDesignated = notDesignated;
200 201
        this.source = source;
......
263 264
        checkNullSource();
264 265
    }
265 266

  
266
    /**
267
     * @param createNew
268
     * @return the source
269
     */
270
    public IdentifiableSource getSource(boolean createIfNotExist) {
267
    public DescriptionElementSource getSource(boolean createIfNotExist) {
271 268
        if (this.source == null && createIfNotExist){
272
            this.source = IdentifiableSource.NewInstance(OriginalSourceType.PrimaryTaxonomicSource);
269
            this.source = DescriptionElementSource.NewInstance(OriginalSourceType.PrimaryTaxonomicSource);
273 270
        }
274 271
        return source;
275 272
    }
276 273

  
277
    public IdentifiableSource getSource(){
274
    public DescriptionElementSource getSource(){
278 275
        return source;
279 276
    }
280

  
281
    /**
282
     * @param source the source to set
283
     */
284
    public void setSource(IdentifiableSource source) {
277
    public void setSource(DescriptionElementSource source) {
285 278
        this.source = source;
286 279
    }
287 280

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)