blob: 4c431c880a39e2995ec9fa38c7b5caa216ef1c58 [file] [log] [blame]
@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.xtext.oxtype.resource.EcoreUtil3
import org.eclipse.emf.ecore.EObject
import org.eclipse.emf.ecore.InternalEObject
import org.eclipse.xtext.xtype.XImportSection
class DatamartModel {
contains XImportSection importSection
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 DatamartAttribute[] attributes
contains DatamartCondition[] conditions
contains DatamartOrder[] ordering
int fillerMinCountRows
int fillerMaxCountRows
boolean tracking
contains AttributeFillerData[] fillerDatas
}
class DatamartColumn extends Expression{
TaskQueryColumnEnum columnRef
}
class DatamartTaskFilter extends Expression{
TaskFilterEnum filterRef
}
class DatamartNavigation extends DatamartLazyResolver{
contains DatamartReference joinRef
contains DatamartEntity datamartEntity
}
class DatamartOwner extends DatamartNavigation{}
class DatamartMember extends DatamartNavigation{}
class DatamartAxis extends DatamartLazyResolver{
AxisEnum name
}
class DatamartAttributeBase extends Expression{
refers LEntityAttribute attributeRef
}
class DatamartAttribute extends DatamartAttributeBase{
boolean aggregated
boolean scaled
SqlAggregationEnum aggregate
ValueScaleEnum scale
contains DatamartAxis axis
boolean hasColumnWeight
int columnWeight
boolean aliased
String aliasName
}
class Expression extends DatamartElement {
boolean filtered
boolean selected
boolean optional
boolean ranged
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
boolean hasColumnWeight
int columnWeight
}
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 DatamartCubeAxis extends DatamartCubeElement{
contains DatamartAxis axis
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
}
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 AttributeFillerData extends DatamartLazyResolver {
refers LEntityAttribute attributeRef
contains AttributeFillerType fillerType
}
class AttributeFillerType extends DatamartLazyResolver {}
class AttributeFillerDateType extends AttributeFillerType {}
class AttributeFillerDoubleType extends AttributeFillerType {}
class AttributeFillerIntegerType extends AttributeFillerType {}
class AttributeFillerTextType extends AttributeFillerType {}
class AttributeFillerDateFuture extends AttributeFillerDateType {
int dateFutureYears
}
class AttributeFillerDatePast extends AttributeFillerDateType {
int datePastYears
}
class AttributeFillerDateRange extends AttributeFillerDateType {
int dateBeginYears
int dateEndYears
}
class AttributeFillerSignedDoubleRange extends AttributeFillerDoubleType {
int decimals
double beginRange
double endRange
refers LEntityAttribute beginRangeRef
refers LEntityAttribute endRangeRef
double rounded
}
class AttributeFillerSignedDoubleRandom extends AttributeFillerDoubleType {
double[] items
}
class AttributeFillerSignedIntegerRange extends AttributeFillerIntegerType {
int beginRange
int endRange
refers LEntityAttribute beginRangeRef
refers LEntityAttribute endRangeRef
int rounded
}
class AttributeFillerSignedIntegerRandom extends AttributeFillerIntegerType {
int[] items
}
class AttributeFillerTextRandom extends AttributeFillerTextType {
String[] items
}
class AttributeFillerTextParagraphs extends AttributeFillerTextType {
int count
}
class AttributeFillerTextSentences extends AttributeFillerTextType {
int count
}
class AttributeFillerTextWords extends AttributeFillerTextType {
int count
}
class AttributeFillerUnsignedDoubleRange extends AttributeFillerDoubleType {
int decimals
double beginRange
double endRange
refers LEntityAttribute beginRangeRef
refers LEntityAttribute endRangeRef
double rounded
}
class AttributeFillerUnsignedDoubleRandom extends AttributeFillerDoubleType {
double[] items
}
class AttributeFillerUnsignedIntegerRange extends AttributeFillerIntegerType {
int beginRange
int endRange
refers LEntityAttribute beginRangeRef
refers LEntityAttribute endRangeRef
int rounded
}
class AttributeFillerUnsignedIntegerRandom extends AttributeFillerIntegerType {
int[] items
}