01: package com.calipso.reportgenerator.reportcalculator;
02:
03: /**
04: * Es la especificación del Cube, contiene información acerca de las dimensiones y métricas que contiene la matriz
05: * del pivot
06: */
07:
08: public interface CubeDefinition {
09: public Object[] getDimensions();
10:
11: public Object[] getMetrics();
12: }
13:
14: /*private class CubeDefinition2 implements TestCubeDefinition, Serializable {
15: private Object[] dimensions;
16: private Object[] metrics;
17:
18: public CubeDefinition2() {
19: }
20:
21: public Object[] getDimensionSpecs() {
22: return dimensions;
23: }
24:
25: public void setDimensions(Object[] dimensions) {
26: this.dimensions = dimensions;
27: }
28:
29: public Object[] getMetricSpecs() {
30: return metrics;
31: }
32:
33: public void setMetrics(Object[] metrics) {
34: this.metrics = metrics;
35: }
36:
37:
38: public DimensionDataDefinition getDimensionFromName(String name){
39: for (int i = 0; i < dimensions.length; i++) {
40: DimensionDataDefinition dimension = (DimensionDataDefinition) dimensions[i];
41: if (dimension.getName().equalsIgnoreCase(name)){
42: return dimension;
43: }
44: }
45: return null;
46: }
47:
48: public MetricDataDefinition getMetricFromName(String name){
49: for (int i = 0; i < metrics.length; i++) {
50: MetricDataDefinition metric = (MetricDataDefinition) metrics[i];
51: if (metric.getName().equalsIgnoreCase(name)){
52: return metric;
53: }
54: }
55: return null;
56: }
57: } */
|