001: /*********************************************************************************
002: * The contents of this file are subject to the OpenI Public License Version 1.0
003: * ("License"); You may not use this file except in compliance with the
004: * License. You may obtain a copy of the License at
005: * http://www.openi.org/docs/LICENSE.txt
006: *
007: * Software distributed under the License is distributed on an "AS IS" basis,
008: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
009: * the specific language governing rights and limitations under the License.
010: *
011: * The Original Code is: OpenI Open Source
012: *
013: * The Initial Developer of the Original Code is Loyalty Matrix, Inc.
014: * Portions created by Loyalty Matrix, Inc. are
015: * Copyright (C) 2005 Loyalty Matrix, Inc.; All Rights Reserved.
016: *
017: * Contributor(s): ______________________________________.
018: *
019: ********************************************************************************/package org.openi.analysis;
020:
021: import java.io.*;
022:
023: /**
024: * @author plucas
025: *
026: * TODO To change the template for this generated type comment go to
027: * Window - Preferences - Java - Code Style - Code Templates
028: */
029: public class Analysis implements Serializable {
030: /*
031: Although default values are already defined in EnhancedCharComponent,
032: default values for properties are required while creating new analysis.
033: */
034: private String analysisTitle = null;
035: private String mdxQuery = null;
036: private String dataSourceName = null;
037: private String colorPaletteName = null;
038:
039: /*As there is no float type formatter in com.tonbeller.wcf.format.BasicTypes class, making
040: foregroundAlpha as double type. But in library, this field of float type. So need to cast into
041: float type while setting foreground alpha for chart*/
042: private double foregroundAlpha = 1.0; //default to no transparency
043: private boolean showPareto = false;
044: private boolean showChart = true;
045: private boolean showTable = true;
046:
047: //chart
048: private String chartTitle = "";
049: private int chartType = 1; //vertical bar
050: private int chartHeight = 300;
051: private int chartWidth = 500;
052: private String fontName = "SansSerif";
053: private int fontStyle = 1; //bold
054: private int fontSize = 18;
055: private boolean useChartSize = false; // chart size based on saved width and height.
056:
057: //legend
058: private boolean showLegend = true;
059: private String legendFontName = "SansSerif";
060: private int legendFontStyle = 0; //plain
061: private int legendFontSize = 10;
062: private int legendPosition = 2; //right side of chart
063:
064: //slicer
065: private boolean showSlicer = true;
066: private int slicerPosition = 1; //top
067: private int slicerAlignment = 4; //center
068: private String slicerFontName = "SansSerif";
069: private int slicerFontStyle = 0; //plain
070: private int slicerFontSize = 12;
071:
072: //axes
073: private String axisFontName = "SansSerif";
074: private int axisFontStyle = 0; //plain
075: private int axisFontSize = 12;
076: private String horizAxisLabel = "";
077: private String vertAxisLabel = "";
078: private String axisTickFontName = "SansSerif";
079: private int axisTickFontStyle = 0; //plain
080: private int axisTickFontSize = 10;
081: private boolean drillThroughEnabled = false;
082: private boolean drillReplaceEnabled = false;
083: private boolean drillPositionEnabled = false;
084:
085: private int tickLabelRotate = 30; //30 degree
086: private int bgColorR = 255;
087: private int bgColorG = 255;
088: private int bgColorB = 255;
089:
090: // show parents
091: private boolean levelStyle = false;
092:
093: // hide spans
094: private boolean hideSpans = false;
095:
096: //added for drillthrough
097: private String drillthroughSQL = "";
098: private String drillthroughDatasource = "";
099: private String description;
100:
101: public Analysis() {
102: }
103:
104: /**
105: *
106: * @return String
107: */
108: public String getAnalysisTitle() {
109: return analysisTitle;
110: }
111:
112: /**
113: *
114: * @return String
115: */
116: public String getAxisFontName() {
117: return axisFontName;
118: }
119:
120: /**
121: *
122: * @return int
123: */
124: public int getAxisFontSize() {
125: return axisFontSize;
126: }
127:
128: /**
129: *
130: * @return int
131: */
132: public int getAxisFontStyle() {
133: return axisFontStyle;
134: }
135:
136: /*
137: public String getCatalog() {
138: return catalog;
139: }
140: */
141:
142: /**
143: *
144: * @return int
145: */
146: public int getChartHeight() {
147: return chartHeight;
148: }
149:
150: /**
151: *
152: * @return String
153: */
154: public String getChartTitle() {
155: return chartTitle;
156: }
157:
158: /**
159: *
160: * @return int
161: */
162: public int getChartType() {
163: return chartType;
164: }
165:
166: /**
167: *
168: * @return int
169: */
170: public int getChartWidth() {
171: return chartWidth;
172: }
173:
174: /**
175: *
176: * @return boolean
177: */
178: public boolean isDrillThroughEnabled() {
179: return drillThroughEnabled;
180: }
181:
182: /**
183: *
184: * @return String
185: */
186: public String getFontName() {
187: return fontName;
188: }
189:
190: /**
191: *
192: * @return int
193: */
194: public int getFontSize() {
195: return fontSize;
196: }
197:
198: /**
199: *
200: * @return int
201: */
202: public int getFontStyle() {
203: return fontStyle;
204: }
205:
206: /**
207: *
208: * @return String
209: */
210: public String getHorizAxisLabel() {
211: return horizAxisLabel;
212: }
213:
214: /**
215: *
216: * @return String
217: */
218: public String getLegendFontName() {
219: return legendFontName;
220: }
221:
222: /**
223: *
224: * @return int
225: */
226: public int getLegendFontSize() {
227: return legendFontSize;
228: }
229:
230: /**
231: *
232: * @return int
233: */
234: public int getLegendFontStyle() {
235: return legendFontStyle;
236: }
237:
238: /**
239: *
240: * @return int
241: */
242: public int getLegendPosition() {
243: return legendPosition;
244: }
245:
246: /**
247: *
248: * @return String
249: */
250: public String getMdxQuery() {
251: return mdxQuery;
252: }
253:
254: /**
255: *
256: * @return boolean
257: */
258: public boolean isShowLegend() {
259: return showLegend;
260: }
261:
262: /**
263: *
264: * @return boolean
265: */
266: public boolean isShowSlicer() {
267: return showSlicer;
268: }
269:
270: /**
271: *
272: * @return int
273: */
274: public int getSlicerAlignment() {
275: return slicerAlignment;
276: }
277:
278: /**
279: *
280: * @return String
281: */
282: public String getSlicerFontName() {
283: return slicerFontName;
284: }
285:
286: /**
287: *
288: * @return int
289: */
290: public int getSlicerFontSize() {
291: return slicerFontSize;
292: }
293:
294: /**
295: *
296: * @return int
297: */
298: public int getSlicerFontStyle() {
299: return slicerFontStyle;
300: }
301:
302: /**
303: *
304: * @return int
305: */
306: public int getSlicerPosition() {
307: return slicerPosition;
308: }
309:
310: /**
311: *
312: * @return int
313: */
314: public int getTickLabelRotate() {
315: return tickLabelRotate;
316: }
317:
318: /**
319: *
320: * @return String
321: */
322: public String getVertAxisLabel() {
323: return vertAxisLabel;
324: }
325:
326: /**
327: *
328: * @return String
329: */
330: public String getDataSourceName() {
331: return dataSourceName;
332: }
333:
334: /*
335: public String getXmlaUri() {
336: return xmlaUri;
337: }
338: */
339:
340: /**
341: *
342: * @param analysisTitle String
343: */
344: public void setAnalysisTitle(String analysisTitle) {
345: this .analysisTitle = analysisTitle;
346: }
347:
348: /**
349: *
350: * @param axisFontName String
351: */
352: public void setAxisFontName(String axisFontName) {
353: this .axisFontName = axisFontName;
354: }
355:
356: /**
357: *
358: * @param axisFontSize int
359: */
360: public void setAxisFontSize(int axisFontSize) {
361: this .axisFontSize = axisFontSize;
362: }
363:
364: /**
365: *
366: * @param axisFontStyle int
367: */
368: public void setAxisFontStyle(int axisFontStyle) {
369: this .axisFontStyle = axisFontStyle;
370: }
371:
372: /*
373: public void setCatalog(String catalog) {
374: this.catalog = catalog;
375: }
376: */
377:
378: /**
379: *
380: * @param chartHeight int
381: */
382: public void setChartHeight(int chartHeight) {
383: this .chartHeight = chartHeight;
384: }
385:
386: /**
387: *
388: * @param chartTitle String
389: */
390: public void setChartTitle(String chartTitle) {
391: this .chartTitle = chartTitle;
392: }
393:
394: /**
395: *
396: * @param chartType int
397: */
398: public void setChartType(int chartType) {
399: this .chartType = chartType;
400: }
401:
402: /**
403: *
404: * @param chartWidth int
405: */
406: public void setChartWidth(int chartWidth) {
407: this .chartWidth = chartWidth;
408: }
409:
410: /**
411: *
412: * @param drillThroughEnabled boolean
413: */
414: public void setDrillThroughEnabled(boolean drillThroughEnabled) {
415: this .drillThroughEnabled = drillThroughEnabled;
416: }
417:
418: /**
419: *
420: * @param fontName String
421: */
422: public void setFontName(String fontName) {
423: this .fontName = fontName;
424: }
425:
426: /**
427: *
428: * @param fontSize int
429: */
430: public void setFontSize(int fontSize) {
431: this .fontSize = fontSize;
432: }
433:
434: /**
435: *
436: * @param fontStyle int
437: */
438: public void setFontStyle(int fontStyle) {
439: this .fontStyle = fontStyle;
440: }
441:
442: /**
443: *
444: * @param horizAxisLabel String
445: */
446: public void setHorizAxisLabel(String horizAxisLabel) {
447: this .horizAxisLabel = horizAxisLabel;
448: }
449:
450: /**
451: *
452: * @param legendFontName String
453: */
454: public void setLegendFontName(String legendFontName) {
455: this .legendFontName = legendFontName;
456: }
457:
458: /**
459: *
460: * @param legendFontSize int
461: */
462: public void setLegendFontSize(int legendFontSize) {
463: this .legendFontSize = legendFontSize;
464: }
465:
466: /**
467: *
468: * @param legendFontStyle int
469: */
470: public void setLegendFontStyle(int legendFontStyle) {
471: this .legendFontStyle = legendFontStyle;
472: }
473:
474: /**
475: *
476: * @param legendPosition int
477: */
478: public void setLegendPosition(int legendPosition) {
479: this .legendPosition = legendPosition;
480: }
481:
482: /**
483: *
484: * @param mdxQuery String
485: */
486: public void setMdxQuery(String mdxQuery) {
487: this .mdxQuery = mdxQuery;
488: }
489:
490: /**
491: *
492: * @param showLegend boolean
493: */
494: public void setShowLegend(boolean showLegend) {
495: this .showLegend = showLegend;
496: }
497:
498: /**
499: *
500: * @param showSlicer boolean
501: */
502: public void setShowSlicer(boolean showSlicer) {
503: this .showSlicer = showSlicer;
504: }
505:
506: /**
507: *
508: * @param slicerAlignment int
509: */
510: public void setSlicerAlignment(int slicerAlignment) {
511: this .slicerAlignment = slicerAlignment;
512: }
513:
514: /**
515: *
516: * @param slicerFontName String
517: */
518: public void setSlicerFontName(String slicerFontName) {
519: this .slicerFontName = slicerFontName;
520: }
521:
522: /**
523: *
524: * @param slicerFontSize int
525: */
526: public void setSlicerFontSize(int slicerFontSize) {
527: this .slicerFontSize = slicerFontSize;
528: }
529:
530: /**
531: *
532: * @param slicerFontStyle int
533: */
534: public void setSlicerFontStyle(int slicerFontStyle) {
535: this .slicerFontStyle = slicerFontStyle;
536: }
537:
538: /**
539: *
540: * @param slicerPosition int
541: */
542: public void setSlicerPosition(int slicerPosition) {
543: this .slicerPosition = slicerPosition;
544: }
545:
546: /**
547: *
548: * @param tickLabelRotate int
549: */
550: public void setTickLabelRotate(int tickLabelRotate) {
551: this .tickLabelRotate = tickLabelRotate;
552: }
553:
554: /**
555: *
556: * @param vertAxisLabel String
557: */
558: public void setVertAxisLabel(String vertAxisLabel) {
559: this .vertAxisLabel = vertAxisLabel;
560: }
561:
562: /**
563: *
564: * @param dataSource String
565: */
566: public void setDataSourceName(String dataSourceName) {
567: this .dataSourceName = dataSourceName;
568: }
569:
570: /*
571: public void setXmlaUri(String xmlaUri) {
572: this.xmlaUri = xmlaUri;
573: }
574: */
575:
576: /**
577: * @return Returns the colorPaletteName.
578: */
579: public String getColorPaletteName() {
580: return colorPaletteName;
581: }
582:
583: /**
584: * @param colorPaletteName The colorPaletteName to set.
585: */
586: public void setColorPaletteName(String colorPaletteName) {
587: this .colorPaletteName = colorPaletteName;
588: }
589:
590: /**
591: * @return Returns the showPareto.
592: */
593: public boolean getShowPareto() {
594: return showPareto;
595: }
596:
597: /**
598: *
599: * @return String
600: */
601: public String getAxisTickFontName() {
602: return axisTickFontName;
603: }
604:
605: /**
606: *
607: * @return int
608: */
609: public int getAxisTickFontSize() {
610: return axisTickFontSize;
611: }
612:
613: /**
614: *
615: * @return int
616: */
617: public int getAxisTickFontStyle() {
618: return axisTickFontStyle;
619: }
620:
621: /**
622: *
623: * @return boolean
624: */
625: public boolean isShowChart() {
626: return showChart;
627: }
628:
629: /**
630: *
631: * @return boolean
632: */
633: public boolean isShowTable() {
634: return showTable;
635: }
636:
637: /**
638: *
639: * @return double
640: */
641: public double getForegroundAlpha() {
642: return foregroundAlpha;
643: }
644:
645: /**
646: *
647: * @return boolean
648: */
649: public boolean isUseChartSize() {
650: return useChartSize;
651: }
652:
653: /**
654: *
655: * @return int
656: */
657: public int getBgColorB() {
658: return bgColorB;
659: }
660:
661: /**
662: *
663: * @return int
664: */
665: public int getBgColorG() {
666: return bgColorG;
667: }
668:
669: /**
670: *
671: * @return int
672: */
673: public int getBgColorR() {
674: return bgColorR;
675: }
676:
677: /**
678: *
679: * @return boolean
680: */
681: public boolean isHideSpans() {
682: return hideSpans;
683: }
684:
685: /**
686: *
687: * @return boolean
688: */
689: public boolean isLevelStyle() {
690: return levelStyle;
691: }
692:
693: public String getDrillthroughSQL() {
694: return drillthroughSQL;
695: }
696:
697: public String getDrillthroughDatasource() {
698: return drillthroughDatasource;
699: }
700:
701: /**
702: * @param showPareto The showPareto to set.
703: */
704: public void setShowPareto(boolean showPareto) {
705: this .showPareto = showPareto;
706: }
707:
708: /**
709: *
710: * @param axisTickFontName String
711: */
712: public void setAxisTickFontName(String axisTickFontName) {
713: this .axisTickFontName = axisTickFontName;
714: }
715:
716: /**
717: *
718: * @param axisTickFontSize int
719: */
720: public void setAxisTickFontSize(int axisTickFontSize) {
721: this .axisTickFontSize = axisTickFontSize;
722: }
723:
724: /**
725: *
726: * @param axisTickFontStyle int
727: */
728: public void setAxisTickFontStyle(int axisTickFontStyle) {
729: this .axisTickFontStyle = axisTickFontStyle;
730: }
731:
732: /**
733: *
734: * @param showChart boolean
735: */
736: public void setShowChart(boolean showChart) {
737: this .showChart = showChart;
738: }
739:
740: /**
741: *
742: * @param showTable boolean
743: */
744: public void setShowTable(boolean showTable) {
745: this .showTable = showTable;
746: }
747:
748: /**
749: *
750: * @param foregroundAlpha double
751: */
752: public void setForegroundAlpha(double foregroundAlpha) {
753: this .foregroundAlpha = foregroundAlpha;
754: }
755:
756: /**
757: *
758: * @param useChartSize boolean
759: */
760: public void setUseChartSize(boolean useChartSize) {
761: this .useChartSize = useChartSize;
762: }
763:
764: /**
765: *
766: * @param bgColorB int
767: */
768: public void setBgColorB(int bgColorB) {
769: this .bgColorB = bgColorB;
770: }
771:
772: /**
773: *
774: * @param bgColorG int
775: */
776: public void setBgColorG(int bgColorG) {
777: this .bgColorG = bgColorG;
778: }
779:
780: /**
781: *
782: * @param bgColorR int
783: */
784: public void setBgColorR(int bgColorR) {
785: this .bgColorR = bgColorR;
786: }
787:
788: /**
789: *
790: * @param hideSpans boolean
791: */
792: public void setHideSpans(boolean hideSpans) {
793: this .hideSpans = hideSpans;
794: }
795:
796: /**
797: *
798: * @param levelStyle boolean
799: */
800: public void setLevelStyle(boolean levelStyle) {
801: this .levelStyle = levelStyle;
802: }
803:
804: public void setDrillthroughSQL(String drillthroughSQL) {
805: this .drillthroughSQL = drillthroughSQL;
806: }
807:
808: public void setDrillthroughDatasource(String drillthroughDatasource) {
809: this .drillthroughDatasource = drillthroughDatasource;
810: }
811:
812: public String getDescription() {
813: return description;
814: }
815:
816: public void setDescription(String description) {
817: this .description = description;
818: }
819:
820: public boolean isDrillReplaceEnabled() {
821: return drillReplaceEnabled;
822: }
823:
824: public void setDrillReplaceEnabled(boolean drillReplaceEnabled) {
825: this .drillReplaceEnabled = drillReplaceEnabled;
826: }
827:
828: public boolean isDrillPositionEnabled() {
829: return drillPositionEnabled;
830: }
831:
832: public void setDrillPositionEnabled(boolean drillPositionEnabled) {
833: this.drillPositionEnabled = drillPositionEnabled;
834: }
835: }
|