KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > jpivot > olap > model > OlapDiscoverer


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;
14
15 import java.util.List JavaDoc;
16
17
18 /**
19  * Browse an OLAP dataSource in order to retrieve
20  * specific Olap Items as dimensions, levels, members
21  */

22 public interface OlapDiscoverer {
23
24   public static final int PROVIDER_MICROSOFT = 1;
25   public static final int PROVIDER_SAP = 2;
26   public static final int PROVIDER_MONDRIAN = 3;
27
28   /**
29    * retrieve catalogs in data source
30    * @return List of OlapItems for the catalogs
31    * @throws OlapException
32    */

33   public java.util.List JavaDoc discoverCat() throws OlapException;
34
35   /**
36    * retrieve cubes in data source for a given catalog
37    * @param cat catalog
38    * @return List of OlapItems for the cubes
39    * @throws OlapException
40    */

41   public java.util.List JavaDoc discoverCube(String JavaDoc cat) throws OlapException;
42
43   /**
44    * retrieve dimensions in data source for given catalog, cube
45    * @param cat catalog name
46    * @param cube cube name
47    * @return List of OlapItems for the dimensions
48    * @throws OlapException
49    */

50   public java.util.List JavaDoc discoverDim(String JavaDoc cat, String JavaDoc cube) throws OlapException;
51
52   /**
53    * retrieve hierarchies in data source for given catalog, cube, dimension
54    * @param cat name of catalog
55    * @param cube name of cube
56    * @param dimension unique name of dimension, can be null
57    * @return List of OlapItems for the hierarchies
58    * @throws OlapException
59    */

60   public java.util.List JavaDoc discoverHier(String JavaDoc cat, String JavaDoc cube, String JavaDoc dimension)
61     throws OlapException;
62
63   /**
64    * retrieve levels in data source for given catalog, cube, dimension
65    * @param cat name of catalog
66    * @param cube name of cube
67    * @param dimension unique name of dimension, can be null
68    * @param hier unique name of hierarchy, can be null
69    * @return List of OlapItems for the levels
70    * @throws OlapException
71    */

72   public java.util.List JavaDoc discoverLev(String JavaDoc cat, String JavaDoc cube, String JavaDoc dimension, String JavaDoc hier)
73     throws OlapException;
74
75   /**
76    * retrieve members in data source for given catalog, cube, dimension, level
77    * @param cat name of catalog
78    * @param cube name of cube
79    * @param dimension unique name of dimension
80    * @param hierarchy unique name of hierarchy
81    * @param level unique name of level
82    * @return List of OlapItems for the members
83    * @throws OlapException
84    */

85   public java.util.List JavaDoc discoverMem(
86     String JavaDoc cat,
87     String JavaDoc cube,
88     String JavaDoc dimension,
89     String JavaDoc hierarchy,
90     String JavaDoc level)
91     throws OlapException;
92
93   /**
94    * retrieve member tree in data source for given catalog, cube, member
95    * @param cat name of catalog
96    * @param cube name of cube
97    * @param member unique name of member
98    * @param treeop bit combination according to TREEOP specification
99    * MDTREEOP_CHILDREN = 1
100    * MDTREEOP_SIBLINGS = 2
101    * MDTREEOP_PARENT = 4
102    * MDTREEOP_SELF = 8
103    * MDTREEOP_DESCENDANTS = 16
104    * MDTREEOP_ANCESTORS = 32
105    * @return List of OlapItems for the members
106    * @throws OlapException
107    */

108   public java.util.List JavaDoc discoverMemTree(String JavaDoc cat, String JavaDoc cube, String JavaDoc member, int treeop)
109     throws OlapException;
110
111   /**
112    * retrieve a map describing the datasource
113    * @return map of key, value strings
114    * keys are, for instance, DataSourceName and DataSourceDescription
115    * @throws OlapException
116    */

117   public java.util.Map JavaDoc discoverDS() throws OlapException;
118
119   /**
120    * retrieve member properties in data source for given catalog, cube, dimension, hierarchy, level
121    * @param cat name of catalog
122    * @param cube name of cube
123    * @param dimension unique name of dimension
124    * @param hierarchy unique name of hierarchy
125    * @param level unique name of level
126    * @return List of OlapItems for the members
127    * @throws OlapException
128    */

129   public java.util.List JavaDoc discoverProp(
130     String JavaDoc cat,
131     String JavaDoc cube,
132     String JavaDoc dimension,
133     String JavaDoc hierarchy,
134     String JavaDoc level)
135     throws OlapException;
136
137
138   /**
139      * retrieve SAP variables for given catalog, cube
140      * @param cat name of catalog
141      * @param cube name of cube
142      * @return List of OlapItems for the members
143      * @throws OlapException
144      * @see com.tonbeller.jpivot.olap.model.OlapDiscoverer#discoverProp
145      */

146    public java.util.List JavaDoc discoverSapVar(String JavaDoc cat, String JavaDoc cube) throws OlapException ;
147
148   /**
149    * @return provider
150    */

151   public int getProvider();
152
153   /**
154    * retrieve datasource properties
155    * @return List of OlapItems for the datasource properties
156    */

157   public List JavaDoc discoverDSProps() throws OlapException;
158   
159 } // OlapDiscoverer
160
Popular Tags