KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openi > analysis > Analysis


1 /*********************************************************************************
2  * The contents of this file are subject to the OpenI Public License Version 1.0
3  * ("License"); You may not use this file except in compliance with the
4  * License. You may obtain a copy of the License at
5  * http://www.openi.org/docs/LICENSE.txt
6  *
7  * Software distributed under the License is distributed on an "AS IS" basis,
8  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
9  * the specific language governing rights and limitations under the License.
10  *
11  * The Original Code is: OpenI Open Source
12  *
13  * The Initial Developer of the Original Code is Loyalty Matrix, Inc.
14  * Portions created by Loyalty Matrix, Inc. are
15  * Copyright (C) 2005 Loyalty Matrix, Inc.; All Rights Reserved.
16  *
17  * Contributor(s): ______________________________________.
18  *
19  ********************************************************************************/

20 package org.openi.analysis;
21
22 import java.io.*;
23
24
25 /**
26  * @author plucas
27  *
28  * TODO To change the template for this generated type comment go to
29  * Window - Preferences - Java - Code Style - Code Templates
30  */

31 public class Analysis implements Serializable {
32     /*
33        Although default values are already defined in EnhancedCharComponent,
34          default values for properties are required while creating new analysis.
35      */

36     private String JavaDoc analysisTitle = null;
37     private String JavaDoc mdxQuery = null;
38     private String JavaDoc dataSourceName = null;
39     private String JavaDoc colorPaletteName = null;
40
41     /*As there is no float type formatter in com.tonbeller.wcf.format.BasicTypes class, making
42        foregroundAlpha as double type. But in library, this field of float type. So need to cast into
43        float type while setting foreground alpha for chart*/

44     private double foregroundAlpha = 1.0; //default to no transparency
45
private boolean showPareto = false;
46     private boolean showChart = true;
47     private boolean showTable = true;
48
49     //chart
50
private String JavaDoc chartTitle = "";
51     private int chartType = 1; //vertical bar
52
private int chartHeight = 300;
53     private int chartWidth = 500;
54     private String JavaDoc fontName = "SansSerif";
55     private int fontStyle = 1; //bold
56
private int fontSize = 18;
57     private boolean useChartSize = false; // chart size based on saved width and height.
58

59     //legend
60
private boolean showLegend = true;
61     private String JavaDoc legendFontName = "SansSerif";
62     private int legendFontStyle = 0; //plain
63
private int legendFontSize = 10;
64     private int legendPosition = 2; //right side of chart
65

66     //slicer
67
private boolean showSlicer = true;
68     private int slicerPosition = 1; //top
69
private int slicerAlignment = 4; //center
70
private String JavaDoc slicerFontName = "SansSerif";
71     private int slicerFontStyle = 0; //plain
72
private int slicerFontSize = 12;
73
74     //axes
75
private String JavaDoc axisFontName = "SansSerif";
76     private int axisFontStyle = 0; //plain
77
private int axisFontSize = 12;
78     private String JavaDoc horizAxisLabel = "";
79     private String JavaDoc vertAxisLabel = "";
80     private String JavaDoc axisTickFontName = "SansSerif";
81     private int axisTickFontStyle = 0; //plain
82
private int axisTickFontSize = 10;
83     private boolean drillThroughEnabled = false;
84     private int tickLabelRotate = 30; //30 degree
85
private int bgColorR = 255;
86     private int bgColorG = 255;
87     private int bgColorB = 255;
88
89     // show parents
90
private boolean levelStyle = false;
91
92     // hide spans
93
private boolean hideSpans = false;
94
95     //added for drillthrough
96
private String JavaDoc drillthroughSQL = "";
97     private String JavaDoc drillthroughDatasource = "";
98     private String JavaDoc description;
99
100     public Analysis() {
101     }
102
103     /**
104      *
105      * @return String
106      */

107     public String JavaDoc getAnalysisTitle() {
108         return analysisTitle;
109     }
110
111     /**
112      *
113      * @return String
114      */

115     public String JavaDoc getAxisFontName() {
116         return axisFontName;
117     }
118
119     /**
120      *
121      * @return int
122      */

123     public int getAxisFontSize() {
124         return axisFontSize;
125     }
126
127     /**
128      *
129      * @return int
130      */

131     public int getAxisFontStyle() {
132         return axisFontStyle;
133     }
134
135     /*
136        public String getCatalog() {
137          return catalog;
138        }
139      */

140
141     /**
142      *
143      * @return int
144      */

145     public int getChartHeight() {
146         return chartHeight;
147     }
148
149     /**
150      *
151      * @return String
152      */

153     public String JavaDoc getChartTitle() {
154         return chartTitle;
155     }
156
157     /**
158      *
159      * @return int
160      */

161     public int getChartType() {
162         return chartType;
163     }
164
165     /**
166      *
167      * @return int
168      */

169     public int getChartWidth() {
170         return chartWidth;
171     }
172
173     /**
174      *
175      * @return boolean
176      */

177     public boolean isDrillThroughEnabled() {
178         return drillThroughEnabled;
179     }
180
181     /**
182      *
183      * @return String
184      */

185     public String JavaDoc getFontName() {
186         return fontName;
187     }
188
189     /**
190      *
191      * @return int
192      */

193     public int getFontSize() {
194         return fontSize;
195     }
196
197     /**
198      *
199      * @return int
200      */

201     public int getFontStyle() {
202         return fontStyle;
203     }
204
205     /**
206      *
207      * @return String
208      */

209     public String JavaDoc getHorizAxisLabel() {
210         return horizAxisLabel;
211     }
212
213     /**
214      *
215      * @return String
216      */

217     public String JavaDoc getLegendFontName() {
218         return legendFontName;
219     }
220
221     /**
222      *
223      * @return int
224      */

225     public int getLegendFontSize() {
226         return legendFontSize;
227     }
228
229     /**
230      *
231      * @return int
232      */

233     public int getLegendFontStyle() {
234         return legendFontStyle;
235     }
236
237     /**
238      *
239      * @return int
240      */

241     public int getLegendPosition() {
242         return legendPosition;
243     }
244
245     /**
246      *
247      * @return String
248      */

249     public String JavaDoc getMdxQuery() {
250         return mdxQuery;
251     }
252
253     /**
254      *
255      * @return boolean
256      */

257     public boolean isShowLegend() {
258         return showLegend;
259     }
260
261     /**
262      *
263      * @return boolean
264      */

265     public boolean isShowSlicer() {
266         return showSlicer;
267     }
268
269     /**
270      *
271      * @return int
272      */

273     public int getSlicerAlignment() {
274         return slicerAlignment;
275     }
276
277     /**
278      *
279      * @return String
280      */

281     public String JavaDoc getSlicerFontName() {
282         return slicerFontName;
283     }
284
285     /**
286      *
287      * @return int
288      */

289     public int getSlicerFontSize() {
290         return slicerFontSize;
291     }
292
293     /**
294      *
295      * @return int
296      */

297     public int getSlicerFontStyle() {
298         return slicerFontStyle;
299     }
300
301     /**
302      *
303      * @return int
304      */

305     public int getSlicerPosition() {
306         return slicerPosition;
307     }
308
309     /**
310      *
311      * @return int
312      */

313     public int getTickLabelRotate() {
314         return tickLabelRotate;
315     }
316
317     /**
318      *
319      * @return String
320      */

321     public String JavaDoc getVertAxisLabel() {
322         return vertAxisLabel;
323     }
324
325     /**
326      *
327      * @return String
328      */

329     public String JavaDoc getDataSourceName() {
330         return dataSourceName;
331     }
332
333     /*
334        public String getXmlaUri() {
335        return xmlaUri;
336           }
337      */

338
339     /**
340      *
341      * @param analysisTitle String
342      */

343     public void setAnalysisTitle(String JavaDoc analysisTitle) {
344         this.analysisTitle = analysisTitle;
345     }
346
347     /**
348      *
349      * @param axisFontName String
350      */

351     public void setAxisFontName(String JavaDoc axisFontName) {
352         this.axisFontName = axisFontName;
353     }
354
355     /**
356      *
357      * @param axisFontSize int
358      */

359     public void setAxisFontSize(int axisFontSize) {
360         this.axisFontSize = axisFontSize;
361     }
362
363     /**
364      *
365      * @param axisFontStyle int
366      */

367     public void setAxisFontStyle(int axisFontStyle) {
368         this.axisFontStyle = axisFontStyle;
369     }
370
371     /*
372        public void setCatalog(String catalog) {
373          this.catalog = catalog;
374        }
375      */

376
377     /**
378      *
379      * @param chartHeight int
380      */

381     public void setChartHeight(int chartHeight) {
382         this.chartHeight = chartHeight;
383     }
384
385     /**
386      *
387      * @param chartTitle String
388      */

389     public void setChartTitle(String JavaDoc chartTitle) {
390         this.chartTitle = chartTitle;
391     }
392
393     /**
394      *
395      * @param chartType int
396      */

397     public void setChartType(int chartType) {
398         this.chartType = chartType;
399     }
400
401     /**
402      *
403      * @param chartWidth int
404      */

405     public void setChartWidth(int chartWidth) {
406         this.chartWidth = chartWidth;
407     }
408
409     /**
410      *
411      * @param drillThroughEnabled boolean
412      */

413     public void setDrillThroughEnabled(boolean drillThroughEnabled) {
414         this.drillThroughEnabled = drillThroughEnabled;
415     }
416
417     /**
418      *
419      * @param fontName String
420      */

421     public void setFontName(String JavaDoc fontName) {
422         this.fontName = fontName;
423     }
424
425     /**
426      *
427      * @param fontSize int
428      */

429     public void setFontSize(int fontSize) {
430         this.fontSize = fontSize;
431     }
432
433     /**
434      *
435      * @param fontStyle int
436      */

437     public void setFontStyle(int fontStyle) {
438         this.fontStyle = fontStyle;
439     }
440
441     /**
442      *
443      * @param horizAxisLabel String
444      */

445     public void setHorizAxisLabel(String JavaDoc horizAxisLabel) {
446         this.horizAxisLabel = horizAxisLabel;
447     }
448
449     /**
450      *
451      * @param legendFontName String
452      */

453     public void setLegendFontName(String JavaDoc legendFontName) {
454         this.legendFontName = legendFontName;
455     }
456
457     /**
458      *
459      * @param legendFontSize int
460      */

461     public void setLegendFontSize(int legendFontSize) {
462         this.legendFontSize = legendFontSize;
463     }
464
465     /**
466      *
467      * @param legendFontStyle int
468      */

469     public void setLegendFontStyle(int legendFontStyle) {
470         this.legendFontStyle = legendFontStyle;
471     }
472
473     /**
474      *
475      * @param legendPosition int
476      */

477     public void setLegendPosition(int legendPosition) {
478         this.legendPosition = legendPosition;
479     }
480
481     /**
482      *
483      * @param mdxQuery String
484      */

485     public void setMdxQuery(String JavaDoc mdxQuery) {
486         this.mdxQuery = mdxQuery;
487     }
488
489     /**
490      *
491      * @param showLegend boolean
492      */

493     public void setShowLegend(boolean showLegend) {
494         this.showLegend = showLegend;
495     }
496
497     /**
498      *
499      * @param showSlicer boolean
500      */

501     public void setShowSlicer(boolean showSlicer) {
502         this.showSlicer = showSlicer;
503     }
504
505     /**
506      *
507      * @param slicerAlignment int
508      */

509     public void setSlicerAlignment(int slicerAlignment) {
510         this.slicerAlignment = slicerAlignment;
511     }
512
513     /**
514      *
515      * @param slicerFontName String
516      */

517     public void setSlicerFontName(String JavaDoc slicerFontName) {
518         this.slicerFontName = slicerFontName;
519     }
520
521     /**
522      *
523      * @param slicerFontSize int
524      */

525     public void setSlicerFontSize(int slicerFontSize) {
526         this.slicerFontSize = slicerFontSize;
527     }
528
529     /**
530      *
531      * @param slicerFontStyle int
532      */

533     public void setSlicerFontStyle(int slicerFontStyle) {
534         this.slicerFontStyle = slicerFontStyle;
535     }
536
537     /**
538      *
539      * @param slicerPosition int
540      */

541     public void setSlicerPosition(int slicerPosition) {
542         this.slicerPosition = slicerPosition;
543     }
544
545     /**
546      *
547      * @param tickLabelRotate int
548      */

549     public void setTickLabelRotate(int tickLabelRotate) {
550         this.tickLabelRotate = tickLabelRotate;
551     }
552
553     /**
554      *
555      * @param vertAxisLabel String
556      */

557     public void setVertAxisLabel(String JavaDoc vertAxisLabel) {
558         this.vertAxisLabel = vertAxisLabel;
559     }
560
561     /**
562      *
563      * @param dataSource String
564      */

565     public void setDataSourceName(String JavaDoc dataSourceName) {
566         this.dataSourceName = dataSourceName;
567     }
568
569     /*
570        public void setXmlaUri(String xmlaUri) {
571        this.xmlaUri = xmlaUri;
572           }
573      */

574
575     /**
576      * @return Returns the colorPaletteName.
577      */

578     public String JavaDoc getColorPaletteName() {
579         return colorPaletteName;
580     }
581
582     /**
583      * @param colorPaletteName The colorPaletteName to set.
584      */

585     public void setColorPaletteName(String JavaDoc colorPaletteName) {
586         this.colorPaletteName = colorPaletteName;
587     }
588
589     /**
590      * @return Returns the showPareto.
591      */

592     public boolean getShowPareto() {
593         return showPareto;
594     }
595
596     /**
597      *
598      * @return String
599      */

600     public String JavaDoc getAxisTickFontName() {
601         return axisTickFontName;
602     }
603
604     /**
605      *
606      * @return int
607      */

608     public int getAxisTickFontSize() {
609         return axisTickFontSize;
610     }
611
612     /**
613      *
614      * @return int
615      */

616     public int getAxisTickFontStyle() {
617         return axisTickFontStyle;
618     }
619
620     /**
621      *
622      * @return boolean
623      */

624     public boolean isShowChart() {
625         return showChart;
626     }
627
628     /**
629      *
630      * @return boolean
631      */

632     public boolean isShowTable() {
633         return showTable;
634     }
635
636     /**
637      *
638      * @return double
639      */

640     public double getForegroundAlpha() {
641         return foregroundAlpha;
642     }
643
644     /**
645      *
646      * @return boolean
647      */

648     public boolean isUseChartSize() {
649         return useChartSize;
650     }
651
652     /**
653      *
654      * @return int
655      */

656     public int getBgColorB() {
657         return bgColorB;
658     }
659
660     /**
661      *
662      * @return int
663      */

664     public int getBgColorG() {
665         return bgColorG;
666     }
667
668     /**
669      *
670      * @return int
671      */

672     public int getBgColorR() {
673         return bgColorR;
674     }
675
676     /**
677      *
678      * @return boolean
679      */

680     public boolean isHideSpans() {
681         return hideSpans;
682     }
683
684     /**
685      *
686      * @return boolean
687      */

688     public boolean isLevelStyle() {
689         return levelStyle;
690     }
691
692     public String JavaDoc getDrillthroughSQL() {
693         return drillthroughSQL;
694     }
695
696     public String JavaDoc getDrillthroughDatasource() {
697         return drillthroughDatasource;
698     }
699
700     /**
701      * @param showPareto The showPareto to set.
702      */

703     public void setShowPareto(boolean showPareto) {
704         this.showPareto = showPareto;
705     }
706
707     /**
708      *
709      * @param axisTickFontName String
710      */

711     public void setAxisTickFontName(String JavaDoc axisTickFontName) {
712         this.axisTickFontName = axisTickFontName;
713     }
714
715     /**
716      *
717      * @param axisTickFontSize int
718      */

719     public void setAxisTickFontSize(int axisTickFontSize) {
720         this.axisTickFontSize = axisTickFontSize;
721     }
722
723     /**
724      *
725      * @param axisTickFontStyle int
726      */

727     public void setAxisTickFontStyle(int axisTickFontStyle) {
728         this.axisTickFontStyle = axisTickFontStyle;
729     }
730
731     /**
732      *
733      * @param showChart boolean
734      */

735     public void setShowChart(boolean showChart) {
736         this.showChart = showChart;
737     }
738
739     /**
740      *
741      * @param showTable boolean
742      */

743     public void setShowTable(boolean showTable) {
744         this.showTable = showTable;
745     }
746
747     /**
748      *
749      * @param foregroundAlpha double
750      */

751     public void setForegroundAlpha(double foregroundAlpha) {
752         this.foregroundAlpha = foregroundAlpha;
753     }
754
755     /**
756      *
757      * @param useChartSize boolean
758      */

759     public void setUseChartSize(boolean useChartSize) {
760         this.useChartSize = useChartSize;
761     }
762
763     /**
764      *
765      * @param bgColorB int
766      */

767     public void setBgColorB(int bgColorB) {
768         this.bgColorB = bgColorB;
769     }
770
771     /**
772      *
773      * @param bgColorG int
774      */

775     public void setBgColorG(int bgColorG) {
776         this.bgColorG = bgColorG;
777     }
778
779     /**
780      *
781      * @param bgColorR int
782      */

783     public void setBgColorR(int bgColorR) {
784         this.bgColorR = bgColorR;
785     }
786
787     /**
788      *
789      * @param hideSpans boolean
790      */

791     public void setHideSpans(boolean hideSpans) {
792         this.hideSpans = hideSpans;
793     }
794
795     /**
796      *
797      * @param levelStyle boolean
798      */

799     public void setLevelStyle(boolean levelStyle) {
800         this.levelStyle = levelStyle;
801     }
802
803     public void setDrillthroughSQL(String JavaDoc drillthroughSQL) {
804         this.drillthroughSQL = drillthroughSQL;
805     }
806
807     public void setDrillthroughDatasource(String JavaDoc drillthroughDatasource) {
808         this.drillthroughDatasource = drillthroughDatasource;
809     }
810
811     public String JavaDoc getDescription() {
812         return description;
813     }
814
815     public void setDescription(String JavaDoc description) {
816         this.description = description;
817     }
818 }
819
Popular Tags