org.eclipse.bpmn2.impl.SubChoreographyImpl 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.Artifact;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.FlowElement;
import org.eclipse.bpmn2.FlowElementsContainer;
import org.eclipse.bpmn2.LaneSet;
import org.eclipse.bpmn2.SubChoreography;
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.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
*
* An implementation of the model object 'Sub Choreography'.
*
*
* The following features are implemented:
*
*
* - {@link org.eclipse.bpmn2.impl.SubChoreographyImpl#getLaneSets Lane Sets}
* - {@link org.eclipse.bpmn2.impl.SubChoreographyImpl#getFlowElements Flow Elements}
* - {@link org.eclipse.bpmn2.impl.SubChoreographyImpl#getArtifacts Artifacts}
*
*
* @generated
*/
public class SubChoreographyImpl extends ChoreographyActivityImpl implements SubChoreography {
/**
* The cached value of the '{@link #getLaneSets() Lane Sets}' containment reference list.
*
*
* @see #getLaneSets()
* @generated
* @ordered
*/
@GwtTransient
protected EList laneSets;
/**
* The cached value of the '{@link #getFlowElements() Flow Elements}' containment reference list.
*
*
* @see #getFlowElements()
* @generated
* @ordered
*/
@GwtTransient
protected EList flowElements;
/**
* The cached value of the '{@link #getArtifacts() Artifacts}' containment reference list.
*
*
* @see #getArtifacts()
* @generated
* @ordered
*/
@GwtTransient
protected EList artifacts;
/**
*
*
* @generated
*/
protected SubChoreographyImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return Bpmn2Package.Literals.SUB_CHOREOGRAPHY;
}
/**
*
*
* @generated
*/
@Override
public EList getLaneSets() {
if (laneSets == null) {
laneSets = new EObjectContainmentEList(LaneSet.class, this,
Bpmn2Package.SUB_CHOREOGRAPHY__LANE_SETS);
}
return laneSets;
}
/**
*
*
* @generated
*/
@Override
public EList getFlowElements() {
if (flowElements == null) {
flowElements = new EObjectContainmentEList(FlowElement.class, this,
Bpmn2Package.SUB_CHOREOGRAPHY__FLOW_ELEMENTS);
}
return flowElements;
}
/**
*
*
* @generated
*/
@Override
public EList getArtifacts() {
if (artifacts == null) {
artifacts = new EObjectContainmentEList(Artifact.class, this,
Bpmn2Package.SUB_CHOREOGRAPHY__ARTIFACTS);
}
return artifacts;
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case Bpmn2Package.SUB_CHOREOGRAPHY__LANE_SETS:
return ((InternalEList>) getLaneSets()).basicRemove(otherEnd, msgs);
case Bpmn2Package.SUB_CHOREOGRAPHY__FLOW_ELEMENTS:
return ((InternalEList>) getFlowElements()).basicRemove(otherEnd, msgs);
case Bpmn2Package.SUB_CHOREOGRAPHY__ARTIFACTS:
return ((InternalEList>) getArtifacts()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Bpmn2Package.SUB_CHOREOGRAPHY__LANE_SETS:
return getLaneSets();
case Bpmn2Package.SUB_CHOREOGRAPHY__FLOW_ELEMENTS:
return getFlowElements();
case Bpmn2Package.SUB_CHOREOGRAPHY__ARTIFACTS:
return getArtifacts();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Bpmn2Package.SUB_CHOREOGRAPHY__LANE_SETS:
getLaneSets().clear();
getLaneSets().addAll((Collection extends LaneSet>) newValue);
return;
case Bpmn2Package.SUB_CHOREOGRAPHY__FLOW_ELEMENTS:
getFlowElements().clear();
getFlowElements().addAll((Collection extends FlowElement>) newValue);
return;
case Bpmn2Package.SUB_CHOREOGRAPHY__ARTIFACTS:
getArtifacts().clear();
getArtifacts().addAll((Collection extends Artifact>) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case Bpmn2Package.SUB_CHOREOGRAPHY__LANE_SETS:
getLaneSets().clear();
return;
case Bpmn2Package.SUB_CHOREOGRAPHY__FLOW_ELEMENTS:
getFlowElements().clear();
return;
case Bpmn2Package.SUB_CHOREOGRAPHY__ARTIFACTS:
getArtifacts().clear();
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case Bpmn2Package.SUB_CHOREOGRAPHY__LANE_SETS:
return laneSets != null && !laneSets.isEmpty();
case Bpmn2Package.SUB_CHOREOGRAPHY__FLOW_ELEMENTS:
return flowElements != null && !flowElements.isEmpty();
case Bpmn2Package.SUB_CHOREOGRAPHY__ARTIFACTS:
return artifacts != null && !artifacts.isEmpty();
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public int eBaseStructuralFeatureID(int derivedFeatureID, Class> baseClass) {
if (baseClass == FlowElementsContainer.class) {
switch (derivedFeatureID) {
case Bpmn2Package.SUB_CHOREOGRAPHY__LANE_SETS:
return Bpmn2Package.FLOW_ELEMENTS_CONTAINER__LANE_SETS;
case Bpmn2Package.SUB_CHOREOGRAPHY__FLOW_ELEMENTS:
return Bpmn2Package.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS;
default:
return -1;
}
}
return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
}
/**
*
*
* @generated
*/
@Override
public int eDerivedStructuralFeatureID(int baseFeatureID, Class> baseClass) {
if (baseClass == FlowElementsContainer.class) {
switch (baseFeatureID) {
case Bpmn2Package.FLOW_ELEMENTS_CONTAINER__LANE_SETS:
return Bpmn2Package.SUB_CHOREOGRAPHY__LANE_SETS;
case Bpmn2Package.FLOW_ELEMENTS_CONTAINER__FLOW_ELEMENTS:
return Bpmn2Package.SUB_CHOREOGRAPHY__FLOW_ELEMENTS;
default:
return -1;
}
}
return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
}
} //SubChoreographyImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy