protected void setHierarchy(Hierarchy hier){
if(this.hierarchy == null){
this.hierarchy = hier;
String levelString = "<Dimension name =\""+name+"\"/>";
dimDef = new XML(levelString);
if(hierarchy instanceof MondrianHierarchy){
dimDef.addToRootNode(((MondrianHierarchy)hierarchy).addToMondrianSchema());
}
else
logger.error("only Mondrian Hierarchy can be combined with MondrianDimension");