return dimensionIndex;
}
public int getLevelDepth(TuplePosition pos, String levelName)
{
JROlapHierarchy hierarchy = axes[pos.getAxis().getIdx()].getHierarchiesOnAxis()[pos.getIdx()];
JROlapHierarchyLevel[] levels = hierarchy.getLevels();
int levelIndex = -1;
for (int i = 0; i < levels.length; i++)
{
JROlapHierarchyLevel level = levels[i];
if (level != null && level.getName().equals(levelName))
{
levelIndex = level.getDepth();
break;
}
}
if (levelIndex == -1)
{
throw new JRRuntimeException("Could not find level \"" + levelName
+ "\" on hierarchy #" + pos.getIdx() + " (dimension " + hierarchy.getDimensionName()
+ ") on axis #" + pos.getAxis().getIdx());
}
return levelIndex;
}