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 package org.utgenome.gwt.utgb.client.bio;
26
27 import java.io.Serializable;
28 import java.util.ArrayList;
29 import java.util.HashMap;
30
31
32
33
34
35
36
37 public class WigGraphData implements Serializable {
38
39
40
41 private static final long serialVersionUID = 1L;
42
43
44
45 int trackId = -1;
46 float maxValue = Float.MIN_VALUE;
47 float minValue = Float.MAX_VALUE;
48
49 ArrayList<String> browser = null;
50 HashMap<String, String> track = null;
51 HashMap<Integer, Float> data = null;
52
53 public int getTrack_id() {
54 return trackId;
55 }
56
57 public void setTrack_id(int track_id) {
58 this.trackId = track_id;
59 }
60
61 public float getMinValue() {
62 return minValue;
63 }
64
65 public void setMinValue(float minValue) {
66 this.minValue = minValue;
67 }
68
69 public float getMaxValue() {
70 return maxValue;
71 }
72
73 public void setMaxValue(float maxValue) {
74 this.maxValue = maxValue;
75 }
76
77 public ArrayList<String> getBrowser() {
78 return browser;
79 }
80
81 public void setBrowser(ArrayList<String> browser) {
82 this.browser = browser;
83 }
84
85 public HashMap<String, String> getTrack() {
86 return track;
87 }
88
89 public void setTrack(HashMap<String, String> track) {
90 this.track = track;
91 }
92
93 public HashMap<Integer, Float> getData() {
94 return data;
95 }
96
97 public void setData(HashMap<Integer, Float> data) {
98 this.data = data;
99 }
100
101 public String toString() {
102 StringBuilder sb = new StringBuilder();
103
104 if (track.isEmpty())
105 return null;
106
107 sb.append("TrackID:" + trackId + "(");
108 if (!browser.isEmpty()) {
109 for (String s : browser) {
110 sb.append(s + ", ");
111 }
112 sb.delete(sb.lastIndexOf(","), sb.length()).append("), (");
113 }
114
115 if (!track.isEmpty()) {
116 for (String s : track.keySet()) {
117 sb.append(s + "=" + track.get(s) + ", ");
118 }
119 sb.delete(sb.lastIndexOf(","), sb.length()).append("), (");
120 }
121 if (!data.isEmpty()) {
122 for (int l : data.keySet()) {
123 sb.append(l + ":" + data.get(l) + ", ");
124 }
125 }
126 if (!sb.equals(""))
127 sb.delete(sb.lastIndexOf(","), sb.length()).append(")");
128
129 return sb.toString();
130 }
131 }