| /**
|
| * Copyright (c) 2009 Mia-Software.
|
| * 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:
|
| * Nicolas Payneau (Mia-Software) - initial API and implementation
|
| *
|
| *
|
| * $Id$
|
| */
|
| package org.eclipse.gmt.modisco.workflow.mwe.workflow.impl;
|
|
|
| import java.util.Collection;
|
|
|
| import org.eclipse.emf.common.notify.NotificationChain;
|
|
|
| import org.eclipse.emf.common.util.EList;
|
|
|
| import org.eclipse.emf.ecore.EClass;
|
| import org.eclipse.emf.ecore.InternalEObject;
|
|
|
| import org.eclipse.emf.ecore.impl.EObjectImpl;
|
|
|
| import org.eclipse.emf.ecore.util.EObjectContainmentEList;
|
| import org.eclipse.emf.ecore.util.InternalEList;
|
|
|
| import org.eclipse.gmt.modisco.workflow.mwe.workflow.Workflow;
|
| import org.eclipse.gmt.modisco.workflow.mwe.workflow.WorkflowComponent;
|
| import org.eclipse.gmt.modisco.workflow.mwe.workflow.WorkflowPackage;
|
|
|
| import org.eclipse.gmt.modisco.workflow.mwe.workflow.runtime.WorkflowEngine;
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * An implementation of the model object '<em><b>Workflow</b></em>'.
|
| * <!-- end-user-doc -->
|
| * <p>
|
| * The following features are implemented:
|
| * <ul>
|
| * <li>{@link org.eclipse.gmt.modisco.workflow.mwe.workflow.impl.WorkflowImpl#getComponents <em>Components</em>}</li>
|
| * <li>{@link org.eclipse.gmt.modisco.workflow.mwe.workflow.impl.WorkflowImpl#getEngines <em>Engines</em>}</li>
|
| * </ul>
|
| * </p>
|
| *
|
| * @generated
|
| */
|
| @Deprecated |
| public class WorkflowImpl extends EObjectImpl implements Workflow {
|
| /**
|
| * The cached value of the '{@link #getComponents() <em>Components</em>}' containment reference list.
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @see #getComponents()
|
| * @generated
|
| * @ordered
|
| */
|
| protected EList<WorkflowComponent> components;
|
|
|
| /**
|
| * The cached value of the '{@link #getEngines() <em>Engines</em>}' containment reference list.
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @see #getEngines()
|
| * @generated
|
| * @ordered
|
| */
|
| protected EList<WorkflowEngine> engines;
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| protected WorkflowImpl() {
|
| super();
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| @Override
|
| protected EClass eStaticClass() {
|
| return WorkflowPackage.Literals.WORKFLOW;
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public EList<WorkflowComponent> getComponents() {
|
| if (components == null) {
|
| components = new EObjectContainmentEList<WorkflowComponent>(WorkflowComponent.class, this, WorkflowPackage.WORKFLOW__COMPONENTS);
|
| }
|
| return components;
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| public EList<WorkflowEngine> getEngines() {
|
| if (engines == null) {
|
| engines = new EObjectContainmentEList<WorkflowEngine>(WorkflowEngine.class, this, WorkflowPackage.WORKFLOW__ENGINES);
|
| }
|
| return engines;
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| @Override
|
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
|
| switch (featureID) {
|
| case WorkflowPackage.WORKFLOW__COMPONENTS:
|
| return ((InternalEList<?>)getComponents()).basicRemove(otherEnd, msgs);
|
| case WorkflowPackage.WORKFLOW__ENGINES:
|
| return ((InternalEList<?>)getEngines()).basicRemove(otherEnd, msgs);
|
| }
|
| return super.eInverseRemove(otherEnd, featureID, msgs);
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| @Override
|
| public Object eGet(int featureID, boolean resolve, boolean coreType) {
|
| switch (featureID) {
|
| case WorkflowPackage.WORKFLOW__COMPONENTS:
|
| return getComponents();
|
| case WorkflowPackage.WORKFLOW__ENGINES:
|
| return getEngines();
|
| }
|
| return super.eGet(featureID, resolve, coreType);
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| @SuppressWarnings("unchecked")
|
| @Override
|
| public void eSet(int featureID, Object newValue) {
|
| switch (featureID) {
|
| case WorkflowPackage.WORKFLOW__COMPONENTS:
|
| getComponents().clear();
|
| getComponents().addAll((Collection<? extends WorkflowComponent>)newValue);
|
| return;
|
| case WorkflowPackage.WORKFLOW__ENGINES:
|
| getEngines().clear();
|
| getEngines().addAll((Collection<? extends WorkflowEngine>)newValue);
|
| return;
|
| }
|
| super.eSet(featureID, newValue);
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| @Override
|
| public void eUnset(int featureID) {
|
| switch (featureID) {
|
| case WorkflowPackage.WORKFLOW__COMPONENTS:
|
| getComponents().clear();
|
| return;
|
| case WorkflowPackage.WORKFLOW__ENGINES:
|
| getEngines().clear();
|
| return;
|
| }
|
| super.eUnset(featureID);
|
| }
|
|
|
| /**
|
| * <!-- begin-user-doc -->
|
| * <!-- end-user-doc -->
|
| * @generated
|
| */
|
| @Override
|
| public boolean eIsSet(int featureID) {
|
| switch (featureID) {
|
| case WorkflowPackage.WORKFLOW__COMPONENTS:
|
| return components != null && !components.isEmpty();
|
| case WorkflowPackage.WORKFLOW__ENGINES:
|
| return engines != null && !engines.isEmpty();
|
| }
|
| return super.eIsSet(featureID);
|
| }
|
|
|
| } //WorkflowImpl
|