| /** |
| * Copyright (c) 2014, Loetz GmbH&Co.KG (Heidelberg) |
| * 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 |
| * |
| * Based on ideas from Xtext, Xtend, Xcore |
| * |
| * Contributors: |
| * Loetz GmbH&Co.KG - Initial implementation |
| * |
| */ |
| package org.eclipse.osbp.xtext.blip.impl; |
| |
| import org.eclipse.bpmn2.SequenceFlow; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.InternalEObject; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.eclipse.osbp.xtext.blip.BlipDSLPackage; |
| import org.eclipse.osbp.xtext.blip.BlipOutGoing; |
| |
| import org.eclipse.osbp.xtext.functionlibrarydsl.FunctionLibraryTest; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Blip Out Going</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.osbp.xtext.blip.impl.BlipOutGoingImpl#getSequenceFlow <em>Sequence Flow</em>}</li> |
| * <li>{@link org.eclipse.osbp.xtext.blip.impl.BlipOutGoingImpl#getConstraint <em>Constraint</em>}</li> |
| * <li>{@link org.eclipse.osbp.xtext.blip.impl.BlipOutGoingImpl#isIsDefault <em>Is Default</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class BlipOutGoingImpl extends BlipItemImpl implements BlipOutGoing { |
| /** |
| * The cached value of the '{@link #getSequenceFlow() <em>Sequence Flow</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getSequenceFlow() |
| * @generated |
| * @ordered |
| */ |
| protected SequenceFlow sequenceFlow; |
| |
| /** |
| * The cached value of the '{@link #getConstraint() <em>Constraint</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getConstraint() |
| * @generated |
| * @ordered |
| */ |
| protected FunctionLibraryTest constraint; |
| |
| /** |
| * The default value of the '{@link #isIsDefault() <em>Is Default</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isIsDefault() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean IS_DEFAULT_EDEFAULT = false; |
| |
| /** |
| * The cached value of the '{@link #isIsDefault() <em>Is Default</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isIsDefault() |
| * @generated |
| * @ordered |
| */ |
| protected boolean isDefault = IS_DEFAULT_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected BlipOutGoingImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return BlipDSLPackage.Literals.BLIP_OUT_GOING; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public SequenceFlow getSequenceFlow() { |
| if (sequenceFlow != null && sequenceFlow.eIsProxy()) { |
| InternalEObject oldSequenceFlow = (InternalEObject)sequenceFlow; |
| sequenceFlow = (SequenceFlow)eResolveProxy(oldSequenceFlow); |
| if (sequenceFlow != oldSequenceFlow) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, BlipDSLPackage.BLIP_OUT_GOING__SEQUENCE_FLOW, oldSequenceFlow, sequenceFlow)); |
| } |
| } |
| return sequenceFlow; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public SequenceFlow basicGetSequenceFlow() { |
| return sequenceFlow; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setSequenceFlow(SequenceFlow newSequenceFlow) { |
| SequenceFlow oldSequenceFlow = sequenceFlow; |
| sequenceFlow = newSequenceFlow; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, BlipDSLPackage.BLIP_OUT_GOING__SEQUENCE_FLOW, oldSequenceFlow, sequenceFlow)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public FunctionLibraryTest getConstraint() { |
| if (constraint != null && constraint.eIsProxy()) { |
| InternalEObject oldConstraint = (InternalEObject)constraint; |
| constraint = (FunctionLibraryTest)eResolveProxy(oldConstraint); |
| if (constraint != oldConstraint) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, BlipDSLPackage.BLIP_OUT_GOING__CONSTRAINT, oldConstraint, constraint)); |
| } |
| } |
| return constraint; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public FunctionLibraryTest basicGetConstraint() { |
| return constraint; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setConstraint(FunctionLibraryTest newConstraint) { |
| FunctionLibraryTest oldConstraint = constraint; |
| constraint = newConstraint; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, BlipDSLPackage.BLIP_OUT_GOING__CONSTRAINT, oldConstraint, constraint)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isIsDefault() { |
| return isDefault; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setIsDefault(boolean newIsDefault) { |
| boolean oldIsDefault = isDefault; |
| isDefault = newIsDefault; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, BlipDSLPackage.BLIP_OUT_GOING__IS_DEFAULT, oldIsDefault, isDefault)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case BlipDSLPackage.BLIP_OUT_GOING__SEQUENCE_FLOW: |
| if (resolve) return getSequenceFlow(); |
| return basicGetSequenceFlow(); |
| case BlipDSLPackage.BLIP_OUT_GOING__CONSTRAINT: |
| if (resolve) return getConstraint(); |
| return basicGetConstraint(); |
| case BlipDSLPackage.BLIP_OUT_GOING__IS_DEFAULT: |
| return isIsDefault(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case BlipDSLPackage.BLIP_OUT_GOING__SEQUENCE_FLOW: |
| setSequenceFlow((SequenceFlow)newValue); |
| return; |
| case BlipDSLPackage.BLIP_OUT_GOING__CONSTRAINT: |
| setConstraint((FunctionLibraryTest)newValue); |
| return; |
| case BlipDSLPackage.BLIP_OUT_GOING__IS_DEFAULT: |
| setIsDefault((Boolean)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case BlipDSLPackage.BLIP_OUT_GOING__SEQUENCE_FLOW: |
| setSequenceFlow((SequenceFlow)null); |
| return; |
| case BlipDSLPackage.BLIP_OUT_GOING__CONSTRAINT: |
| setConstraint((FunctionLibraryTest)null); |
| return; |
| case BlipDSLPackage.BLIP_OUT_GOING__IS_DEFAULT: |
| setIsDefault(IS_DEFAULT_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case BlipDSLPackage.BLIP_OUT_GOING__SEQUENCE_FLOW: |
| return sequenceFlow != null; |
| case BlipDSLPackage.BLIP_OUT_GOING__CONSTRAINT: |
| return constraint != null; |
| case BlipDSLPackage.BLIP_OUT_GOING__IS_DEFAULT: |
| return isDefault != IS_DEFAULT_EDEFAULT; |
| } |
| 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(" (isDefault: "); |
| result.append(isDefault); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //BlipOutGoingImpl |