Revision 1d9ed98e
Added by Andreas Kohlbecker over 3 years ago
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/dto/SourceDTO.java | ||
---|---|---|
10 | 10 |
|
11 | 11 |
import java.util.UUID; |
12 | 12 |
|
13 |
import eu.etaxonomy.cdm.model.description.DescriptionElementSource; |
|
14 |
|
|
13 | 15 |
/** |
14 | 16 |
* @author a.kohlbecker |
15 | 17 |
* @since Aug 31, 2018 |
... | ... | |
18 | 20 |
public class SourceDTO { |
19 | 21 |
|
20 | 22 |
private UUID uuid; |
21 |
String citation; |
|
22 | 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 |
} |
|
23 | 64 |
|
24 | 65 |
} |
Also available in: Unified diff
ref #9238 extending SpecimenTypeDesignationDTO with more fields and associated DTOs, introducing ReferenceDTO, supressing unwanted and dangerous fields of RegistrationDTO