1 13 package com.tonbeller.jpivot.xmla; 14 15 import java.util.ArrayList ; 16 import java.util.List ; 17 18 import com.tonbeller.jpivot.olap.model.Axis; 19 import com.tonbeller.jpivot.olap.model.Hierarchy; 20 import com.tonbeller.jpivot.olap.model.Visitor; 21 22 25 public class XMLA_Axis implements Axis { 26 27 private String name; 28 29 private int ordinal; 30 private int nHier = 0; 31 32 private List aHiers = new ArrayList (); 33 private List aPositions = new ArrayList (); 34 35 39 XMLA_Axis(int ordinal, String name) { 40 this.ordinal = ordinal; 41 this.name = name; 42 } 43 44 void addHier(XMLA_Hierarchy hier) { 45 aHiers.add(hier); 46 ++nHier; 47 } 48 49 53 public String getName() { 54 return name; 55 } 56 57 61 public int getNHier() { 62 return nHier; 63 } 64 65 69 void addPosition(XMLA_Position pos) { 70 aPositions.add(pos); 71 } 72 75 public List getPositions() { 76 return aPositions; 77 } 78 81 public Hierarchy[] getHierarchies() { 82 return (Hierarchy[])aHiers.toArray(new Hierarchy[0]); 83 } 84 85 88 public void accept(Visitor visitor) { 89 visitor.visitAxis(this); 90 } 91 92 public Object getRootDecoree() { 93 return this; 94 } 95 96 99 public int getOrdinal() { 100 return ordinal; 101 } 102 103 } | Popular Tags |