summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/sdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ChartJSON.java
blob: 85f8dc8a5770be22d44130dc90b6d4a09095c6bb (plain)
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
/*-
 * ================================================================================
 * eCOMP Portal SDK
 * ================================================================================
 * Copyright (C) 2017 AT&T Intellectual Property
 * ================================================================================
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ================================================================================
 */
package org.openecomp.portalsdk.analytics.model.runtime;

import java.util.ArrayList;

class Row {
	private String displayValue;
	private String dataType;
	private String colId;
	//private boolean visible;
	
	
	/*public boolean isVisible() {
		return visible;
	}
	public void setVisible(boolean visible) {
		this.visible = visible;
	}*/
	public String getDisplayValue() {
		return displayValue;
	}
	public void setDisplayValue(String displayValue) {
		this.displayValue = displayValue;
	}
	public String getDataType() {
		return dataType;
	}
	public void setDataType(String dataType) {
		this.dataType = dataType;
	}
	public String getColId() {
		return colId;
	}
	public void setColId(String colId) {
		this.colId = colId;
	}
	
	
}
class IndexValueJSON {
	private int index;
	private String value;
	private String title;
	public int getIndex() {
		return index;
	}
	public void setIndex(int index) {
		this.index = index;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	
}

class DomainAxisJSON   		extends IndexValueJSON {}

class ChartColumnJSON  		extends IndexValueJSON {}

class ChartTypeJSON    		extends IndexValueJSON {}

class PieChartOptions {
	
}

public class ChartJSON {
	
	private String reportID;
	private String reportName;
	private String reportDescr;
	private String reportTitle;
	private String reportSubTitle;
	private ArrayList <FormFieldJSON> formFieldList;
	private ArrayList <ChartColumnJSON> chartColumnJSONList;
	private String formfield_comments;
	private int totalRows;
	private String chartSqlWhole;
	private boolean chartAvailable;
	private ChartTypeJSON chartTypeJSON;
	private BarChartOptions barChartOptions;
	private PieChartOptions pieChartOptions;
	private TimeSeriesChartOptions timeSeriesChartOptions;
	private FlexTimeSeriesChartOptions flexTimeSeriesChartOptions;
	private CommonChartOptions commonChartOptions;
	private String width;
	private String height;
	private boolean animation;
	private String rotateLabels;
	private boolean staggerLabels;
	private boolean showTitle;
	private DomainAxisJSON domainAxisJSON;
	private CategoryAxisJSON categoryAxisJSON;
	private boolean hasCategoryAxis;
	
	
	public boolean isHasCategoryAxis() {
		return hasCategoryAxis;
	}
	public void setHasCategoryAxis(boolean hasCategoryAxis) {
		this.hasCategoryAxis = hasCategoryAxis;
	}
	private ArrayList <RangeAxisJSON> rangeAxisList;
	private ArrayList <ArrayList<Row>> wholeList;

	private String primaryAxisLabel;
	private String secondaryAxisLabel;
	private String minRange;
	private String maxRange;
	//private int topMargin;
	//private int bottomMargin;
	//private int leftMargin;
	//private int rightMargin;
	
	/*private boolean showMaxMin;
	private boolean showLegend;
	private boolean showControls;
	private String topMargin;
	private String bottomMargin;
	private String leftMargin;
	private String rightMargin;
	private String subType;
	private boolean stacked;
	private boolean horizontalBar;
	private boolean barRealTimeAxis;
	private boolean barReduceXAxisLabels;
	private boolean timeAxis;*/
	
