| @GenModel(fileExtensions="signal") |
| @GenModel(modelName="SignalDSL") |
| @GenModel(prefix="SignalDSL") |
| // force bigModel == false |
| @GenModel(loadInitialization="false") |
| @GenModel(literalsInterface="true") |
| |
| @GenModel(copyrightText="Copyright (c) 2011, 2018 - 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 |
| |
| generated from SignalDSL.xcore |
| |
| ") |
| @GenModel(updateClasspath="false") |
| @Ecore(nsURI="http://osbp.eclipse.org/xtext/signal/SignalDSL") |
| @Ecore(nsPrefix="signaldsl") |
| @Ecore(rootPackage="signaldsl") |
| package org.eclipse.osbp.xtext.signal |
| |
| import org.eclipse.emf.ecore.EObject |
| import org.eclipse.emf.ecore.InternalEObject |
| import org.eclipse.osbp.dsl.semantic.common.types.LPackage |
| import org.eclipse.osbp.xtext.datainterchange.DataInterchange |
| import org.eclipse.osbp.xtext.datainterchange.DataInterchangeGroup |
| import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryExecute |
| import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryActionGroup |
| import org.eclipse.osbp.xtext.oxtype.resource.EcoreUtil3 |
| import org.eclipse.xtext.xtype.XImportSection |
| |
| class SignalModel{ |
| contains XImportSection importSection |
| contains SignalPackage packages |
| } |
| |
| type InternalEObject wraps InternalEObject |
| |
| class SignalLazyResolver { |
| op EObject eResolveProxy(InternalEObject proxy) { |
| return EcoreUtil3.resolve(proxy, this.eResource().resourceSet); |
| } |
| } |
| |
| class SignalPackage extends LPackage { |
| contains SignalDefinition[] signals |
| } |
| |
| class SignalDefinition extends SignalLazyResolver{ |
| String name |
| refers DataInterchangeGroup interchangegroup |
| SignalExecutionTypeEnum executiontype |
| contains SignalTask[] tasks |
| } |
| |
| // Watchers are defined here bellow. |
| class SignalWatcher extends SignalDefinition { |
| refers DataInterchange defaultInterchange |
| boolean hasFileMask |
| String identifier // the file name or the file mask |
| } |
| |
| // Scheduler is defined here after. |
| class SignalScheduler extends SignalDefinition { |
| contains SchedulerType schedulertype |
| } |
| |
| class SchedulerType extends SignalLazyResolver { |
| } |
| |
| class CronScheduler extends SchedulerType { |
| String expression |
| } |
| |
| class HourlyScheduler extends SchedulerType { |
| int minute |
| } |
| |
| class DailyScheduler extends SchedulerType { |
| int hour |
| int minute |
| } |
| |
| class WeeklyScheduler extends SchedulerType { |
| DayOfWeekEnum dayofweek |
| int hour |
| int minute |
| } |
| |
| class MonthlyScheduler extends SchedulerType { |
| int dayofmonth |
| int hour |
| int minute |
| } |
| |
| class SignalTask extends SignalLazyResolver { |
| // All types of signal tasks are defined bellow: a - data interchange tasks | b - function tasks |
| } |
| |
| class SignalDatainterchange extends SignalTask { |
| SignalActionTypeEnum actionType |
| refers DataInterchange dataRef |
| boolean baseinterchange |
| } |
| |
| class SignalFunction extends SignalTask { |
| refers FunctionLibraryActionGroup group |
| refers FunctionLibraryExecute doExecuteFunction |
| boolean onImportFile |
| boolean onExportFile |
| refers DataInterchange supportInterchange |
| } |
| |
| enum SignalActionTypeEnum { |
| DATAIMPORT as 'import' |
| DATAEXPORT as 'export' |
| } |
| |
| enum SignalExecutionTypeEnum { |
| SEQ as 'sequential' |
| NOSEQ as 'parallel' |
| } |
| |
| enum DayOfWeekEnum{ |
| SUNDAY as 'sunday' |
| MONDAY as 'monday' |
| TUESDAY as 'tuesday' |
| WEDNESDAY as 'wednesday' |
| THURSDAY as 'thursday' |
| FRIDAY as 'friday' |
| SATURDAY as 'saturday' |
| } |