1
|
/**
|
2
|
* Copyright (C) 2007 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
|
|
10
|
package eu.etaxonomy.cdm.model.molecular;
|
11
|
|
12
|
|
13
|
import eu.etaxonomy.cdm.model.occurrence.Collection;
|
14
|
import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
|
15
|
import eu.etaxonomy.cdm.model.occurrence.Specimen;
|
16
|
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
|
17
|
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
|
18
|
import org.apache.log4j.Logger;
|
19
|
|
20
|
import java.util.*;
|
21
|
|
22
|
import javax.persistence.*;
|
23
|
|
24
|
/**
|
25
|
* @author m.doering
|
26
|
* @version 1.0
|
27
|
* @created 08-Nov-2007 13:06:22
|
28
|
*/
|
29
|
@Entity
|
30
|
public class DnaSample extends Specimen {
|
31
|
static Logger logger = Logger.getLogger(DnaSample.class);
|
32
|
private String bankNumber;
|
33
|
private Set<Sequence> sequences = new HashSet();
|
34
|
|
35
|
@OneToMany
|
36
|
public Set<Sequence> getSequences() {
|
37
|
return sequences;
|
38
|
}
|
39
|
protected void setSequences(Set<Sequence> sequences) {
|
40
|
this.sequences = sequences;
|
41
|
}
|
42
|
public void addSequences(Sequence sequence) {
|
43
|
this.sequences.add(sequence);
|
44
|
}
|
45
|
public void removeSequences(Sequence sequence) {
|
46
|
this.sequences.remove(sequence);
|
47
|
}
|
48
|
|
49
|
|
50
|
@Transient
|
51
|
public Collection getStoredAt(){
|
52
|
return this.getCollection();
|
53
|
}
|
54
|
public void setStoredAt(Collection storedAt){
|
55
|
this.setCollection(storedAt);
|
56
|
}
|
57
|
|
58
|
@Transient
|
59
|
public Set<SpecimenOrObservationBase> getExtractedFrom(){
|
60
|
return getOriginals();
|
61
|
}
|
62
|
|
63
|
@Transient
|
64
|
public String getBankNumber(){
|
65
|
return this.getCatalogNumber();
|
66
|
}
|
67
|
public void setBankNumber(String bankNumber){
|
68
|
this.setCatalogNumber(bankNumber);
|
69
|
}
|
70
|
|
71
|
}
|