blob: 3ec4ac5aaa7daa622afadda5795ae0bbe4b09769 [file] [log] [blame]
/**
*
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*
*/
package org.eclipse.osbp.xtext.datamart.common.olap;
public class DerivedLevel {
private org.olap4j.metadata.Level olapLevel;
private mondrian.olap.Level mondrianLevel;
public DerivedLevel(org.olap4j.metadata.Level olapLevel) {
this.olapLevel = olapLevel;
}
public DerivedLevel(mondrian.olap.Level mondrianLevel) {
this.mondrianLevel = mondrianLevel;
}
public String getName(){
String name = "";
if (olapLevel!=null){
name = olapLevel.getName();
} else if (mondrianLevel!=null){
name = mondrianLevel.getName();
}
return name;
}
public boolean isVisible() {
if (olapLevel!=null){
return olapLevel.isVisible();
} else if (mondrianLevel!=null){
return mondrianLevel.isVisible();
}
return false;
}
public boolean isAll() {
if (olapLevel!=null){
return false;
} else if (mondrianLevel!=null){
return mondrianLevel.isAll();
}
return false;
}
}