2 * Copyright (C) 2007 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.
10 package eu
.etaxonomy
.cdm
.model
.molecular
;
13 import eu
.etaxonomy
.cdm
.model
.reference
.ReferenceBase
;
14 import eu
.etaxonomy
.cdm
.model
.common
.IMediaDocumented
;
15 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableEntity
;
16 import eu
.etaxonomy
.cdm
.model
.common
.Media
;
17 import eu
.etaxonomy
.cdm
.model
.common
.IReferencedEntity
;
18 import org
.apache
.log4j
.Logger
;
22 import javax
.persistence
.*;
27 * @created 08-Nov-2007 13:06:51
30 public class Sequence
extends IdentifiableEntity
implements IReferencedEntity
, IMediaDocumented
{
31 static Logger logger
= Logger
.getLogger(Sequence
.class);
32 //the sequence as a string of base pairs. 5'->3'
33 private String sequence
;
34 //should be calculated in case sequence is set
35 private Integer length
;
36 //should be calculated in case sequence is set
37 private Calendar dateSequenced
;
38 //should be calculated in case sequence is set
39 private boolean isBarcode
;
40 //the sequence as a string of base pairs. 5'->3'
41 private String citationMicroReference
;
42 private ReferenceBase publishedIn
;
43 private Set
<ReferenceBase
> citations
= new HashSet();
44 private Set
<GenBankAccession
> genBankAccession
= new HashSet();
46 private Set
<Media
> chromatograms
= new HashSet();
49 public Locus
getLocus(){
52 public void setLocus(Locus locus
){
57 public ReferenceBase
getPublishedIn(){
58 return this.publishedIn
;
60 public void setPublishedIn(ReferenceBase publishedIn
){
61 this.publishedIn
= publishedIn
;
67 public Set
<ReferenceBase
> getCitations() {
70 protected void setCitations(Set
<ReferenceBase
> citations
) {
71 this.citations
= citations
;
73 public void addCitation(ReferenceBase citation
) {
74 this.citations
.add(citation
);
76 public void removeCitation(ReferenceBase citation
) {
77 this.citations
.remove(citation
);
82 public Set
<GenBankAccession
> getGenBankAccession() {
83 return genBankAccession
;
86 protected void setGenBankAccession(Set
<GenBankAccession
> genBankAccession
) {
87 this.genBankAccession
= genBankAccession
;
89 public void addGenBankAccession(GenBankAccession genBankAccession
) {
90 this.genBankAccession
.add(genBankAccession
);
92 public void removeGenBankAccession(GenBankAccession genBankAccession
) {
93 this.genBankAccession
.remove(genBankAccession
);
98 public Set
<Media
> getChromatograms() {
102 protected void setChromatograms(Set
<Media
> chromatograms
) {
103 this.chromatograms
= chromatograms
;
105 public void addChromatogram(Media chromatogram
) {
106 this.chromatograms
.add(chromatogram
);
108 public void removeChromatogram(Media chromatogram
) {
109 this.chromatograms
.remove(chromatogram
);
113 public Set
<Media
> getMedia() {
114 return getChromatograms();
118 public String
getSequence(){
119 return this.sequence
;
124 * @param sequence sequence
126 public void setSequence(String sequence
){
127 this.sequence
= sequence
;
130 public Integer
getLength(){
136 * @param length length
138 public void setLength(Integer length
){
139 this.length
= length
;
142 @Temporal(TemporalType
.DATE
)
143 public Calendar
getDateSequenced(){
144 return this.dateSequenced
;
149 * @param dateSequenced dateSequenced
151 public void setDateSequenced(Calendar dateSequenced
){
152 this.dateSequenced
= dateSequenced
;
155 public boolean isBarcode(){
156 return this.isBarcode
;
161 * @param isBarcode isBarcode
163 public void setBarcode(boolean isBarcode
){
164 this.isBarcode
= isBarcode
;
167 public String
getCitationMicroReference(){
168 return this.citationMicroReference
;
173 * @param citationMicroReference citationMicroReference
175 public void setCitationMicroReference(String citationMicroReference
){
176 this.citationMicroReference
= citationMicroReference
;
179 public String
generateTitle(){
184 public ReferenceBase
getCitation(){