| @GenModel(fileExtensions="cube") |
| @GenModel(modelName="CubeDSL") |
| @GenModel(prefix="CubeDSL") |
| @GenModel(updateClasspath="false") |
| @GenModel(loadInitialization="false") |
| @GenModel(literalsInterface="true") |
| @GenModel(copyrightText="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 |
| |
| Based on ideas from Xtext, Xtend, Xcore |
| |
| Contributors: |
| José C. DomÃnguez - Initial implementation |
| ") |
| @Ecore(nsURI="http://osbp.eclipse.org/xtext/cubedsl/CubeDSL") |
| @Ecore(nsPrefix="cubeDSL") |
| @Ecore(rootPackage="cubeDSL") |
| package org.eclipse.osbp.xtext.cubedsl |
| |
| import GenModel |
| import org.eclipse.osbp.dsl.semantic.common.types.LPackage |
| import org.eclipse.osbp.dsl.semantic.entity.LEntity |
| import org.eclipse.osbp.dsl.semantic.entity.LEntityFeature |
| import org.eclipse.emf.ecore.InternalEObject |
| import org.eclipse.osbp.xtext.oxtype.resource.EcoreUtil3 |
| import org.eclipse.emf.ecore.EObject |
| import org.eclipse.xtext.xtype.XImportSection |
| |
| class CubeModel extends CubeLazyResolver { |
| contains XImportSection importSection |
| contains CubePackage pckg |
| } |
| |
| type InternalEObject wraps InternalEObject |
| |
| class CubeLazyResolver { |
| op EObject eResolveProxy(InternalEObject proxy) { |
| return EcoreUtil3.resolve(proxy, this.eResource().resourceSet); |
| } |
| } |
| |
| class CubePackage extends LPackage{ |
| boolean schemaTableNamesToLowerCase |
| contains CubeDimension[] dimensions |
| contains CubeType[] cubes |
| } |
| |
| class CubeBase extends CubeLazyResolver{ |
| String name |
| } |
| |
| class CubeType extends CubeBase { |
| boolean defaultMeasure |
| String defaultMeasureValue |
| contains CubeTypeEntity cubeTypeEntity |
| } |
| |
| class CubeDimensionUsage extends CubeLazyResolver { |
| refers CubeDimension sourceValue |
| refers LEntityFeature overValue |
| } |
| |
| class CubeDimension extends CubeBase { |
| boolean typeTime |
| contains CubeHierarchy[] hierarchies |
| } |
| |
| class CubeHierarchy extends CubeBase { |
| boolean hasAll |
| boolean allMemberName |
| String allMemberNameValue |
| boolean defaultMember |
| String defaultMemberValue |
| contains CubeDimensionEntity cubeDimEntity |
| } |
| |
| class CubeEntity extends CubeLazyResolver { |
| boolean key |
| refers LEntity entityValue |
| refers LEntityFeature keyValue |
| } |
| |
| class CubeEntityRef extends CubeLazyResolver { |
| contains CubeEntity entityRef |
| } |
| |
| class CubeTypeEntity extends CubeEntityRef{ |
| boolean key |
| contains CubeDimensionUsage[] dimensionUsages |
| contains CubeMeasure[] measures |
| } |
| |
| class CubeDimensionEntity extends CubeEntityRef{ |
| boolean key |
| contains CubeLevel[] hierarchLevels |
| contains CubeDimensionEntityEntity dimEntity |
| } |
| |
| class CubeDimensionEntityEntity extends CubeDimensionEntity{ |
| refers LEntityFeature overValue |
| } |
| |
| class CubeLevel extends CubeBase { |
| boolean uniqueMembers |
| boolean levelType |
| boolean nameColumn |
| boolean captionColumn |
| boolean ordinalColumn |
| refers LEntityFeature levelColValue |
| refers LEntityFeature levelNameColValue |
| refers LEntityFeature levelCaptionColValue |
| refers LEntityFeature levelOrdinalColValue |
| CubeLevelLevelType levelTypeValue |
| contains CubeLevelProp[] properties |
| } |
| |
| class CubeLevelProp extends CubeBase { |
| boolean ^type |
| refers LEntityFeature levelPropColValue |
| CubeLevelPropType typeValue |
| } |
| |
| class CubeMeasure extends CubeBase { |
| boolean notVisible |
| CubeAggregatorEnum aggregator |
| refers LEntityFeature measureCol |
| } |
| |
| enum CubeAggregatorEnum { |
| SUM as 'sum' |
| COUNT as 'count' |
| MIN as 'min' |
| MAX as 'max' |
| AVG as 'avg' |
| DSC as 'distinct-count' |
| } |
| |
| enum CubeLevelPropType{ |
| STRING as 'String' |
| NUMERIC as 'Numeric' |
| INTEGER as 'Integer' |
| BOOLEAN as 'Boolean' |
| DATE as 'Date' |
| TIME as 'Time' |
| TIMESTAMP as 'Timestamp' |
| } |
| |
| enum CubeLevelLevelType{ |
| MDLEVEL_TYPE_TIME as 'Time' |
| MDLEVEL_TYPE_TIME_YEARS as 'TimeYears' |
| MDLEVEL_TYPE_TIME_HALF_YEARS as 'TimeHalfYears' |
| MDLEVEL_TYPE_TIME_QUARTERS as 'TimeQuarters' |
| MDLEVEL_TYPE_TIME_MONTHS as 'TimeMonths' |
| MDLEVEL_TYPE_TIME_WEEKS as 'TimeWeeks' |
| MDLEVEL_TYPE_TIME_DAYS as 'TimeDays' |
| MDLEVEL_TYPE_TIME_HOURS as 'TimeHours' |
| MDLEVEL_TYPE_TIME_MINUTES as 'TimeMinutes' |
| MDLEVEL_TYPE_TIME_SECONDS as 'TimeSeconds' |
| } |
| |
| |
| |
| |
| |
| |
| |
| |
| |