2 * ================================================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ================================================================================
20 package org.openecomp.portalsdk.analytics.model.runtime;
22 import java.util.ArrayList;
25 import org.openecomp.portalsdk.analytics.view.ColumnHeader;
28 private String displayValue;
29 private String dataType;
31 //private boolean visible;
34 /*public boolean isVisible() {
37 public void setVisible(boolean visible) {
38 this.visible = visible;
40 public String getDisplayValue() {
43 public void setDisplayValue(String displayValue) {
44 this.displayValue = displayValue;
46 public String getDataType() {
49 public void setDataType(String dataType) {
50 this.dataType = dataType;
52 public String getColId() {
55 public void setColId(String colId) {
61 class IndexValueJSON {
65 public int getIndex() {
68 public void setIndex(int index) {
71 public String getValue() {
74 public void setValue(String value) {
77 public String getTitle() {
80 public void setTitle(String title) {
86 class DomainAxisJSON extends IndexValueJSON {}
88 class ChartColumnJSON extends IndexValueJSON {}
90 class ChartTypeJSON extends IndexValueJSON {}
92 class PieChartOptions {
96 public class ChartJSON {
98 private String reportID;
99 private String reportName;
100 private String reportDescr;
101 private String reportTitle;
102 private String reportSubTitle;
103 private ArrayList <FormFieldJSON> formFieldList;
104 private ArrayList <ChartColumnJSON> chartColumnJSONList;
105 private String formfield_comments;
106 private int totalRows;
107 private String chartSqlWhole;
108 private boolean chartAvailable;
109 private ChartTypeJSON chartTypeJSON;
110 private BarChartOptions barChartOptions;
111 private PieChartOptions pieChartOptions;
112 private TimeSeriesChartOptions timeSeriesChartOptions;
113 private FlexTimeSeriesChartOptions flexTimeSeriesChartOptions;
114 private CommonChartOptions commonChartOptions;
115 private String width;
116 private String height;
117 private boolean animation;
118 private String rotateLabels;
119 private boolean staggerLabels;
120 private boolean showTitle;
121 private DomainAxisJSON domainAxisJSON;
122 private CategoryAxisJSON categoryAxisJSON;
123 private boolean hasCategoryAxis;
126 public boolean isHasCategoryAxis() {
127 return hasCategoryAxis;
129 public void setHasCategoryAxis(boolean hasCategoryAxis) {
130 this.hasCategoryAxis = hasCategoryAxis;
132 private ArrayList <RangeAxisJSON> rangeAxisList;
133 private ArrayList <ArrayList<Row>> wholeList;
135 private String primaryAxisLabel;
136 private String secondaryAxisLabel;
137 private String minRange;
138 private String maxRange;
139 //private int topMargin;
140 //private int bottomMargin;
141 //private int leftMargin;
142 //private int rightMargin;
144 /*private boolean showMaxMin;
145 private boolean showLegend;
146 private boolean showControls;
147 private String topMargin;
148 private String bottomMargin;
149 private String leftMargin;
150 private String rightMargin;
151 private String subType;
152 private boolean stacked;
153 private boolean horizontalBar;
154 private boolean barRealTimeAxis;
155 private boolean barReduceXAxisLabels;
156 private boolean timeAxis;*/
158 public String getReportID() {
161 public void setReportID(String reportID) {
162 this.reportID = reportID;
164 public String getReportName() {
167 public void setReportName(String reportName) {
168 this.reportName = reportName;
170 public String getReportDescr() {
173 public void setReportDescr(String reportDescr) {
174 this.reportDescr = reportDescr;
176 public String getReportTitle() {
179 public void setReportTitle(String reportTitle) {
180 this.reportTitle = reportTitle;
182 public String getReportSubTitle() {
183 return reportSubTitle;
185 public void setReportSubTitle(String reportSubTitle) {
186 this.reportSubTitle = reportSubTitle;
188 public ArrayList<FormFieldJSON> getFormFieldList() {
189 return formFieldList;
191 public void setFormFieldList(ArrayList<FormFieldJSON> formFieldList) {
192 this.formFieldList = formFieldList;
194 public String getFormfield_comments() {
195 return formfield_comments;
197 public void setFormfield_comments(String formfield_comments) {
198 this.formfield_comments = formfield_comments;
200 public int getTotalRows() {
203 public void setTotalRows(int totalRows) {
204 this.totalRows = totalRows;
206 public String getChartSqlWhole() {
207 return chartSqlWhole;
209 public void setChartSqlWhole(String chartSqlWhole) {
210 this.chartSqlWhole = chartSqlWhole;
212 public boolean isChartAvailable() {
213 return chartAvailable;
215 public void setChartAvailable(boolean chartAvailable) {
216 this.chartAvailable = chartAvailable;
218 public String getWidth() {
221 public void setWidth(String width) {
224 public String getHeight() {
227 public void setHeight(String height) {
228 this.height = height;
230 public boolean isAnimation() {
233 public void setAnimation(boolean animation) {
234 this.animation = animation;
236 public String getRotateLabels() {
239 public void setRotateLabels(String rotateLabels) {
240 this.rotateLabels = rotateLabels;
242 public boolean isStaggerLabels() {
243 return staggerLabels;
245 public void setStaggerLabels(boolean staggerLabels) {
246 this.staggerLabels = staggerLabels;
248 public boolean isShowTitle() {
251 public void setShowTitle(boolean showTitle) {
252 this.showTitle = showTitle;
254 /*public boolean isShowMaxMin() {
257 public void setShowMaxMin(boolean showMaxMin) {
258 this.showMaxMin = showMaxMin;
260 public boolean isShowLegend() {
263 public void setShowLegend(boolean showLegend) {
264 this.showLegend = showLegend;
266 public boolean isShowControls() {
269 public void setShowControls(boolean showControls) {
270 this.showControls = showControls;
272 public String getTopMargin() {
275 public void setTopMargin(String topMargin) {
276 this.topMargin = topMargin;
278 public String getBottomMargin() {
281 public void setBottomMargin(String bottomMargin) {
282 this.bottomMargin = bottomMargin;
284 public String getLeftMargin() {
287 public void setLeftMargin(String leftMargin) {
288 this.leftMargin = leftMargin;
290 public String getRightMargin() {
293 public void setRightMargin(String rightMargin) {
294 this.rightMargin = rightMargin;
297 public String getSubType() {
300 public void setSubType(String subType) {
301 this.subType = subType;
303 public boolean isStacked() {
306 public void setStacked(boolean stacked) {
307 this.stacked = stacked;
309 public boolean isHorizontalBar() {
310 return horizontalBar;
312 public void setHorizontalBar(boolean horizontalBar) {
313 this.horizontalBar = horizontalBar;
315 public boolean isBarRealTimeAxis() {
316 return barRealTimeAxis;
318 public void setBarRealTimeAxis(boolean barRealTimeAxis) {
319 this.barRealTimeAxis = barRealTimeAxis;
321 public boolean isBarReduceXAxisLabels() {
322 return barReduceXAxisLabels;
324 public void setBarReduceXAxisLabels(boolean barReduceXAxisLabels) {
325 this.barReduceXAxisLabels = barReduceXAxisLabels;
327 public boolean isTimeAxis() {
330 public void setTimeAxis(boolean timeAxis) {
331 this.timeAxis = timeAxis;
333 public ChartTypeJSON getChartTypeJSON() {
334 return chartTypeJSON;
336 public void setChartTypeJSON(ChartTypeJSON chartTypeJSON) {
337 this.chartTypeJSON = chartTypeJSON;
339 public String getChartType() {
340 return chartTypeJSON.getValue();
342 public DomainAxisJSON getDomainAxisJSON() {
343 return domainAxisJSON;
345 public void setDomainAxisJSON(DomainAxisJSON domainAxisJSON) {
346 this.domainAxisJSON = domainAxisJSON;
348 public CategoryAxisJSON getCategoryAxisJSON() {
349 return categoryAxisJSON;
351 public void setCategoryAxisJSON(CategoryAxisJSON categoryAxisJSON) {
352 this.categoryAxisJSON = categoryAxisJSON;
354 public ArrayList<RangeAxisJSON> getRangeAxisList() {
355 return rangeAxisList;
357 public void setRangeAxisList(ArrayList<RangeAxisJSON> rangeAxisList) {
358 this.rangeAxisList = rangeAxisList;
360 public String getPrimaryAxisLabel() {
361 return primaryAxisLabel;
363 public void setPrimaryAxisLabel(String primaryAxisLabel) {
364 this.primaryAxisLabel = primaryAxisLabel;
366 public String getSecondaryAxisLabel() {
367 return secondaryAxisLabel;
369 public void setSecondaryAxisLabel(String secondaryAxisLabel) {
370 this.secondaryAxisLabel = secondaryAxisLabel;
372 public String getMinRange() {
375 public void setMinRange(String minRange) {
376 this.minRange = minRange;
378 public String getMaxRange() {
381 public void setMaxRange(String maxRange) {
382 this.maxRange = maxRange;
384 /*public ArrayList<Row> getRowList() {
387 public void setRowList(ArrayList<Row> rowList) {
388 this.rowList = rowList;
391 public ArrayList<ArrayList<Row>> getWholeList() {
394 public void setWholeList(ArrayList<ArrayList<Row>> wholeList) {
395 this.wholeList = wholeList;
397 //private ArrayList<ColumnHeader> reportDataColumns;
398 //private ArrayList<Map<String,Object>> reportDataRows;
399 public ArrayList<ChartColumnJSON> getChartColumnJSONList() {
400 return chartColumnJSONList;
402 public void setChartColumnJSONList(ArrayList<ChartColumnJSON> chartColumnJSONList) {
403 this.chartColumnJSONList = chartColumnJSONList;
406 public BarChartOptions getBarChartOptions() {
407 return barChartOptions;
409 public void setBarChartOptions(BarChartOptions barChartOptions) {
410 this.barChartOptions = barChartOptions;
412 public PieChartOptions getPieChartOptions() {
413 return pieChartOptions;
415 public void setPieChartOptions(PieChartOptions pieChartOptions) {
416 this.pieChartOptions = pieChartOptions;
418 public TimeSeriesChartOptions getTimeSeriesChartOptions() {
419 return timeSeriesChartOptions;
421 public void setTimeSeriesChartOptions(TimeSeriesChartOptions timeSeriesChartOptions) {
422 this.timeSeriesChartOptions = timeSeriesChartOptions;
424 public FlexTimeSeriesChartOptions getFlexTimeSeriesChartOptions() {
425 return flexTimeSeriesChartOptions;
427 public void setFlexTimeSeriesChartOptions(FlexTimeSeriesChartOptions flexTimeSeriesChartOptions) {
428 this.flexTimeSeriesChartOptions = flexTimeSeriesChartOptions;
430 public CommonChartOptions getCommonChartOptions() {
431 return commonChartOptions;
433 public void setCommonChartOptions(CommonChartOptions commonChartOptions) {
434 this.commonChartOptions = commonChartOptions;
437 public String getDomainAxis() {
438 if(getDomainAxisJSON() !=null)
439 return getDomainAxisJSON().getValue();
444 public String getCategoryAxis() {
445 if(getCategoryAxisJSON()!=null)
446 return getCategoryAxisJSON().getValue();