removing unused duplicate property PreservedSpecimenDTOs
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / dto / SequenceDTO.java
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.net.URI;
12 import java.net.URISyntaxException;
13 import java.util.HashSet;
14 import java.util.Set;
15
16 import eu.etaxonomy.cdm.model.common.DefinedTerm;
17 import eu.etaxonomy.cdm.model.media.Media;
18 import eu.etaxonomy.cdm.model.molecular.Sequence;
19 import eu.etaxonomy.cdm.model.molecular.SequenceString;
20 import eu.etaxonomy.cdm.model.molecular.SingleReadAlignment;
21 import eu.etaxonomy.cdm.model.reference.Reference;
22
23 /**
24 * @author k.luther
25 * @since 02.08.2018
26 *
27 */
28 public class SequenceDTO {
29
30 private Media contigFile;
31
32 private SequenceString consensusSequence = SequenceString.NewInstance();
33
34
35 private Boolean isBarcode = null;
36
37
38 private SequenceString barcodeSequencePart = SequenceString.NewInstance();
39
40
41 private String geneticAccessionNumber;
42
43
44 private String boldProcessId;
45
46
47 private Set<SingleReadAlignment> singleReadAlignments = new HashSet<SingleReadAlignment>();
48
49
50 private DefinedTerm dnaMarker;
51
52
53
54 private String haplotype;
55
56
57 private Set<Reference> citations = new HashSet<>();
58
59 private URI boldUri;
60 private URI ddbjUri;
61 private URI emblUri;
62 private URI genBankUri;
63
64 public SequenceDTO(Sequence seq){
65 contigFile = seq.getContigFile();
66 consensusSequence = seq.getConsensusSequence();
67 isBarcode = seq.getIsBarcode();
68 barcodeSequencePart = seq.getBarcodeSequencePart();
69 geneticAccessionNumber = seq.getGeneticAccessionNumber();
70 boldProcessId = seq.getBoldProcessId();
71 singleReadAlignments = seq.getSingleReadAlignments();
72 dnaMarker = seq.getDnaMarker();
73 haplotype = seq.getHaplotype();
74 citations = seq.getCitations();
75 try{
76 boldUri = seq.getBoldUri();
77 ddbjUri = seq.getDdbjUri();
78 emblUri = seq.getEmblUri();
79 genBankUri = seq.getGenBankUri();
80 } catch (URISyntaxException e){
81 //TODO
82 }
83
84 }
85
86
87
88 /**
89 * @return the boldUri
90 */
91 public URI getBoldUri() {
92 return boldUri;
93 }
94
95
96 /**
97 * @return the ddbjUri
98 */
99 public URI getDdbjUri() {
100 return ddbjUri;
101 }
102
103
104 /**
105 * @return the emblUri
106 */
107 public URI getEmblUri() {
108 return emblUri;
109 }
110
111
112 /**
113 * @return the genBankUri
114 */
115 public URI getGenBankUri() {
116 return genBankUri;
117 }
118
119
120 /**
121 * @return the contigFile
122 */
123 public Media getContigFile() {
124 return contigFile;
125 }
126
127
128 /**
129 * @return the consensusSequence
130 */
131 public SequenceString getConsensusSequence() {
132 return consensusSequence;
133 }
134
135
136 /**
137 * @return the isBarcode
138 */
139 public Boolean getIsBarcode() {
140 return isBarcode;
141 }
142
143
144 /**
145 * @return the barcodeSequencePart
146 */
147 public SequenceString getBarcodeSequencePart() {
148 return barcodeSequencePart;
149 }
150
151
152 /**
153 * @return the geneticAccessionNumber
154 */
155 public String getGeneticAccessionNumber() {
156 return geneticAccessionNumber;
157 }
158
159
160 /**
161 * @return the boldProcessId
162 */
163 public String getBoldProcessId() {
164 return boldProcessId;
165 }
166
167
168 /**
169 * @return the singleReadAlignments
170 */
171 public Set<SingleReadAlignment> getSingleReadAlignments() {
172 return singleReadAlignments;
173 }
174
175
176 /**
177 * @return the dnaMarker
178 */
179 public DefinedTerm getDnaMarker() {
180 return dnaMarker;
181 }
182
183
184 /**
185 * @return the haplotype
186 */
187 public String getHaplotype() {
188 return haplotype;
189 }
190
191
192 /**
193 * @return the citations
194 */
195 public Set<Reference> getCitations() {
196 return citations;
197 }
198 }