org.eclipse.bpmn2.impl.FlowNodeImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kie-wb-common-stunner-bpmn-emf Show documentation
Show all versions of kie-wb-common-stunner-bpmn-emf Show documentation
Kie Workbench - Common - Stunner - BPMN Definition Set - GWT Support for Eclipse EMF/XMI
/**
*
*
* Copyright (c) 2010 SAP AG.
* 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:
* Reiner Hille-Doering (SAP AG) - initial API and implementation and/or initial documentation
*
*
*/
package org.eclipse.bpmn2.impl;
import com.google.gwt.user.client.rpc.GwtTransient;
import java.util.Collection;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.FlowNode;
import org.eclipse.bpmn2.Lane;
import org.eclipse.bpmn2.SequenceFlow;
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;
/**
*
* An implementation of the model object 'Flow Node'.
*
*
* The following features are implemented:
*
*
* - {@link org.eclipse.bpmn2.impl.FlowNodeImpl#getIncoming Incoming}
* - {@link org.eclipse.bpmn2.impl.FlowNodeImpl#getLanes Lanes}
* - {@link org.eclipse.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
*/
@GwtTransient
protected EList incoming;
/**
* The cached value of the '{@link #getLanes() Lanes}' reference list.
*
*
* @see #getLanes()
* @generated
* @ordered
*/
@GwtTransient
protected EList lanes;
/**
* The cached value of the '{@link #getOutgoing() Outgoing}' reference list.
*
*
* @see #getOutgoing()
* @generated
* @ordered
*/
@GwtTransient
protected EList outgoing;
/**
*
*
* @generated
*/
protected FlowNodeImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return Bpmn2Package.Literals.FLOW_NODE;
}
/**
*
*
* @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 extends SequenceFlow>) newValue);
return;
case Bpmn2Package.FLOW_NODE__LANES:
getLanes().clear();
getLanes().addAll((Collection extends Lane>) newValue);
return;
case Bpmn2Package.FLOW_NODE__OUTGOING:
getOutgoing().clear();
getOutgoing().addAll((Collection extends SequenceFlow>) 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 - 2025 Weber Informatics LLC | Privacy Policy