| package org.eclipse.osbp.xtext.datamartdsl.util |
| |
| import org.eclipse.osbp.xtext.datamartdsl.DatamartAttribute |
| import org.eclipse.osbp.xtext.datamartdsl.DatamartAttributeBase |
| |
| class DatamartAttributeUtil { |
| |
| def static getAliasedAttributeName(DatamartAttributeBase attributeBase){ |
| if (attributeBase instanceof DatamartAttribute){ |
| var attribute = attributeBase as DatamartAttribute |
| if (attribute.aliased){ |
| return '''«attribute?.aliasName?.replace("^", "")»''' |
| } |
| } |
| return '''«attributeBase?.attributeRef?.name?.replace("^", "")»''' |
| } |
| |
| } |