/
Signal.java
79 lines (68 loc) · 1.5 KB
/
Signal.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/**
* Project Zelula
*
* Contextproject TI2800
* TU Delft - University of Technology
*
* Authors:
* Felix Akkermans, Niels Doekemeijer, Thomas van Helden
* Albert ten Napel, Jan Pieter Waagmeester
*
* https://github.com/FelixAkk/synthbio
*/
package synthbio.models;
/**
* Signal representation
* @author jieter
*/
public class Signal{
/**
* References to Gates from and to this Signal flows.
*
* If from is null, the signal is an input of the circuit.
* If to is null, the signal is an output of the circuit.
*/
private Gate from;
private Gate to;
/**
* Protein representing this Signal.
*
* CDS could be used here aswell, but biologically it does not make
* sense since the signal is not the Coding Sequence, but just the
* protein which is producing it.
* It could also be derived from the CDS of this.from, but since
* the Signal object acts mainly as a bridge between the JSON
* representation and the Circuit model, we'll use an explicit field
* anyway.
*/
private String protein;
public Signal(Gate from, Gate to, String protein){
this.setFrom(from);
this.setTo(to);
this.setProtein(protein);
}
/*
* Getters
*/
public Gate getFrom(){
return this.from;
}
public Gate getTo(){
return this.to;
}
public String protein(){
return this.protein;
}
/*
* Setters
*/
public void setFrom(Gate from){
this.from=from;
}
public void setTo(Gate to){
this.to=to;
}
public void setProtein(String protein){
this.protein=protein;
}
}