All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.omg.bpmn.bpmn2.impl.FlowNodeImpl Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2012 - 2024 Data In Motion and others.
 * All rights reserved. 
 * 
 * This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 * 
 * SPDX-License-Identifier: EPL-2.0
 * 
 * Contributors:
 *      Mark Hoffmann - initial API and implementation
 */
package org.omg.bpmn.bpmn2.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.util.EObjectWithInverseEList;
import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
import org.eclipse.emf.ecore.util.InternalEList;

import org.omg.bpmn.bpmn2.Bpmn2Package;
import org.omg.bpmn.bpmn2.FlowNode;
import org.omg.bpmn.bpmn2.Lane;
import org.omg.bpmn.bpmn2.SequenceFlow;

/**
 * 
 * An implementation of the model object 'Flow Node'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.omg.bpmn.bpmn2.impl.FlowNodeImpl#getIncoming Incoming}
  • *
  • {@link org.omg.bpmn.bpmn2.impl.FlowNodeImpl#getLanes Lanes}
  • *
  • {@link org.omg.bpmn.bpmn2.impl.FlowNodeImpl#getOutgoing Outgoing}
  • *
* * @generated */ public abstract class FlowNodeImpl extends FlowElementImpl implements FlowNode { /** * The cached value of the '{@link #getIncoming() Incoming}' reference list. * * * @see #getIncoming() * @generated * @ordered */ protected EList incoming; /** * The cached value of the '{@link #getLanes() Lanes}' reference list. * * * @see #getLanes() * @generated * @ordered */ protected EList lanes; /** * The cached value of the '{@link #getOutgoing() Outgoing}' reference list. * * * @see #getOutgoing() * @generated * @ordered */ protected EList outgoing; /** * * * @generated */ protected FlowNodeImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return Bpmn2Package.eINSTANCE.getFlowNode(); } /** * * * @generated */ @Override public EList getIncoming() { if (incoming == null) { incoming = new EObjectWithInverseEList(SequenceFlow.class, this, Bpmn2Package.FLOW_NODE__INCOMING, Bpmn2Package.SEQUENCE_FLOW__TARGET_REF); } return incoming; } /** * * * @generated */ @Override public EList getLanes() { if (lanes == null) { lanes = new EObjectWithInverseResolvingEList.ManyInverse(Lane.class, this, Bpmn2Package.FLOW_NODE__LANES, Bpmn2Package.LANE__FLOW_NODE_REFS); } return lanes; } /** * * * @generated */ @Override public EList getOutgoing() { if (outgoing == null) { outgoing = new EObjectWithInverseEList(SequenceFlow.class, this, Bpmn2Package.FLOW_NODE__OUTGOING, Bpmn2Package.SEQUENCE_FLOW__SOURCE_REF); } return outgoing; } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case Bpmn2Package.FLOW_NODE__INCOMING: return ((InternalEList)(InternalEList)getIncoming()).basicAdd(otherEnd, msgs); case Bpmn2Package.FLOW_NODE__LANES: return ((InternalEList)(InternalEList)getLanes()).basicAdd(otherEnd, msgs); case Bpmn2Package.FLOW_NODE__OUTGOING: return ((InternalEList)(InternalEList)getOutgoing()).basicAdd(otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case Bpmn2Package.FLOW_NODE__INCOMING: return ((InternalEList)getIncoming()).basicRemove(otherEnd, msgs); case Bpmn2Package.FLOW_NODE__LANES: return ((InternalEList)getLanes()).basicRemove(otherEnd, msgs); case Bpmn2Package.FLOW_NODE__OUTGOING: return ((InternalEList)getOutgoing()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case Bpmn2Package.FLOW_NODE__INCOMING: return getIncoming(); case Bpmn2Package.FLOW_NODE__LANES: return getLanes(); case Bpmn2Package.FLOW_NODE__OUTGOING: return getOutgoing(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case Bpmn2Package.FLOW_NODE__INCOMING: getIncoming().clear(); getIncoming().addAll((Collection)newValue); return; case Bpmn2Package.FLOW_NODE__LANES: getLanes().clear(); getLanes().addAll((Collection)newValue); return; case Bpmn2Package.FLOW_NODE__OUTGOING: getOutgoing().clear(); getOutgoing().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case Bpmn2Package.FLOW_NODE__INCOMING: getIncoming().clear(); return; case Bpmn2Package.FLOW_NODE__LANES: getLanes().clear(); return; case Bpmn2Package.FLOW_NODE__OUTGOING: getOutgoing().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case Bpmn2Package.FLOW_NODE__INCOMING: return incoming != null && !incoming.isEmpty(); case Bpmn2Package.FLOW_NODE__LANES: return lanes != null && !lanes.isEmpty(); case Bpmn2Package.FLOW_NODE__OUTGOING: return outgoing != null && !outgoing.isEmpty(); } return super.eIsSet(featureID); } } //FlowNodeImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy