KickJava   Java API By Example, From Geeks To Geeks.

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


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.Level;
18 import com.tonbeller.jpivot.olap.model.Visitor;
19
20 /**
21  * Created on 11.10.2002
22  *
23  * @author av
24  */

25 public class HierarchyImpl implements Hierarchy {
26   Dimension dimension;
27   Level[] levels;
28   String JavaDoc label;
29   boolean hasAll;
30
31   /**
32    * Returns the dimension.
33    * @return Dimension
34    */

35   public Dimension getDimension() {
36     return dimension;
37   }
38
39   /**
40    * Returns the levels.
41    * @return Level[]
42    */

43   public Level[] getLevels() {
44     return levels;
45   }
46
47   /**
48    * Sets the dimension.
49    * @param dimension The dimension to set
50    */

51   public void setDimension(Dimension dimension) {
52     this.dimension = dimension;
53   }
54
55   /**
56    * Sets the levels.
57    * @param levels The levels to set
58    */

59   public void setLevels(Level[] levels) {
60     this.levels = levels;
61   }
62
63
64   public void accept(Visitor visitor) {
65     visitor.visitHierarchy(this);
66   }
67   
68   public Object JavaDoc getRootDecoree() {
69     return this;
70   }
71
72   /**
73    * Returns the label.
74    * @return String
75    */

76   public String JavaDoc getLabel() {
77     return label;
78   }
79
80   /**
81    * Sets the label.
82    * @param label The label to set
83    */

84   public void setLabel(String JavaDoc label) {
85     this.label = label;
86   }
87
88   public boolean hasAll() {
89     return hasAll;
90   }
91
92   public void setHasAll(boolean hasAll) {
93     this.hasAll = hasAll;
94   }
95 }
96
Popular Tags