| /** |
| * 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 |
| * |
| * |
| */ |
| package org.eclipse.osbp.xtext.signal.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.eclipse.osbp.xtext.signal.CronScheduler; |
| import org.eclipse.osbp.xtext.signal.SignalDSLPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Cron Scheduler</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.osbp.xtext.signal.impl.CronSchedulerImpl#getExpression <em>Expression</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class CronSchedulerImpl extends SchedulerTypeImpl implements CronScheduler { |
| /** |
| * The default value of the '{@link #getExpression() <em>Expression</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getExpression() |
| * @generated |
| * @ordered |
| */ |
| protected static final String EXPRESSION_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getExpression() <em>Expression</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getExpression() |
| * @generated |
| * @ordered |
| */ |
| protected String expression = EXPRESSION_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected CronSchedulerImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return SignalDSLPackage.Literals.CRON_SCHEDULER; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getExpression() { |
| return expression; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setExpression(String newExpression) { |
| String oldExpression = expression; |
| expression = newExpression; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, SignalDSLPackage.CRON_SCHEDULER__EXPRESSION, oldExpression, expression)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case SignalDSLPackage.CRON_SCHEDULER__EXPRESSION: |
| return getExpression(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case SignalDSLPackage.CRON_SCHEDULER__EXPRESSION: |
| setExpression((String)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case SignalDSLPackage.CRON_SCHEDULER__EXPRESSION: |
| setExpression(EXPRESSION_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case SignalDSLPackage.CRON_SCHEDULER__EXPRESSION: |
| return EXPRESSION_EDEFAULT == null ? expression != null : !EXPRESSION_EDEFAULT.equals(expression); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String toString() { |
| if (eIsProxy()) return super.toString(); |
| |
| StringBuffer result = new StringBuffer(super.toString()); |
| result.append(" (expression: "); |
| result.append(expression); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //CronSchedulerImpl |