blob: b88cb90cdece91c3dc75e8fd56d09ed0bea168de [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 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.topologydsl.TopologyDSL with org.eclipse.xtext.xbase.annotations.XbaseWithAnnotations
import "http://osbp.eclipse.org/xtext/topologydsl/TopologyDSL"
import "http://osbp.eclipse.org/dsl/common/types/v1" as types
import "http://www.eclipse.org/emf/2002/Ecore" as ecore
import "http://osbp.eclipse.org/xtext/datamartdsl/DatamartDSL" as datamart
TopologyModel:
packages+=TopologyPackage*;
TopologyPackage:
{TopologyPackage} 'package' name=QualifiedName ('{' (imports+=TopologyImport)* (topologies+=Topology)* '}')?;
TopologyImport returns types::LImport:
'import' importedNamespace=TopologyQualifiedNameWithWildCard;
Topology:
{Topology} 'topology' name=ID
(title?='title' titleValue=TRANSLATABLESTRING)?
topologyKind=TopologyKind
((zoomable?='zoomable')? &
(partition?='partition')? &
('onClick' property=TopologyProperty)? &
(places?='places')?)
('filterDatamarts' '(' (datamarts+=TopologyDataMart)* ')')?;
TopologyDataMart returns datamart::EventBrokerDataMart:
'[' 'filterDatamart=' datamartDef=[datamart::DatamartDefinition] 'filter=' filter=STRING ']';
TopologyQualifiedNameWithWildCard:
QualifiedName ('.' '*')?;
TRANSLATABLESTRING: STRING;
enum TopologyKind:
WORLD='world' | USA='usa' | DEU='deu' | ESP='esp';
enum TopologyProperty:
NAME='name' | STATE='state' | ISO='iso_3166_2' | ID='id';