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 <RangeAxisJSON> rangeAxisRemoveList;
135 private ArrayList <ArrayList<Row>> wholeList;
137 private String primaryAxisLabel;
138 private String secondaryAxisLabel;
139 private String minRange;
140 private String maxRange;
141 //private int topMargin;
142 //private int bottomMargin;
143 //private int leftMargin;
144 //private int rightMargin;
146 /*private boolean showMaxMin;
147 private boolean showLegend;
148 private boolean showControls;
149 private String topMargin;
150 private String bottomMargin;
151 private String leftMargin;
152 private String rightMargin;
153 private String subType;
154 private boolean stacked;
155 private boolean horizontalBar;
156 private boolean barRealTimeAxis;
157 private boolean barReduceXAxisLabels;
158 private boolean timeAxis;*/
160 public String getReportID() {
163 public void setReportID(String reportID) {
164 this.reportID = reportID;
166 public String getReportName() {
169 public void setReportName(String reportName) {
170 this.reportName = reportName;
172 public String getReportDescr() {
175 public void setReportDescr(String reportDescr) {
176 this.reportDescr = reportDescr;
178 public String getReportTitle() {
181 public void setReportTitle(String reportTitle) {
182 this.reportTitle = reportTitle;
184 public String getReportSubTitle() {
185 return reportSubTitle;
187 public void setReportSubTitle(String reportSubTitle) {
188 this.reportSubTitle = reportSubTitle;
190 public ArrayList<FormFieldJSON> getFormFieldList() {
191 return formFieldList;
193 public void setFormFieldList(ArrayList<FormFieldJSON> formFieldList) {
194 this.formFieldList = formFieldList;
196 public String getFormfield_comments() {
197 return formfield_comments;
199 public void setFormfield_comments(String formfield_comments) {
200 this.formfield_comments = formfield_comments;
202 public int getTotalRows() {
205 public void setTotalRows(int totalRows) {
206 this.totalRows = totalRows;
208 public String getChartSqlWhole() {
209 return chartSqlWhole;
211 public void setChartSqlWhole(String chartSqlWhole) {
212 this.chartSqlWhole = chartSqlWhole;
214 public boolean isChartAvailable() {
215 return chartAvailable;
217 public void setChartAvailable(boolean chartAvailable) {
218 this.chartAvailable = chartAvailable;
220 public String getWidth() {
223 public void setWidth(String width) {
226 public String getHeight() {
229 public void setHeight(String height) {
230 this.height = height;
232 public boolean isAnimation() {
235 public void setAnimation(boolean animation) {
236 this.animation = animation;
238 public String getRotateLabels() {
241 public void setRotateLabels(String rotateLabels) {
242 this.rotateLabels = rotateLabels;
244 public boolean isStaggerLabels() {
245 return staggerLabels;
247 public void setStaggerLabels(boolean staggerLabels) {
248 this.staggerLabels = staggerLabels;
250 public boolean isShowTitle() {
253 public void setShowTitle(boolean showTitle) {
254 this.showTitle = showTitle;
256 /*public boolean isShowMaxMin() {
259 public void setShowMaxMin(boolean showMaxMin) {
260 this.showMaxMin = showMaxMin;
262 public boolean isShowLegend() {
265 public void setShowLegend(boolean showLegend) {
266 this.showLegend = showLegend;
268 public boolean isShowControls() {
271 public void setShowControls(boolean showControls) {
272 this.showControls = showControls;
274 public String getTopMargin() {
277 public void setTopMargin(String topMargin) {
278 this.topMargin = topMargin;
280 public String getBottomMargin() {
283 public void setBottomMargin(String bottomMargin) {
284 this.bottomMargin = bottomMargin;
286 public String getLeftMargin() {
289 public void setLeftMargin(String leftMargin) {
290 this.leftMargin = leftMargin;
292 public String getRightMargin() {
295 public void setRightMargin(String rightMargin) {
296 this.rightMargin = rightMargin;
299 public String getSubType() {
302 public void setSubType(String subType) {
303 this.subType = subType;
305 public boolean isStacked() {
308 public void setStacked(boolean stacked) {
309 this.stacked = stacked;
311 public boolean isHorizontalBar() {
312 return horizontalBar;
314 public void setHorizontalBar(boolean horizontalBar) {
315 this.horizontalBar = horizontalBar;
317 public boolean isBarRealTimeAxis() {
318 return barRealTimeAxis;
320 public void setBarRealTimeAxis(boolean barRealTimeAxis) {
321 this.barRealTimeAxis = barRealTimeAxis;
323 public boolean isBarReduceXAxisLabels() {
324 return barReduceXAxisLabels;
326 public void setBarReduceXAxisLabels(boolean barReduceXAxisLabels) {
327 this.barReduceXAxisLabels = barReduceXAxisLabels;
329 public boolean isTimeAxis() {
332 public void setTimeAxis(boolean timeAxis) {
333 this.timeAxis = timeAxis;
335 public ChartTypeJSON getChartTypeJSON() {
336 return chartTypeJSON;
338 public void setChartTypeJSON(ChartTypeJSON chartTypeJSON) {
339 this.chartTypeJSON = chartTypeJSON;
341 public String getChartType() {
342 return chartTypeJSON.getValue();
344 public DomainAxisJSON getDomainAxisJSON() {
345 return domainAxisJSON;
347 public void setDomainAxisJSON(DomainAxisJSON domainAxisJSON) {
348 this.domainAxisJSON = domainAxisJSON;
350 public CategoryAxisJSON getCategoryAxisJSON() {
351 return categoryAxisJSON;
353 public void setCategoryAxisJSON(CategoryAxisJSON categoryAxisJSON) {
354 this.categoryAxisJSON = categoryAxisJSON;
356 public ArrayList<RangeAxisJSON> getRangeAxisList() {
357 return rangeAxisList;
359 public void setRangeAxisList(ArrayList<RangeAxisJSON> rangeAxisList) {
360 this.rangeAxisList = rangeAxisList;
362 public String getPrimaryAxisLabel() {
363 return primaryAxisLabel;
365 public void setPrimaryAxisLabel(String primaryAxisLabel) {
366 this.primaryAxisLabel = primaryAxisLabel;
368 public String getSecondaryAxisLabel() {
369 return secondaryAxisLabel;
371 public void setSecondaryAxisLabel(String secondaryAxisLabel) {
372 this.secondaryAxisLabel = secondaryAxisLabel;
374 public String getMinRange() {
377 public void setMinRange(String minRange) {
378 this.minRange = minRange;
380 public String getMaxRange() {
383 public void setMaxRange(String maxRange) {
384 this.maxRange = maxRange;
386 /*public ArrayList<Row> getRowList() {
389 public void setRowList(ArrayList<Row> rowList) {
390 this.rowList = rowList;
393 public ArrayList<ArrayList<Row>> getWholeList() {
396 public void setWholeList(ArrayList<ArrayList<Row>> wholeList) {
397 this.wholeList = wholeList;
399 //private ArrayList<ColumnHeader> reportDataColumns;
400 //private ArrayList<Map<String,Object>> reportDataRows;
401 public ArrayList<ChartColumnJSON> getChartColumnJSONList() {
402 return chartColumnJSONList;
404 public void setChartColumnJSONList(ArrayList<ChartColumnJSON> chartColumnJSONList) {
405 this.chartColumnJSONList = chartColumnJSONList;
408 public BarChartOptions getBarChartOptions() {
409 return barChartOptions;
411 public void setBarChartOptions(BarChartOptions barChartOptions) {
412 this.barChartOptions = barChartOptions;
414 public PieChartOptions getPieChartOptions() {
415 return pieChartOptions;
417 public void setPieChartOptions(PieChartOptions pieChartOptions) {
418 this.pieChartOptions = pieChartOptions;
420 public TimeSeriesChartOptions getTimeSeriesChartOptions() {
421 return timeSeriesChartOptions;
423 public void setTimeSeriesChartOptions(TimeSeriesChartOptions timeSeriesChartOptions) {
424 this.timeSeriesChartOptions = timeSeriesChartOptions;
426 public FlexTimeSeriesChartOptions getFlexTimeSeriesChartOptions() {
427 return flexTimeSeriesChartOptions;
429 public void setFlexTimeSeriesChartOptions(FlexTimeSeriesChartOptions flexTimeSeriesChartOptions) {
430 this.flexTimeSeriesChartOptions = flexTimeSeriesChartOptions;
432 public CommonChartOptions getCommonChartOptions() {
433 return commonChartOptions;
435 public void setCommonChartOptions(CommonChartOptions commonChartOptions) {
436 this.commonChartOptions = commonChartOptions;
439 public String getDomainAxis() {
440 if(getDomainAxisJSON() !=null)
441 return getDomainAxisJSON().getValue();
446 public String getCategoryAxis() {
447 if(getCategoryAxisJSON()!=null)
448 return getCategoryAxisJSON().getValue();
452 public ArrayList<RangeAxisJSON> getRangeAxisRemoveList() {
453 return rangeAxisRemoveList;
455 public void setRangeAxisRemoveList(ArrayList<RangeAxisJSON> rangeAxisRemoveList) {
456 this.rangeAxisRemoveList = rangeAxisRemoveList;