	public String getReportID() {
		return reportID;
	}
	public void setReportID(String reportID) {
		this.reportID = reportID;
	}
	public String getReportName() {
		return reportName;
	}
	public void setReportName(String reportName) {
		this.reportName = reportName;
	}
	public String getReportDescr() {
		return reportDescr;
	}
	public void setReportDescr(String reportDescr) {
		this.reportDescr = reportDescr;
	}
	public String getReportTitle() {
		return reportTitle;
	}
	public void setReportTitle(String reportTitle) {
		this.reportTitle = reportTitle;
	}
	public String getReportSubTitle() {
		return reportSubTitle;
	}
	public void setReportSubTitle(String reportSubTitle) {
		this.reportSubTitle = reportSubTitle;
	}
	public ArrayList<FormFieldJSON> getFormFieldList() {
		return formFieldList;
	}
	public void setFormFieldList(ArrayList<FormFieldJSON> formFieldList) {
		this.formFieldList = formFieldList;
	}
	public String getFormfield_comments() {
		return formfield_comments;
	}
	public void setFormfield_comments(String formfield_comments) {
		this.formfield_comments = formfield_comments;
	}
	public int getTotalRows() {
		return totalRows;
	}
	public void setTotalRows(int totalRows) {
		this.totalRows = totalRows;
	}
	public String getChartSqlWhole() {
		return chartSqlWhole;
	}
	public void setChartSqlWhole(String chartSqlWhole) {
		this.chartSqlWhole = chartSqlWhole;
	}
	public boolean isChartAvailable() {
		return chartAvailable;
	}
	public void setChartAvailable(boolean chartAvailable) {
		this.chartAvailable = chartAvailable;
	}
	public String getWidth() {
		return width;
	}
	public void setWidth(String width) {
		this.width = width;
	}
	public String getHeight() {
		return height;
	}
	public void setHeight(String height) {
		this.height = height;
	}
	public boolean isAnimation() {
		return animation;
	}
	public void setAnimation(boolean animation) {
		this.animation = animation;
	}
	public String getRotateLabels() {
		return rotateLabels;
	}
	public void setRotateLabels(String rotateLabels) {
		this.rotateLabels = rotateLabels;
	}
	public boolean isStaggerLabels() {
		return staggerLabels;
	}
	public void setStaggerLabels(boolean staggerLabels) {
		this.staggerLabels = staggerLabels;
	}
	public boolean isShowTitle() {
		return showTitle;
	}
	public void setShowTitle(boolean showTitle) {
		this.showTitle = showTitle;
	}	
	/*public boolean isShowMaxMin() {
		return showMaxMin;
	}
	public void setShowMaxMin(boolean showMaxMin) {
		this.showMaxMin = showMaxMin;
	}
	public boolean isShowLegend() {
		return showLegend;
	}
	public void setShowLegend(boolean showLegend) {
		this.showLegend = showLegend;
	}
	public boolean isShowControls() {
		return showControls;
	}
	public void setShowControls(boolean showControls) {
		this.showControls = showControls;
	}
	public String getTopMargin() {
		return topMargin;
	}
	public void setTopMargin(String topMargin) {
		this.topMargin = topMargin;
	}
	public String getBottomMargin() {
		return bottomMargin;
	}
	public void setBottomMargin(String bottomMargin) {
		this.bottomMargin = bottomMargin;
	}
	public String getLeftMargin() {
		return leftMargin;
	}
	public void setLeftMargin(String leftMargin) {
		this.leftMargin = leftMargin;
	}
	public String getRightMargin() {
		return rightMargin;
	}
	public void setRightMargin(String rightMargin) {
		this.rightMargin = rightMargin;
	}

	public String getSubType() {
		return subType;
	}
	public void setSubType(String subType) {
		this.subType = subType;
	}
	public boolean isStacked() {
		return stacked;
	}
	public void setStacked(boolean stacked) {
		this.stacked = stacked;
	}
	public boolean isHorizontalBar() {
		return horizontalBar;
	}
	public void setHorizontalBar(boolean horizontalBar) {
		this.horizontalBar = horizontalBar;
	}
	public boolean isBarRealTimeAxis() {
		return barRealTimeAxis;
	}
	public void setBarRealTimeAxis(boolean barRealTimeAxis) {
		this.barRealTimeAxis = barRealTimeAxis;
	}
	public boolean isBarReduceXAxisLabels() {
		return barReduceXAxisLabels;
	}
	public void setBarReduceXAxisLabels(boolean barReduceXAxisLabels) {
		this.barReduceXAxisLabels = barReduceXAxisLabels;
	}
	public boolean isTimeAxis() {
		return timeAxis;
	}
	public void setTimeAxis(boolean timeAxis) {
		this.timeAxis = timeAxis;
	}*/
	public ChartTypeJSON getChartTypeJSON() {
		return chartTypeJSON;
	}
	public void setChartTypeJSON(ChartTypeJSON chartTypeJSON) {
		this.chartTypeJSON = chartTypeJSON;
	}
	public String getChartType() {
		return chartTypeJSON.getValue();
	}	
	public DomainAxisJSON getDomainAxisJSON() {
		return domainAxisJSON;
	}
	public void setDomainAxisJSON(DomainAxisJSON domainAxisJSON) {
		this.domainAxisJSON = domainAxisJSON;
	}
	public CategoryAxisJSON getCategoryAxisJSON() {
		return categoryAxisJSON;
	}
	public void setCategoryAxisJSON(CategoryAxisJSON categoryAxisJSON) {
		this.categoryAxisJSON = categoryAxisJSON;
	}
	public ArrayList<RangeAxisJSON> getRangeAxisList() {
		return rangeAxisList;
	}
	public void setRangeAxisList(ArrayList<RangeAxisJSON> rangeAxisList) {
		this.rangeAxisList = rangeAxisList;
	}
	public String getPrimaryAxisLabel() {
		return primaryAxisLabel;
	}
	public void setPrimaryAxisLabel(String primaryAxisLabel) {
		this.primaryAxisLabel = primaryAxisLabel;
	}
	public String getSecondaryAxisLabel() {
		return secondaryAxisLabel;
	}
	public void setSecondaryAxisLabel(String secondaryAxisLabel) {
		this.secondaryAxisLabel = secondaryAxisLabel;
	}
	public String getMinRange() {
		return minRange;
	}
	public void setMinRange(String minRange) {
		this.minRange = minRange;
	}
	public String getMaxRange() {
		return maxRange;
	}
	public void setMaxRange(String maxRange) {
		this.maxRange = maxRange;
	}
	/*public ArrayList<Row> getRowList() {
		return rowList;
	}
	public void setRowList(ArrayList<Row> rowList) {
		this.rowList = rowList;
	}*/
	
