2 * Copyright (C) 2015 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
9 package eu
.etaxonomy
.cdm
.api
.service
.dto
;
11 import java
.util
.Comparator
;
12 import java
.util
.TreeSet
;
14 import org
.hibernate
.envers
.tools
.Pair
;
21 public abstract class DerivateDTO
{
23 private TreeSet
<Pair
<String
, String
>> characterData
;
24 private DerivateDataDTO derivateDataDTO
;
25 // protected String taxonName;
26 protected String citation
;
27 protected boolean hasDetailImage
;
28 private boolean hasCharacterData
;
29 private boolean hasDna
;
30 private boolean hasSpecimenScan
;
33 * @return the derivateDataDTO
35 public DerivateDataDTO
getDerivateDataDTO() {
36 return derivateDataDTO
;
40 * @param derivateDataDTO the derivateDataDTO to set
42 public void setDerivateDataDTO(DerivateDataDTO derivateDataDTO
) {
43 this.derivateDataDTO
= derivateDataDTO
;
47 * @return the characterData
49 public TreeSet
<Pair
<String
, String
>> getCharacterData() {
53 public void addCharacterData(String character
, String state
){
54 if(characterData
==null){
55 characterData
= new TreeSet
<Pair
<String
,String
>>(new Comparator
<Pair
<String
,String
>>() {
58 public int compare(Pair
<String
, String
> o1
, Pair
<String
, String
> o2
) {
59 if(o1
==null && o2
!=null){
62 if(o1
!=null && o2
==null){
65 if(o1
!=null && o2
!=null){
66 return o1
.getFirst().compareTo(o2
.getFirst());
72 characterData
.add(new Pair
<String
, String
>(character
, state
));
76 * @return the hasCharacterData
78 public boolean isHasCharacterData() {
79 return hasCharacterData
;
83 * @param hasCharacterData the hasCharacterData to set
85 public void setHasCharacterData(boolean hasCharacterData
) {
86 this.hasCharacterData
= hasCharacterData
;
92 public boolean isHasDna() {
97 * @param hasDna the hasDna to set
99 public void setHasDna(boolean hasDna
) {
100 this.hasDna
= hasDna
;
104 * @return the hasDetailImage
106 public boolean isHasDetailImage() {
107 return hasDetailImage
;
111 * @param hasDetailImage the hasDetailImage to set
113 public void setHasDetailImage(boolean hasDetailImage
) {
114 this.hasDetailImage
= hasDetailImage
;
118 * @return the hasSpecimenScan
120 public boolean isHasSpecimenScan() {
121 return hasSpecimenScan
;
125 * @param hasSpecimenScan the hasSpecimenScan to set
127 public void setHasSpecimenScan(boolean hasSpecimenScan
) {
128 this.hasSpecimenScan
= hasSpecimenScan
;
131 * @return the citation
133 public String
getCitation() {
137 * @param citation the citation to set
139 public void setCitation(String citation
) {
140 this.citation
= citation
;