KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > calipso > reportgenerator > reportcalculator > CubeDefinition


1 package com.calipso.reportgenerator.reportcalculator;
2
3 /**
4  * Es la especificación del Cube, contiene información acerca de las dimensiones y métricas que contiene la matriz
5  * del pivot
6  */

7
8 public interface CubeDefinition {
9     public Object JavaDoc[] getDimensions();
10     public Object JavaDoc[] getMetrics();
11 }
12
13 /*private class CubeDefinition2 implements TestCubeDefinition, Serializable {
14   private Object[] dimensions;
15   private Object[] metrics;
16
17   public CubeDefinition2() {
18   }
19
20   public Object[] getDimensionSpecs() {
21     return dimensions;
22   }
23
24   public void setDimensions(Object[] dimensions) {
25     this.dimensions = dimensions;
26   }
27
28   public Object[] getMetricSpecs() {
29     return metrics;
30   }
31
32   public void setMetrics(Object[] metrics) {
33     this.metrics = metrics;
34   }
35
36
37   public DimensionDataDefinition getDimensionFromName(String name){
38     for (int i = 0; i < dimensions.length; i++) {
39       DimensionDataDefinition dimension = (DimensionDataDefinition) dimensions[i];
40       if (dimension.getName().equalsIgnoreCase(name)){
41         return dimension;
42       }
43     }
44     return null;
45   }
46
47   public MetricDataDefinition getMetricFromName(String name){
48     for (int i = 0; i < metrics.length; i++) {
49       MetricDataDefinition metric = (MetricDataDefinition) metrics[i];
50       if (metric.getName().equalsIgnoreCase(name)){
51         return metric;
52       }
53     }
54     return null;
55   }
56 } */

57
Popular Tags