blob: bee4a1103b0ad4259123ff4e94d40647a0fa3d5e [file] [log] [blame]
@GenModel(fileExtensions="datamart")
@GenModel(modelName="DatamartDSL")
@GenModel(prefix="DatamartDSL")
@GenModel(updateClasspath="false")
@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 v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
Based on ideas from Xtext, Xtend, Xcore
Contributors:
Joerg Riegel - Initial implementation
")
@Ecore(nsURI="http://osbp.eclipse.org/xtext/datamartdsl/DatamartDSL")
@Ecore(nsPrefix="datamartdsl")
@Ecore(rootPackage="datamartdsl")
package org.eclipse.osbp.xtext.datamartdsl
import org.eclipse.osbp.xtext.authorizationdsl.Role
import org.eclipse.osbp.xtext.cubedsl.CubeHierarchy
import org.eclipse.osbp.xtext.cubedsl.CubeLevel
import org.eclipse.osbp.xtext.cubedsl.CubeMeasure
import org.eclipse.osbp.xtext.cubedsl.CubeType
import org.eclipse.osbp.dsl.semantic.common.types.LPackage
import org.eclipse.osbp.dsl.semantic.entity.LEntity
import org.eclipse.osbp.dsl.semantic.entity.LEntityAttribute
import org.eclipse.osbp.dsl.semantic.entity.LEntityReference
import org.eclipse.osbp.dsl.xtext.lazyresolver.api.EcoreUtil3
import org.eclipse.emf.ecore.EObject
import org.eclipse.emf.ecore.InternalEObject
class DatamartModel {
contains DatamartPackage[] packages
}
type InternalEObject wraps InternalEObject
class DatamartLazyResolver {
op EObject eResolveProxy(InternalEObject proxy) {
return EcoreUtil3.resolve(proxy, this.eResource().resourceSet);
}
}
class DatamartBase extends DatamartLazyResolver{
String name
}
class DatamartPackage extends LPackage{
contains DatamartDefinition[] definitions
}
class DatamartDefinition extends DatamartBase{
boolean description
String descriptionValue
contains DatamartSource source
contains DatamartRole[] roles
}
interface DatamartSource extends DatamartLazyResolver{}
class DatamartRole extends DatamartLazyResolver{
refers Role assignedRole
}
class DatamartTask extends DatamartSource{
TaskQueryTopicEnum taskQuery
contains DatamartColumn[] columns
contains DatamartCondition[] conditions
}
class DatamartCube extends DatamartSource{
boolean nonEmpty
refers CubeType cubeRef
contains DatamartCubeElement[] axisslicer
}
class DatamartEntity extends DatamartSource{
refers LEntity entityRef
contains DatamartNavigation[] navigations
contains DatamartProperty[] properties
contains DatamartCondition[] conditions
contains DatamartOrder[] ordering
int fillerMinCountRows
int fillerMaxCountRows
boolean tracking
contains PropertyFillerData[] fillerDatas
}
class DatamartColumn extends Expression, DatamartLazyResolver{
TaskQueryColumnEnum columnRef
}
class DatamartTaskFilter extends Expression, DatamartLazyResolver{
TaskFilterEnum filterRef
}
class DatamartNavigation extends DatamartLazyResolver{
// contains Ref joinRef
contains DatamartReference joinRef
contains DatamartEntity datamartEntity
}
class DatamartOwner extends DatamartNavigation{}
class DatamartMember extends DatamartNavigation{}
class DatamartProperty extends DatamartLazyResolver, Expression{
boolean aggregated
boolean scaled
boolean placed
AxisEnum axis
SqlAggregationEnum aggregate
ValueScaleEnum scale
refers LEntityAttribute propertyRef
}
class Expression extends DatamartElement {
boolean filtered
boolean selected
boolean optional
String numberValue
String stringValue
String value
contains DatamartHierarchy hierarchy
contains DatamartAggregationFunctionInterface aggregation
contains DatamartFunctionInterface function
contains Expression ^set
contains DatamartSetFunctionInterface setFunction
}
class DatamartCondition{
contains Expression condition
}
class DatamartOrder{
refers LEntityAttribute orderBy
OrderEnum orderHow
}
interface DatamartCubeElement{}
class DatamartDefineDerivedMeasure extends DatamartCubeElement, DatamartBase{
contains Expression[] derivedElement
}
interface DatamartFunctionInterface{}
class DatamartFunction extends DatamartFunctionInterface{
FunctionEnum function
}
class DatamartParameterFunction extends DatamartFunctionInterface{
ParameterFunctionEnum function
contains DatamartFunctionIntParameter parameter
}
class DatamartFunctionIntParameter{
int value
}
interface DatamartSetFunctionInterface{}
class DatamartSetFunction extends DatamartSetFunctionInterface{
SetFunctionEnum setFunction
}
class DatamartSetParameterFunction extends DatamartSetFunctionInterface{
SetParameterFunctionEnum setFunction
contains DatamartFunctionIntParameter parameter
}
interface DatamartAggregationFunctionInterface{}
class DatamartSetAggregationFunction extends DatamartAggregationFunctionInterface{
SetAggregationEnum aggregation
contains DatamartFunctionIntParameter parameter
}
class DatamartAggregationExpression extends Expression{
contains Expression left
contains DatamartMeasure right
}
class DatamartSetTuple extends Expression{
contains Expression left
contains DatamartHierarchy right
}
class DatamartSetAggregation extends DatamartAggregationExpression{}
class DatamartAggregation extends DatamartAggregationExpression{}
class DatamartMemberTuple extends DatamartAggregationExpression{
}
class DatamartAggregationFunction extends DatamartAggregationFunctionInterface{
AggregationEnum aggregation
contains DatamartFunctionIntParameter parameter
}
class DatamartSlicer extends DatamartCubeElement{
contains DatamartElement element
}
class DatamartAxis extends DatamartCubeElement{
AxisEnum name
contains DatamartElement[] elements
}
interface DatamartElement extends DatamartLazyResolver{}
class DatamartDerivedMeasure extends Expression, DatamartElement{
boolean scaled
ValueScaleEnum scale
refers DatamartDefineDerivedMeasure derivedRef
}
class DatamartMeasure extends Expression, DatamartElement{
boolean scaled
ValueScaleEnum scale
refers CubeMeasure measureRef
}
class DatamartHierarchy extends Expression, DatamartElement{
boolean defaultMember
boolean allMember
boolean allLevels
boolean all
boolean except
boolean ordered
boolean descending
refers CubeHierarchy hierarchyRef
refers CubeLevel levelRef
refers CubeLevel exceptRef
contains DatamartElement orderRef
}
class Calculation extends Expression, DatamartLazyResolver{
contains Expression left
contains Expression right
}
class DatamartReference extends DatamartLazyResolver{
refers LEntityReference ref
}
//interface Ref extends DatamartLazyResolver{}
//class DotExpression extends Ref{
// contains Ref ref
// refers LEntityReference tail
//}
//
//class EntityRef extends Ref{
// refers LEntity entity
//}
class Addition extends Calculation{}
class Division extends Calculation{}
class Multiplication extends Calculation{}
class Subtraction extends Calculation{}
class Conjunction extends Calculation{}
class Disjunction extends Calculation{}
class ConditionalExpression extends Calculation{
OperatorEnum operator
}
class EventBrokerDataMart extends DatamartLazyResolver{
String filter
refers DatamartDefinition datamartDef
// contains JvmTypeReference datamartDefJvm
}
enum AxisEnum{
DEFAULT as 'default' = -1
COLUMNS as 'columns' = 0
ROWS as 'rows' = 1
PAGES as 'pages' = 2
SECTIONS as 'sections' = 3
CHAPTERS as 'chapters' = 4
/* AXIS(<index>)*/
}
enum FunctionEnum{
PREVMEMBER as 'previous'
NEXTMEMBER as 'next'
FIRSTCHILD as 'first'
LASTCHILD as 'last'
}
enum ParameterFunctionEnum{
LAG as 'lag'
LEAD as 'lead'
}
enum SetFunctionEnum{
YTD as 'year-to-date'
PERIODSTODATE as 'periods'
/* ALLMEMBERS as 'all'
ASCENDANTS as 'ascendants'*/
}
enum SetParameterFunctionEnum{
TAIL as 'tail'
HEAD as 'head'
}
enum SetAggregationEnum{
TOPCOUNT as 'topcount'
TOPSUM as 'topsummation'
TOPPERCENT as 'toppercentage'
BOTTOMCOUNT as 'bottomcount'
BOTTOMSUM as 'bottomsummation'
BOTTOMPERCENT as 'bottompercentage'
}
enum AggregationEnum{
AVG as 'average'
SUM as 'summation'
AGGREGATE as 'aggregate'
STDDEV as 'deviation'
}
enum OperatorEnum{
EQUALS as '='
LESS as '<'
GREATER as ">"
LESSEQUAL as '<='
GREATEREQUAL as '>='
LIKE as 'like'
}
enum SqlAggregationEnum{
AVG as 'average'
SUM as 'summation'
COUNT as 'count'
}
enum ValueScaleEnum{
AXIS as 'group1'
AXIS2 as 'group2'
AXIS3 as 'group3'
AXIS4 as 'group4'
AXIS5 as 'group5'
AXIS6 as 'group6'
AXIS7 as 'group7'
AXIS8 as 'group8'
AXIS9 as 'group9'
}
enum TaskQueryTopicEnum{
Q1 as 'BusinessAdministrator'
Q2 as 'PotentialOwner'
Q3 as 'Recipient'
Q4 as 'TaskInitiator'
Q5 as 'TaskStakeholder'
Q6 as 'ExcludedOwner'
}
enum TaskQueryColumnEnum{
P1 as 'Name'
P2 as 'Priority'
P3 as 'Status'
P4 as 'Subject'
P5 as 'Description'
P6 as 'ExpirationTime'
P7 as 'CreatedOn'
P8 as 'CreatedBy'
P9 as 'ActivationTime'
P10 as 'ActualOwner'
P11 as 'TaskId'
P12 as 'ProcessId'
P13 as 'ProcessInstanceId'
P14 as 'ProcessSessionId'
}
enum TaskFilterEnum{
F1 as 'Groups'
F2 as 'Users'
}
enum OrderEnum{
ASC as 'ascending'
DESC as 'descending'
}
class PropertyFillerData extends DatamartLazyResolver {
refers LEntityAttribute propertyRef
contains PropertyFillerType fillerType
}
class PropertyFillerType extends DatamartLazyResolver {}
class PropertyFillerDateType extends PropertyFillerType {}
class PropertyFillerDoubleType extends PropertyFillerType {}
class PropertyFillerIntegerType extends PropertyFillerType {}
class PropertyFillerTextType extends PropertyFillerType {}
class PropertyFillerDateFuture extends PropertyFillerDateType {
int dateFutureYears
}
class PropertyFillerDatePast extends PropertyFillerDateType {
int datePastYears
}
class PropertyFillerDateRange extends PropertyFillerDateType {
int dateBeginYears
int dateEndYears
}
class PropertyFillerSignedDoubleRange extends PropertyFillerDoubleType {
int decimals
double beginRange
double endRange
refers LEntityAttribute beginRangeRef
refers LEntityAttribute endRangeRef
double rounded
}
class PropertyFillerSignedDoubleRandom extends PropertyFillerDoubleType {
double[] items
}
class PropertyFillerSignedIntegerRange extends PropertyFillerIntegerType {
int beginRange
int endRange
refers LEntityAttribute beginRangeRef
refers LEntityAttribute endRangeRef
int rounded
}
class PropertyFillerSignedIntegerRandom extends PropertyFillerIntegerType {
int[] items
}
class PropertyFillerTextRandom extends PropertyFillerTextType {
String[] items
}
class PropertyFillerTextParagraphs extends PropertyFillerTextType {
int count
}
class PropertyFillerTextSentences extends PropertyFillerTextType {
int count
}
class PropertyFillerTextWords extends PropertyFillerTextType {
int count
}
class PropertyFillerUnsignedDoubleRange extends PropertyFillerDoubleType {
int decimals
double beginRange
double endRange
refers LEntityAttribute beginRangeRef
refers LEntityAttribute endRangeRef
double rounded
}
class PropertyFillerUnsignedDoubleRandom extends PropertyFillerDoubleType {
double[] items
}
class PropertyFillerUnsignedIntegerRange extends PropertyFillerIntegerType {
int beginRange
int endRange
refers LEntityAttribute beginRangeRef
refers LEntityAttribute endRangeRef
int rounded
}
class PropertyFillerUnsignedIntegerRandom extends PropertyFillerIntegerType {
int[] items
}