3 * Copyright (C) 2015 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.api
.service
.dto
;
13 import java
.util
.ArrayList
;
14 import java
.util
.HashMap
;
15 import java
.util
.List
;
17 import java
.util
.UUID
;
19 import org
.hibernate
.envers
.tools
.Pair
;
21 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
29 public class PreservedSpecimenDTO
extends DerivateDTO
{
31 private String accessionNumber
;
32 private URI preferredStableUri
;
34 private List
<Pair
<UUID
, String
>> associatedTaxa
;
35 private Map
<String
, List
<String
>> types
;
37 public String
getAccessionNumber() {
38 return accessionNumber
;
40 public void setAccessionNumber(String accessionNumber
) {
41 this.accessionNumber
= accessionNumber
;
44 public String
getUuid() {
47 public void setUuid(String uuid
) {
51 public Map
<String
, List
<String
>> getTypes() {
54 public void addTypes(String typeStatus
, List
<String
> typedTaxa
){
56 types
= new HashMap
<String
, List
<String
>>();
58 types
.put(typeStatus
, typedTaxa
);
61 public List
<Pair
<UUID
, String
>> getAssociatedTaxa() {
62 return associatedTaxa
;
64 public void addAssociatedTaxon(Taxon taxon
){
65 if(associatedTaxa
==null){
66 associatedTaxa
= new ArrayList
<Pair
<UUID
, String
>>();
68 associatedTaxa
.add(new Pair
<UUID
, String
>(taxon
.getUuid(), taxon
.getTitleCache()));
71 public void setPreferredStableUri(URI preferredStableUri
) {
72 this.preferredStableUri
= preferredStableUri
;
75 public URI
getPreferredStableUri() {
76 return preferredStableUri
;