Project

General

Profile

Download (3.81 KB) Statistics
| Branch: | Tag: | Revision:
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.media.Media;
17
import eu.etaxonomy.cdm.model.molecular.Sequence;
18
import eu.etaxonomy.cdm.model.molecular.SequenceString;
19
import eu.etaxonomy.cdm.model.molecular.SingleReadAlignment;
20
import eu.etaxonomy.cdm.model.reference.Reference;
21

    
22
/**
23
 * @author k.luther
24
 * @since 02.08.2018
25
 *
26
 */
27
public class SequenceDTO {
28

    
29
    private Media contigFile;
30

    
31
    private SequenceString consensusSequence;
32

    
33

    
34
    private Boolean isBarcode = null;
35

    
36

    
37
    private SequenceString barcodeSequencePart = SequenceString.NewInstance();
38

    
39

    
40
    private String geneticAccessionNumber;
41

    
42

    
43
    private String boldProcessId;
44

    
45

    
46
    private Set<SingleReadAlignment> singleReadAlignments = new HashSet<SingleReadAlignment>();
47

    
48

    
49
    private String dnaMarker;
50

    
51

    
52

    
53
    private String haplotype;
54

    
55

    
56
    private Set<Reference> citations = new HashSet<>();
57

    
58
    private URI boldUri;
59
    private URI ddbjUri;
60
    private URI emblUri;
61
    private URI genBankUri;
62

    
63
    public SequenceDTO(Sequence seq){
64
        contigFile = seq.getContigFile();
65
        consensusSequence = seq.getConsensusSequence();
66
        isBarcode = seq.getIsBarcode();
67
        barcodeSequencePart = seq.getBarcodeSequencePart();
68
        geneticAccessionNumber = seq.getGeneticAccessionNumber();
69
        boldProcessId = seq.getBoldProcessId();
70
        singleReadAlignments = seq.getSingleReadAlignments();
71
        dnaMarker = seq.getDnaMarker().getLabel();
72
        haplotype = seq.getHaplotype();
73
        citations = seq.getCitations();
74
        try{
75
            boldUri = seq.getBoldUri();
76
            ddbjUri = seq.getDdbjUri();
77
            emblUri = seq.getEmblUri();
78
            genBankUri = seq.getGenBankUri();
79
        } catch (URISyntaxException e){
80
//TODO
81
        }
82

    
83
    }
84

    
85

    
86

    
87
    /**
88
     * @return the boldUri
89
     */
90
    public URI getBoldUri() {
91
        return boldUri;
92
    }
93

    
94

    
95
    /**
96
     * @return the ddbjUri
97
     */
98
    public URI getDdbjUri() {
99
        return ddbjUri;
100
    }
101

    
102

    
103
    /**
104
     * @return the emblUri
105
     */
106
    public URI getEmblUri() {
107
        return emblUri;
108
    }
109

    
110

    
111
    /**
112
     * @return the genBankUri
113
     */
114
    public URI getGenBankUri() {
115
        return genBankUri;
116
    }
117

    
118

    
119
    /**
120
     * @return the contigFile
121
     */
122
    public Media getContigFile() {
123
        return contigFile;
124
    }
125

    
126

    
127
    /**
128
     * @return the consensusSequence
129
     */
130
    public SequenceString getConsensusSequence() {
131
        return consensusSequence;
132
    }
133

    
134

    
135
    /**
136
     * @return the isBarcode
137
     */
138
    public Boolean getIsBarcode() {
139
        return isBarcode;
140
    }
141

    
142

    
143
    /**
144
     * @return the barcodeSequencePart
145
     */
146
    public SequenceString getBarcodeSequencePart() {
147
        return barcodeSequencePart;
148
    }
149

    
150

    
151
    /**
152
     * @return the geneticAccessionNumber
153
     */
154
    public String getGeneticAccessionNumber() {
155
        return geneticAccessionNumber;
156
    }
157

    
158

    
159
    /**
160
     * @return the boldProcessId
161
     */
162
    public String getBoldProcessId() {
163
        return boldProcessId;
164
    }
165

    
166

    
167
    /**
168
     * @return the singleReadAlignments
169
     */
170
    public Set<SingleReadAlignment> getSingleReadAlignments() {
171
        return singleReadAlignments;
172
    }
173

    
174

    
175
    /**
176
     * @return the dnaMarker
177
     */
178
    public String getDnaMarker() {
179
        return dnaMarker;
180
    }
181

    
182

    
183
    /**
184
     * @return the haplotype
185
     */
186
    public String getHaplotype() {
187
        return haplotype;
188
    }
189

    
190

    
191
    /**
192
     * @return the citations
193
     */
194
    public Set<Reference> getCitations() {
195
        return citations;
196
    }
197
}
(23-23/30)