	public ArrayList<ArrayList<Row>> getWholeList() {
		return wholeList;
	}
	public void setWholeList(ArrayList<ArrayList<Row>> wholeList) {
		this.wholeList = wholeList;
	}	
	//private ArrayList<ColumnHeader> reportDataColumns;
	//private ArrayList<Map<String,Object>> reportDataRows;
	public ArrayList<ChartColumnJSON> getChartColumnJSONList() {
		return chartColumnJSONList;
	}
	public void setChartColumnJSONList(ArrayList<ChartColumnJSON> chartColumnJSONList) {
		this.chartColumnJSONList = chartColumnJSONList;
	}

	public BarChartOptions getBarChartOptions() {
		return barChartOptions;
	}
	public void setBarChartOptions(BarChartOptions barChartOptions) {
		this.barChartOptions = barChartOptions;
	}
	public PieChartOptions getPieChartOptions() {
		return pieChartOptions;
	}
	public void setPieChartOptions(PieChartOptions pieChartOptions) {
		this.pieChartOptions = pieChartOptions;
	}
	public TimeSeriesChartOptions getTimeSeriesChartOptions() {
		return timeSeriesChartOptions;
	}
	public void setTimeSeriesChartOptions(TimeSeriesChartOptions timeSeriesChartOptions) {
		this.timeSeriesChartOptions = timeSeriesChartOptions;
	}
	public FlexTimeSeriesChartOptions getFlexTimeSeriesChartOptions() {
		return flexTimeSeriesChartOptions;
	}
	public void setFlexTimeSeriesChartOptions(FlexTimeSeriesChartOptions flexTimeSeriesChartOptions) {
		this.flexTimeSeriesChartOptions = flexTimeSeriesChartOptions;
	}
	public CommonChartOptions getCommonChartOptions() {
		return commonChartOptions;
	}
	public void setCommonChartOptions(CommonChartOptions commonChartOptions) {
		this.commonChartOptions = commonChartOptions;
	}
	
	public String getDomainAxis() {
		if(getDomainAxisJSON() !=null)
			return getDomainAxisJSON().getValue();
		else
			return "";
	}

	public String getCategoryAxis() {
		if(getCategoryAxisJSON()!=null)
			return getCategoryAxisJSON().getValue();
		else
			return "";
	}
	
}