KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > jpivot > olap > model > impl > DimensionImpl


1 /*
2  * ====================================================================
3  * This software is subject to the terms of the Common Public License
4  * Agreement, available at the following URL:
5  * http://www.opensource.org/licenses/cpl.html .
6  * Copyright (C) 2003-2004 TONBELLER AG.
7  * All Rights Reserved.
8  * You must accept the terms of that agreement to use this software.
9  * ====================================================================
10  *
11  *
12  */

13 package com.tonbeller.jpivot.olap.model.impl;
14
15 import com.tonbeller.jpivot.olap.model.Dimension;
16 import com.tonbeller.jpivot.olap.model.Hierarchy;
17 import com.tonbeller.jpivot.olap.model.Visitor;
18
19 /**
20  * Created on 11.10.2002
21  *
22  * @author av
23  */

24 public class DimensionImpl implements Dimension {
25   Hierarchy[] hierarchies;
26   boolean time;
27   boolean measure;
28   String JavaDoc label;
29   /**
30    * Returns the hierarchies.
31    * @return Hierarchy[]
32    */

33   public Hierarchy[] getHierarchies() {
34     return hierarchies;
35   }
36
37   /**
38    * Returns the measure.
39    * @return boolean
40    */

41   public boolean isMeasure() {
42     return measure;
43   }
44
45   /**
46    * Returns the time.
47    * @return boolean
48    */

49   public boolean isTime() {
50     return time;
51   }
52
53   /**
54    * Sets the hierarchies.
55    * @param hierarchies The hierarchies to set
56    */

57   public void setHierarchies(Hierarchy[] hierarchies) {
58     this.hierarchies = hierarchies;
59   }
60
61   /**
62    * Sets the measure.
63    * @param measure The measure to set
64    */

65   public void setMeasure(boolean measure) {
66     this.measure = measure;
67   }
68
69   /**
70    * Sets the time.
71    * @param time The time to set
72    */

73   public void setTime(boolean time) {
74     this.time = time;
75   }
76
77
78   public void accept(Visitor visitor) {
79     visitor.visitDimension(this);
80   }
81   
82   public Object JavaDoc getRootDecoree() {
83     return this;
84   }
85
86   /**
87    * Returns the label.
88    * @return String
89    */

90   public String JavaDoc getLabel() {
91     return label;
92   }
93
94   /**
95    * Sets the label.
96    * @param label The label to set
97    */

98   public void setLabel(String JavaDoc label) {
99     this.label = label;
100   }
101
102 }
103
Popular Tags