Project

General

Profile

« Previous | Next » 

Revision c25679bb

Added by Andreas Kohlbecker over 2 years ago

fix #9896 DerivedUnitDTO with complete set of annotationDTOs

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/dto/SourceDTO.java
11 11
import java.io.Serializable;
12 12
import java.util.UUID;
13 13

  
14
import eu.etaxonomy.cdm.format.reference.OriginalSourceFormatter;
14 15
import eu.etaxonomy.cdm.model.common.IdentifiableSource;
15 16
import eu.etaxonomy.cdm.model.reference.NamedSourceBase;
17
import eu.etaxonomy.cdm.model.reference.Reference;
18
import eu.etaxonomy.cdm.ref.TypedEntityReference;
16 19

  
17 20
/**
18 21
 * @author a.kohlbecker
......
23 26
    private static final long serialVersionUID = -3314135226037542122L;
24 27

  
25 28
    private UUID uuid;
29
    protected String label;
26 30
    String citationDetail;
27
    ReferenceDTO citation;
31
    TypedEntityReference<Reference> citation;
28 32

  
29 33
    public static SourceDTO fromDescriptionElementSource(NamedSourceBase entity) {
30 34
        if(entity == null) {
......
32 36
        }
33 37
        SourceDTO dto = new SourceDTO();
34 38
        dto.uuid = entity.getUuid();
35
        dto.citation = ReferenceDTO.fromReference(entity.getCitation());
39
        dto.label = OriginalSourceFormatter.INSTANCE.format(entity);
40
        dto.citation = TypedEntityReference.fromEntity(entity.getCitation(), false);
36 41
        dto.citationDetail = entity.getCitationMicroReference();
37 42
        return dto;
38 43
    }
......
58 63
        this.uuid = uuid;
59 64
    }
60 65

  
61
    public ReferenceDTO getCitation() {
66
    public TypedEntityReference<Reference> getCitation() {
62 67
        return citation;
63 68
    }
64 69

  
65 70

  
66
    public void setCitation(ReferenceDTO citation) {
71
    public void setCitation(TypedEntityReference<Reference> citation) {
67 72
        this.citation = citation;
68 73
    }
69 74

  

Also available in: Unified diff