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.io.Serializable;
|
12
|
import java.net.URISyntaxException;
|
13
|
import java.util.HashSet;
|
14
|
import java.util.Set;
|
15
|
|
16
|
import eu.etaxonomy.cdm.common.URI;
|
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
|
public class SequenceDTO implements Serializable{
|
28
|
|
29
|
private static final long serialVersionUID = 4532272104416494517L;
|
30
|
|
31
|
private Media contigFile;
|
32
|
private SequenceString consensusSequence;
|
33
|
private Boolean isBarcode = null;
|
34
|
private SequenceString barcodeSequencePart = SequenceString.NewInstance();
|
35
|
private String geneticAccessionNumber;
|
36
|
private String boldProcessId;
|
37
|
private Set<SingleReadAlignment> singleReadAlignments = new HashSet<SingleReadAlignment>();
|
38
|
private String dnaMarker;
|
39
|
private String haplotype;
|
40
|
private Set<Reference> citations = new HashSet<>();
|
41
|
|
42
|
private URI boldUri;
|
43
|
private URI ddbjUri;
|
44
|
private URI emblUri;
|
45
|
private URI genBankUri;
|
46
|
|
47
|
public SequenceDTO(Sequence seq){
|
48
|
contigFile = seq.getContigFile();
|
49
|
consensusSequence = seq.getConsensusSequence();
|
50
|
isBarcode = seq.getIsBarcode();
|
51
|
barcodeSequencePart = seq.getBarcodeSequencePart();
|
52
|
geneticAccessionNumber = seq.getGeneticAccessionNumber();
|
53
|
boldProcessId = seq.getBoldProcessId();
|
54
|
singleReadAlignments = seq.getSingleReadAlignments();
|
55
|
if (seq.getDnaMarker() != null){
|
56
|
dnaMarker = seq.getDnaMarker().getLabel();
|
57
|
}
|
58
|
haplotype = seq.getHaplotype();
|
59
|
citations = seq.getCitations();
|
60
|
try{
|
61
|
boldUri = seq.getBoldUri();
|
62
|
ddbjUri = seq.getDdbjUri();
|
63
|
emblUri = seq.getEmblUri();
|
64
|
genBankUri = seq.getGenBankUri();
|
65
|
} catch (URISyntaxException e){
|
66
|
//TODO
|
67
|
}
|
68
|
}
|
69
|
|
70
|
public URI getBoldUri() {
|
71
|
return boldUri;
|
72
|
}
|
73
|
|
74
|
public URI getDdbjUri() {
|
75
|
return ddbjUri;
|
76
|
}
|
77
|
|
78
|
public URI getEmblUri() {
|
79
|
return emblUri;
|
80
|
}
|
81
|
|
82
|
public URI getGenBankUri() {
|
83
|
return genBankUri;
|
84
|
}
|
85
|
|
86
|
public Media getContigFile() {
|
87
|
return contigFile;
|
88
|
}
|
89
|
|
90
|
public SequenceString getConsensusSequence() {
|
91
|
return consensusSequence;
|
92
|
}
|
93
|
|
94
|
public Boolean getIsBarcode() {
|
95
|
return isBarcode;
|
96
|
}
|
97
|
|
98
|
public SequenceString getBarcodeSequencePart() {
|
99
|
return barcodeSequencePart;
|
100
|
}
|
101
|
|
102
|
public String getGeneticAccessionNumber() {
|
103
|
return geneticAccessionNumber;
|
104
|
}
|
105
|
|
106
|
public String getBoldProcessId() {
|
107
|
return boldProcessId;
|
108
|
}
|
109
|
|
110
|
public Set<SingleReadAlignment> getSingleReadAlignments() {
|
111
|
return singleReadAlignments;
|
112
|
}
|
113
|
|
114
|
public String getDnaMarker() {
|
115
|
return dnaMarker;
|
116
|
}
|
117
|
|
118
|
public String getHaplotype() {
|
119
|
return haplotype;
|
120
|
}
|
121
|
|
122
|
public Set<Reference> getCitations() {
|
123
|
return citations;
|
124
|
}
|
125
|
}
|