1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.hadoop.chukwa.hicc.bean;
20
21 import java.util.ArrayList;
22
23 import javax.xml.bind.annotation.XmlAccessType;
24 import javax.xml.bind.annotation.XmlAccessorType;
25 import javax.xml.bind.annotation.XmlElement;
26 import javax.xml.bind.annotation.XmlRootElement;
27 import javax.xml.bind.annotation.XmlType;
28
29 @XmlRootElement
30 @XmlAccessorType(XmlAccessType.FIELD)
31 @XmlType(propOrder={})
32 public class Heatmap {
33 @XmlElement
34 private ArrayList<HeatMapPoint> data;
35 @XmlElement
36 private double max = 1.0;
37 @XmlElement
38 private int radius;
39 @XmlElement
40 private int series;
41
42 public Heatmap() {
43 this.data = new ArrayList<HeatMapPoint>();
44 }
45
46 public void put(int x, int y, double v) {
47 HeatMapPoint point = new HeatMapPoint(x, y, v);
48 data.add(point);
49 }
50
51 public ArrayList<HeatMapPoint> getHeatmap() {
52 return data;
53 }
54
55 public double getMax() {
56 return max;
57 }
58
59 public void putMax(double max) {
60 this.max = max;
61 }
62
63 public int getRadius() {
64 return radius;
65 }
66
67 public void putRadius(int radius) {
68 this.radius = radius;
69 }
70
71 public int getSeries() {
72 return series;
73 }
74
75 public void putSeries(int series) {
76 this.series = series;
77 }
78 }