| /** |
| * |
| * 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 |
| * |
| * Contributors: |
| * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation |
| * |
| */ |
| |
| grammar org.eclipse.osbp.xtext.organizationdsl.OrganizationDsl with org.eclipse.xtext.xbase.annotations.XbaseWithAnnotations |
| |
| import "http://osbp.eclipse.org/xtext/organizationdsl/OrganizationDsl" |
| |
| import "http://www.eclipse.org/emf/2002/Ecore" as ecore |
| import "http://osbp.eclipse.org/dsl/common/types/v1"as types |
| import "http://osbp.eclipse.org/xtext/authorizationdsl/AuthorizationDSL" as authorization |
| import "http://osbp.eclipse.org/xtext/datamartdsl/DatamartDSL" as datamart |
| |
| |
| OrganizationModel: |
| pckg=OrganizationPackage; |
| |
| OrganizationImport returns types::LImport: |
| 'import' importedNamespace=OrgQualifiedNameWithWildCard; |
| |
| OrganizationPackage: |
| 'package' name=QualifiedName ('{' (imports+=OrganizationImport)* (organization=Organization)? '}')?; |
| |
| Organization: |
| 'organization' name=ID 'Title=' title=TRANSLATABLESTRING ('datamarts' '(' (datamarts+=OrganizationDataMart)* ')')? ('superiorPos=' superiorPosValue=[OrganizationPosition])? ('{' (organizationPositions+=OrganizationPosition)* (subOrganizations+=Organization)* '}')?; |
| |
| OrganizationPosition: |
| 'position' name=ID (superior=(OrganizationSuperior))? '{' (roles+=OrganizationRole)* '}'; |
| |
| OrganizationSuperior: |
| ('superiorPos=' superiorPosValue=[OrganizationPosition]); |
| |
| OrganizationDataMart returns datamart::EventBrokerDataMart: |
| '[' 'evtBrokerDatamart=' datamartDef=[datamart::DatamartDefinition] 'filter=' filter=STRING ']'; |
| |
| OrganizationRole: |
| 'role' role=[authorization::Role]; |
| |
| OrgQualifiedNameWithWildCard: |
| QualifiedName ('.' '*')?; |
| |
| LFQN: |
| ID ('.' ID)*; |
| |
| TRANSLATABLESTRING: |
| STRING; |
| |
| QualifiedName: |
| ValidID (=>'.' ValidID)*; |
| |
| |
| ValidID: |
| ID; |