1 13 package com.tonbeller.jpivot.test.olap; 14 15 import java.util.ArrayList ; 16 import java.util.Iterator ; 17 import java.util.List ; 18 19 import com.tonbeller.jpivot.olap.model.Hierarchy; 20 import com.tonbeller.jpivot.olap.model.Member; 21 import com.tonbeller.jpivot.olap.model.Position; 22 import com.tonbeller.jpivot.olap.navi.PlaceMembersOnAxes; 23 24 29 public class TestPlaceMembersOnAxes extends TestPlaceHierarchiesOnAxes implements PlaceMembersOnAxes { 30 31 34 public Object createMemberExpression(List members) { 35 return TestOlapModelUtils.createAxis(members); 36 } 37 38 41 public List findVisibleMembers(Hierarchy hier) { 42 List list = new ArrayList (); 43 44 TestAxis[] axes = model().getAxes(); 45 for (int i = 0; i < axes.length; i++) { 46 TestAxis axis = axes[i]; 47 for (Iterator it = axis.getPositions().iterator(); it.hasNext();) { 49 Position p = (Position)it.next(); 50 Member[] members = p.getMembers(); 51 for (int j = 0; j < members.length; j++) { 53 if (members[j].getLevel().getHierarchy().equals(hier)) 54 list.add(members[j]); 55 } 56 } 57 } 58 return list; 59 } 60 61 } 62 | Popular Tags |