Project

General

Profile

Download (1.41 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2018 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.api.service.dto;
10

    
11
import java.util.UUID;
12

    
13
import eu.etaxonomy.cdm.model.description.DescriptionElementSource;
14

    
15
/**
16
 * @author a.kohlbecker
17
 * @since Aug 31, 2018
18
 *
19
 */
20
public class SourceDTO {
21

    
22
    private UUID uuid;
23
    String citationDetail;
24
    ReferenceDTO citation;
25

    
26
    public static SourceDTO fromDescriptionElementSource(DescriptionElementSource entity) {
27
        if(entity == null) {
28
            return null;
29
        }
30
        SourceDTO dto = new SourceDTO();
31
        dto.uuid = entity.getUuid();
32
        dto.citation = ReferenceDTO.fromReference(entity.getCitation());
33
        dto.citationDetail = entity.getCitationMicroReference();
34
        return dto;
35
    }
36

    
37
    public UUID getUuid() {
38
        return uuid;
39
    }
40

    
41

    
42
    public void setUuid(UUID uuid) {
43
        this.uuid = uuid;
44
    }
45

    
46
    public ReferenceDTO getCitation() {
47
        return citation;
48
    }
49

    
50

    
51
    public void setCitation(ReferenceDTO citation) {
52
        this.citation = citation;
53
    }
54

    
55

    
56
    public String getCitationDetail() {
57
        return citationDetail;
58
    }
59

    
60

    
61
    public void setCitationDetail(String citationDetail) {
62
        this.citationDetail = citationDetail;
63
    }
64

    
65
}
(26-26/36)