blob: 458e906cc310b3987468d7becbef0ab27eabec36 [file] [log] [blame]
/**
*
* 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
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*
*/
grammar org.eclipse.osbp.xtext.organizationdsl.OrganizationDsl with org.eclipse.osbp.xtext.oxtype.OXtype
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
import "http://osbp.eclipse.org/xtext/action/ActionDSL" as action
OrganizationModel:
importSection=XImportSection?
pckg=OrganizationPackage;
OrganizationPackage:
'package' name=QualifiedName ('{' (organizations+=Organization*) '}')?;
Organization:
'organization' name=TRANSLATABLEID 'Title' title=TRANSLATABLESTRING ('superiorPos' superiorPosValue=[OrganizationPosition])? ('toolbar' toolbar=[action::ActionToolbar])? ('{' (organizationPositions+=OrganizationPosition)* (subOrganizations+=Organization)* '}')?;
OrganizationPosition:
'position' name=TRANSLATABLEID 'alias' linkAlias=STRING (superior=(OrganizationSuperior))? '{' (roles+=OrganizationRole)* '}';
OrganizationSuperior:
('superiorPos' superiorPosValue=[OrganizationPosition]);
OrganizationRole:
'role' role=[authorization::Role];
TRANSLATABLESTRING:
STRING;
TRANSLATABLEID:
ID;