| @GenModel(fileExtensions="table") |
| @GenModel(modelName="TableDSL") |
| @GenModel(prefix="TableDSL") |
| @GenModel(operationReflection="false") |
| @GenModel(updateClasspath="false") |
| // force bigModel == 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: |
| Joerg Riegel - Initial implementation |
| ") |
| @Ecore(nsURI="http://osbp.eclipse.org/xtext/table/TableDSL") |
| @Ecore(nsPrefix="tabledsl") |
| @Ecore(rootPackage="tabledsl") |
| package org.eclipse.osbp.xtext.table |
| |
| import org.eclipse.emf.ecore.EObject |
| import org.eclipse.emf.ecore.InternalEObject |
| import org.eclipse.osbp.dsl.semantic.common.types.LPackage |
| import org.eclipse.osbp.xtext.oxtype.resource.EcoreUtil3 |
| import org.eclipse.osbp.infogrid.model.gridsource.CxGridProperty |
| import org.eclipse.osbp.infogrid.model.gridsource.CxGridSource |
| import org.eclipse.osbp.infogrid.model.gridsource.CxGridNestedField |
| import org.eclipse.osbp.infogrid.model.gridsource.CxGridNestedPath |
| import org.eclipse.osbp.xtext.action.ActionToolbar |
| import org.eclipse.osbp.xtext.cubedsl.CubeLevel |
| import org.eclipse.osbp.xtext.datamartdsl.AxisEnum |
| import org.eclipse.osbp.xtext.datamartdsl.DatamartColumn |
| import org.eclipse.osbp.xtext.datamartdsl.DatamartDefinition |
| import org.eclipse.osbp.xtext.datamartdsl.DatamartDerivedMeasure |
| import org.eclipse.osbp.xtext.datamartdsl.DatamartMeasure |
| import org.eclipse.osbp.xtext.datamartdsl.DatamartAttribute |
| import org.eclipse.osbp.xtext.datamartdsl.DatamartSetAggregationFunction |
| import org.eclipse.osbp.dsl.semantic.dto.LDto |
| import org.eclipse.xtext.xtype.XImportSection |
| |
| class TableModel{ |
| contains XImportSection importSection |
| contains TablePackage[] packages |
| } |
| |
| type InternalEObject wraps InternalEObject |
| |
| class TableLazyResolver { |
| op EObject eResolveProxy(InternalEObject proxy) { |
| return EcoreUtil3.resolve(proxy, this.eResource().resourceSet); |
| } |
| } |
| |
| class TablePackage extends LPackage{ |
| contains Table[] tables |
| } |
| |
| class TableBase extends TableLazyResolver{ |
| String name |
| } |
| |
| class Table extends TableBase{ |
| boolean description |
| String descriptionValue |
| contains TableOption tabletype |
| } |
| |
| interface TableOption extends TableLazyResolver{ |
| boolean filtering |
| refers ActionToolbar toolbar |
| boolean embedded |
| } |
| |
| class TableSelection extends TableTable{ |
| boolean multiSelection |
| } |
| |
| class TableTable extends TableOption{ |
| boolean selectById |
| boolean selectalways |
| RowHeaderMode headerMode |
| contains TableDatamart source |
| } |
| |
| class TableGrid extends TableOption{ |
| boolean selectalways |
| RowHeaderMode headerMode |
| contains TableDtoDatasource source |
| } |
| |
| class TableDtoDatasource extends CxGridSource { |
| refers LDto dtoSource |
| } |
| |
| class TableGridProperty extends CxGridProperty { |
| } |
| |
| class TablePreorder extends TableLazyResolver{ |
| contains TableValueElement column |
| boolean ascending |
| } |
| |
| class TableValue extends TableLazyResolver{ |
| contains TableValueElement column |
| boolean collapsed |
| contains TableFormatter formatter |
| contains TableTooltipPattern tooltipPattern |
| boolean hideLabelInterval |
| boolean hideLabelLookup |
| contains TableInterval[] intervals |
| contains TableLookup[] lookups |
| boolean hasImage |
| contains TableImage image |
| String iconName |
| } |
| |
| class TableFormatter extends TableLazyResolver{ |
| String format |
| } |
| |
| class TableImage extends TableLazyResolver{ |
| String imagePathPattern |
| boolean hideImageLabel |
| boolean hasParameter |
| boolean resize |
| String resizeString |
| contains TableValueElement imagePathParameter |
| } |
| |
| class TableTooltipPattern extends TableLazyResolver{ |
| String tooltipPattern |
| } |
| |
| interface TableValueElement extends TableLazyResolver{ |
| } |
| |
| class TableTask extends Expression, TableValueElement{ |
| } |
| |
| class TableAllColumns extends Expression, TableValueElement{ |
| } |
| |
| class TableOrdinal extends Expression, TableValueElement{ |
| String valueRef |
| } |
| |
| class TableColumn extends Expression, TableValueElement{ |
| refers DatamartColumn valueRef |
| } |
| |
| class TableMeasure extends Expression, TableValueElement{ |
| refers DatamartMeasure valueRef |
| } |
| |
| class TableDerived extends Expression, TableValueElement{ |
| refers DatamartDerivedMeasure valueRef |
| } |
| |
| class TableHierarchy extends Expression, TableValueElement{ |
| refers CubeLevel valueRef |
| } |
| |
| class TableAttribute extends Expression, TableValueElement{ |
| refers DatamartAttribute valueRef |
| } |
| |
| class TableAggregation extends Expression, TableValueElement{ |
| refers DatamartSetAggregationFunction valueRef |
| } |
| |
| interface TableInterval extends TableLazyResolver{ |
| } |
| |
| class TableNumberInterval extends TableInterval{ |
| double numberIntervalValue |
| contains TableRangeElement numberRange |
| } |
| |
| class TableIntInterval extends TableInterval{ |
| int intIntervalValue |
| contains TableRangeElement intRange |
| } |
| |
| class TableDateDayInterval extends TableInterval{ |
| int dateIntervalValue |
| contains TableRangeElement dateRange |
| } |
| |
| interface TableLookup extends TableLazyResolver{ |
| } |
| |
| class TableNumberLookup extends TableLookup{ |
| double lookupValue |
| contains TableRangeElement discrete |
| } |
| |
| class TableIntLookup extends TableLookup{ |
| int lookupValue |
| contains TableRangeElement discrete |
| } |
| |
| class TableStringLookup extends TableLookup{ |
| String lookupValue |
| contains TableRangeElement discrete |
| } |
| |
| class TableDateDayLookup extends TableLookup{ |
| int lookupValue |
| contains TableRangeElement discrete |
| } |
| |
| class TableDatamart extends TableLazyResolver{ |
| refers DatamartDefinition datamartRef |
| contains TableElement[] elements |
| } |
| |
| interface TableElement extends TableLazyResolver{ |
| } |
| |
| class TableAxis extends TableElement{ |
| AxisEnum axis |
| boolean hasRowHeight |
| String rowHeight |
| contains TablePreorder preOrder |
| boolean hasDetails |
| contains TableValue[] values |
| boolean hasEvents |
| contains TableEvent[] events |
| } |
| |
| class TableEvent extends TableLazyResolver{ |
| contains TableValueElement source |
| } |
| |
| interface TableRangeElement extends TableLazyResolver{ |
| } |
| |
| class TableTextColor extends TableRangeElement{ |
| String rgb |
| } |
| |
| class TableCellColor extends TableRangeElement{ |
| String rgb |
| } |
| |
| class TableIcon extends TableRangeElement{ |
| String icon |
| } |
| |
| class TableTrend extends TableRangeElement{ |
| TrendIconEnum icon |
| } |
| |
| class TableTooltip extends TableRangeElement{ |
| String tooltip |
| } |
| |
| class Expression extends TableValueElement{ |
| String numberValue |
| String stringValue |
| } |
| |
| class Calculation extends Expression{ |
| contains Expression left |
| contains Expression right |
| } |
| |
| class Conjunction extends Calculation{ |
| } |
| |
| class Disjunction extends Calculation{ |
| } |
| |
| class ConditionalExpression extends Calculation{ |
| OperatorEnum operator |
| } |
| |
| enum TrendIconEnum{ |
| RISING as 'rising' |
| BADRISING as 'bad-rising' |
| SLOPING as 'sloping' |
| GOODSLOPING as 'good-sloping' |
| STAGNATING as 'stagnating' |
| } |
| |
| enum OperatorEnum{ |
| EQUALS as ' as ' |
| LESS as '<' |
| GREATER as '>' |
| LESSEQUAL as '< as ' |
| GREATEREQUAL as '> as ' |
| LIKE as 'like' |
| } |
| |
| enum RowHeaderMode{ |
| HIDDEN as 'hidden' |
| EXPLICIT_DEFAULTS_ID as 'explicit' |
| INDEX as 'indexed' |
| } |