/**
*/
package org.eclipse.papyrus.bpmn.BPMNProfile.impl;
import java.lang.reflect.InvocationTargetException;
import java.util.Collection;
import java.util.Map;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.DiagnosticChain;
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.ENotificationImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.emf.ecore.util.EObjectValidator;
import org.eclipse.papyrus.bpmn.BPMNProfile.BPMNExpression;
import org.eclipse.papyrus.bpmn.BPMNProfile.BPMNProfilePackage;
import org.eclipse.papyrus.bpmn.BPMNProfile.ComplexBehaviorDefinition;
import org.eclipse.papyrus.bpmn.BPMNProfile.DataInput;
import org.eclipse.papyrus.bpmn.BPMNProfile.DataOutput;
import org.eclipse.papyrus.bpmn.BPMNProfile.EventDefinition;
import org.eclipse.papyrus.bpmn.BPMNProfile.ItemAwareElement;
import org.eclipse.papyrus.bpmn.BPMNProfile.MultiInstanceBehavior;
import org.eclipse.papyrus.bpmn.BPMNProfile.MultiInstanceLoopCharacteristics;
import org.eclipse.papyrus.bpmn.BPMNProfile.util.BPMNProfileValidator;
import org.eclipse.uml2.uml.ExpansionRegion;
/**
*
* An implementation of the model object 'Multi Instance Loop Characteristics'.
*
*
* The following features are implemented:
*
*
* - {@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.MultiInstanceLoopCharacteristicsImpl#getBehavior Behavior}
* - {@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.MultiInstanceLoopCharacteristicsImpl#getLoopCardinality Loop Cardinality}
* - {@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.MultiInstanceLoopCharacteristicsImpl#getCompletionCondition Completion Condition}
* - {@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.MultiInstanceLoopCharacteristicsImpl#getBase_ExpansionRegion Base Expansion Region}
* - {@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.MultiInstanceLoopCharacteristicsImpl#isSequential Is Sequential}
* - {@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.MultiInstanceLoopCharacteristicsImpl#getLoopDataInputRef Loop Data Input Ref}
* - {@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.MultiInstanceLoopCharacteristicsImpl#getLoopDataOutputRef Loop Data Output Ref}
* - {@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.MultiInstanceLoopCharacteristicsImpl#getOutputDataItem Output Data Item}
* - {@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.MultiInstanceLoopCharacteristicsImpl#getInputDataItem Input Data Item}
* - {@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.MultiInstanceLoopCharacteristicsImpl#getOneBehaviorEventRef One Behavior Event Ref}
* - {@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.MultiInstanceLoopCharacteristicsImpl#getNoneBehaviorEventRef None Behavior Event Ref}
* - {@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.MultiInstanceLoopCharacteristicsImpl#getComplexBehaviorDefinition Complex Behavior Definition}
*
*
* @generated
*/
public class MultiInstanceLoopCharacteristicsImpl extends LoopCharacteristicsImpl implements MultiInstanceLoopCharacteristics {
/**
* The default value of the '{@link #getBehavior() Behavior}' attribute.
*
*
* @see #getBehavior()
* @generated
* @ordered
*/
protected static final MultiInstanceBehavior BEHAVIOR_EDEFAULT = MultiInstanceBehavior.ALL;
/**
* The cached value of the '{@link #getBehavior() Behavior}' attribute.
*
*
* @see #getBehavior()
* @generated
* @ordered
*/
protected MultiInstanceBehavior behavior = BEHAVIOR_EDEFAULT;
/**
* The cached value of the '{@link #getLoopCardinality() Loop Cardinality}' reference.
*
*
* @see #getLoopCardinality()
* @generated
* @ordered
*/
protected BPMNExpression loopCardinality;
/**
* The cached value of the '{@link #getCompletionCondition() Completion Condition}' reference.
*
*
* @see #getCompletionCondition()
* @generated
* @ordered
*/
protected BPMNExpression completionCondition;
/**
* The cached value of the '{@link #getBase_ExpansionRegion() Base Expansion Region}' reference.
*
*
* @see #getBase_ExpansionRegion()
* @generated
* @ordered
*/
protected ExpansionRegion base_ExpansionRegion;
/**
* The default value of the '{@link #isSequential() Is Sequential}' attribute.
*
*
* @see #isSequential()
* @generated
* @ordered
*/
protected static final boolean IS_SEQUENTIAL_EDEFAULT = false;
/**
* The cached value of the '{@link #isSequential() Is Sequential}' attribute.
*
*
* @see #isSequential()
* @generated
* @ordered
*/
protected boolean isSequential = IS_SEQUENTIAL_EDEFAULT;
/**
* The cached value of the '{@link #getLoopDataInputRef() Loop Data Input Ref}' reference.
*
*
* @see #getLoopDataInputRef()
* @generated
* @ordered
*/
protected ItemAwareElement loopDataInputRef;
/**
* The cached value of the '{@link #getLoopDataOutputRef() Loop Data Output Ref}' reference.
*
*
* @see #getLoopDataOutputRef()
* @generated
* @ordered
*/
protected ItemAwareElement loopDataOutputRef;
/**
* The cached value of the '{@link #getOutputDataItem() Output Data Item}' reference.
*
*
* @see #getOutputDataItem()
* @generated
* @ordered
*/
protected DataOutput outputDataItem;
/**
* The cached value of the '{@link #getInputDataItem() Input Data Item}' reference.
*
*
* @see #getInputDataItem()
* @generated
* @ordered
*/
protected DataInput inputDataItem;
/**
* The cached value of the '{@link #getOneBehaviorEventRef() One Behavior Event Ref}' reference.
*
*
* @see #getOneBehaviorEventRef()
* @generated
* @ordered
*/
protected EventDefinition oneBehaviorEventRef;
/**
* The cached value of the '{@link #getNoneBehaviorEventRef() None Behavior Event Ref}' reference.
*
*
* @see #getNoneBehaviorEventRef()
* @generated
* @ordered
*/
protected EventDefinition noneBehaviorEventRef;
/**
* The cached value of the '{@link #getComplexBehaviorDefinition() Complex Behavior Definition}' reference list.
*
*
* @see #getComplexBehaviorDefinition()
* @generated
* @ordered
*/
protected EList complexBehaviorDefinition;
/**
*
*
* @generated
*/
protected MultiInstanceLoopCharacteristicsImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return BPMNProfilePackage.eINSTANCE.getMultiInstanceLoopCharacteristics();
}
/**
*
*
* @generated
*/
public MultiInstanceBehavior getBehavior() {
return behavior;
}
/**
*
*
* @generated
*/
public void setBehavior(MultiInstanceBehavior newBehavior) {
MultiInstanceBehavior oldBehavior = behavior;
behavior = newBehavior == null ? BEHAVIOR_EDEFAULT : newBehavior;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.MULTI_INSTANCE_LOOP_CHARACTERISTICS__BEHAVIOR, oldBehavior, behavior));
}
/**
*
*
* @generated
*/
public BPMNExpression getLoopCardinality() {
if (loopCardinality != null && loopCardinality.eIsProxy()) {
InternalEObject oldLoopCardinality = (InternalEObject)loopCardinality;
loopCardinality = (BPMNExpression)eResolveProxy(oldLoopCardinality);
if (loopCardinality != oldLoopCardinality) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, BPMNProfilePackage.MULTI_INSTANCE_LOOP_CHARACTERISTICS__LOOP_CARDINALITY, oldLoopCardinality, loopCardinality));
}
}
return loopCardinality;
}
/**
*
*
* @generated
*/
public BPMNExpression basicGetLoopCardinality() {
return loopCardinality;
}
/**
*
*
* @generated
*/
public void setLoopCardinality(BPMNExpression newLoopCardinality) {
BPMNExpression oldLoopCardinality = loopCardinality;
loopCardinality = newLoopCardinality;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.MULTI_INSTANCE_LOOP_CHARACTERISTICS__LOOP_CARDINALITY, oldLoopCardinality, loopCardinality));
}
/**
*
*
* @generated
*/
public BPMNExpression getCompletionCondition() {
if (completionCondition != null && completionCondition.eIsProxy()) {
InternalEObject oldCompletionCondition = (InternalEObject)completionCondition;
completionCondition = (BPMNExpression)eResolveProxy(oldCompletionCondition);
if (completionCondition != oldCompletionCondition) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, BPMNProfilePackage.MULTI_INSTANCE_LOOP_CHARACTERISTICS__COMPLETION_CONDITION, oldCompletionCondition, completionCondition));
}
}
return completionCondition;
}
/**
*
*
* @generated
*/
public BPMNExpression basicGetCompletionCondition() {
return completionCondition;
}
/**
*
*
* @generated
*/
public void setCompletionCondition(BPMNExpression newCompletionCondition) {
BPMNExpression oldCompletionCondition = completionCondition;
completionCondition = newCompletionCondition;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.MULTI_INSTANCE_LOOP_CHARACTERISTICS__COMPLETION_CONDITION, oldCompletionCondition, completionCondition));
}
/**
*
*
* @generated
*/
public ExpansionRegion getBase_ExpansionRegion() {
if (base_ExpansionRegion != null && base_ExpansionRegion.eIsProxy()) {
InternalEObject oldBase_ExpansionRegion = (InternalEObject)base_ExpansionRegion;
base_ExpansionRegion = (ExpansionRegion)eResolveProxy(oldBase_ExpansionRegion);
if (base_ExpansionRegion != oldBase_ExpansionRegion) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, BPMNProfilePackage.MULTI_INSTANCE_LOOP_CHARACTERISTICS__BASE_EXPANSION_REGION, oldBase_ExpansionRegion, base_ExpansionRegion));
}
}
return base_ExpansionRegion;
}
/**
*
*
* @generated
*/
public ExpansionRegion basicGetBase_ExpansionRegion() {
return base_ExpansionRegion;
}
/**
*
*
* @generated
*/
public void setBase_ExpansionRegion(ExpansionRegion newBase_ExpansionRegion) {
ExpansionRegion oldBase_ExpansionRegion = base_ExpansionRegion;
base_ExpansionRegion = newBase_ExpansionRegion;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.MULTI_INSTANCE_LOOP_CHARACTERISTICS__BASE_EXPANSION_REGION, oldBase_ExpansionRegion, base_ExpansionRegion));
}
/**
*
*
* @generated
*/
public boolean isSequential() {
return isSequential;
}
/**
*
*
* @generated
*/
public void setIsSequential(boolean newIsSequential) {
boolean oldIsSequential = isSequential;
isSequential = newIsSequential;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.MULTI_INSTANCE_LOOP_CHARACTERISTICS__IS_SEQUENTIAL, oldIsSequential, isSequential));
}
/**
*
*
* @generated
*/
public ItemAwareElement getLoopDataInputRef() {
if (loopDataInputRef != null && loopDataInputRef.eIsProxy()) {
InternalEObject oldLoopDataInputRef = (InternalEObject)loopDataInputRef;
loopDataInputRef = (ItemAwareElement)eResolveProxy(oldLoopDataInputRef);
if (loopDataInputRef != oldLoopDataInputRef) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, BPMNProfilePackage.MULTI_INSTANCE_LOOP_CHARACTERISTICS__LOOP_DATA_INPUT_REF, oldLoopDataInputRef, loopDataInputRef));
}
}
return loopDataInputRef;
}
/**
*
*
* @generated
*/
public ItemAwareElement basicGetLoopDataInputRef() {
return loopDataInputRef;
}
/**
*
*
* @generated
*/
public void setLoopDataInputRef(ItemAwareElement newLoopDataInputRef) {
ItemAwareElement oldLoopDataInputRef = loopDataInputRef;
loopDataInputRef = newLoopDataInputRef;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.MULTI_INSTANCE_LOOP_CHARACTERISTICS__LOOP_DATA_INPUT_REF, oldLoopDataInputRef, loopDataInputRef));
}
/**
*
*
* @generated
*/
public ItemAwareElement getLoopDataOutputRef() {
if (loopDataOutputRef != null && loopDataOutputRef.eIsProxy()) {
InternalEObject oldLoopDataOutputRef = (InternalEObject)loopDataOutputRef;
loopDataOutputRef = (ItemAwareElement)eResolveProxy(oldLoopDataOutputRef);
if (loopDataOutputRef != oldLoopDataOutputRef) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, BPMNProfilePackage.MULTI_INSTANCE_LOOP_CHARACTERISTICS__LOOP_DATA_OUTPUT_REF, oldLoopDataOutputRef, loopDataOutputRef));
}
}
return loopDataOutputRef;
}
/**
*
*
* @generated
*/
public ItemAwareElement basicGetLoopDataOutputRef() {
return loopDataOutputRef;
}
/**
*
*
* @generated
*/
public void setLoopDataOutputRef(ItemAwareElement newLoopDataOutputRef) {
ItemAwareElement oldLoopDataOutputRef = loopDataOutputRef;
loopDataOutputRef = newLoopDataOutputRef;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.MULTI_INSTANCE_LOOP_CHARACTERISTICS__LOOP_DATA_OUTPUT_REF, oldLoopDataOutputRef, loopDataOutputRef));
}
/**
*
*
* @generated
*/
public DataOutput getOutputDataItem() {
if (outputDataItem != null && outputDataItem.eIsProxy()) {
InternalEObject oldOutputDataItem = (InternalEObject)outputDataItem;
outputDataItem = (DataOutput)eResolveProxy(oldOutputDataItem);
if (outputDataItem != oldOutputDataItem) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, BPMNProfilePackage.MULTI_INSTANCE_LOOP_CHARACTERISTICS__OUTPUT_DATA_ITEM, oldOutputDataItem, outputDataItem));
}
}
return outputDataItem;
}
/**
*
*
* @generated
*/
public DataOutput basicGetOutputDataItem() {
return outputDataItem;
}
/**
*
*
* @generated
*/
public void setOutputDataItem(DataOutput newOutputDataItem) {
DataOutput oldOutputDataItem = outputDataItem;
outputDataItem = newOutputDataItem;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.MULTI_INSTANCE_LOOP_CHARACTERISTICS__OUTPUT_DATA_ITEM, oldOutputDataItem, outputDataItem));
}
/**
*
*
* @generated
*/
public DataInput getInputDataItem() {
if (inputDataItem != null && inputDataItem.eIsProxy()) {
InternalEObject oldInputDataItem = (InternalEObject)inputDataItem;
inputDataItem = (DataInput)eResolveProxy(oldInputDataItem);
if (inputDataItem != oldInputDataItem) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, BPMNProfilePackage.MULTI_INSTANCE_LOOP_CHARACTERISTICS__INPUT_DATA_ITEM, oldInputDataItem, inputDataItem));
}
}
return inputDataItem;
}
/**
*
*
* @generated
*/
public DataInput basicGetInputDataItem() {
return inputDataItem;
}
/**
*
*
* @generated
*/
public void setInputDataItem(DataInput newInputDataItem) {
DataInput oldInputDataItem = inputDataItem;
inputDataItem = newInputDataItem;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.MULTI_INSTANCE_LOOP_CHARACTERISTICS__INPUT_DATA_ITEM, oldInputDataItem, inputDataItem));
}
/**
*
*
* @generated
*/
public EventDefinition getOneBehaviorEventRef() {
if (oneBehaviorEventRef != null && oneBehaviorEventRef.eIsProxy()) {
InternalEObject oldOneBehaviorEventRef = (InternalEObject)oneBehaviorEventRef;
oneBehaviorEventRef = (EventDefinition)eResolveProxy(oldOneBehaviorEventRef);
if (oneBehaviorEventRef != oldOneBehaviorEventRef) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, BPMNProfilePackage.MULTI_INSTANCE_LOOP_CHARACTERISTICS__ONE_BEHAVIOR_EVENT_REF, oldOneBehaviorEventRef, oneBehaviorEventRef));
}
}
return oneBehaviorEventRef;
}
/**
*
*
* @generated
*/
public EventDefinition basicGetOneBehaviorEventRef() {
return oneBehaviorEventRef;
}
/**
*
*
* @generated
*/
public void setOneBehaviorEventRef(EventDefinition newOneBehaviorEventRef) {
EventDefinition oldOneBehaviorEventRef = oneBehaviorEventRef;
oneBehaviorEventRef = newOneBehaviorEventRef;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.MULTI_INSTANCE_LOOP_CHARACTERISTICS__ONE_BEHAVIOR_EVENT_REF, oldOneBehaviorEventRef, oneBehaviorEventRef));
}
/**
*
*
* @generated
*/
public EventDefinition getNoneBehaviorEventRef() {
if (noneBehaviorEventRef != null && noneBehaviorEventRef.eIsProxy()) {
InternalEObject oldNoneBehaviorEventRef = (InternalEObject)noneBehaviorEventRef;
noneBehaviorEventRef = (EventDefinition)eResolveProxy(oldNoneBehaviorEventRef);
if (noneBehaviorEventRef != oldNoneBehaviorEventRef) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, BPMNProfilePackage.MULTI_INSTANCE_LOOP_CHARACTERISTICS__NONE_BEHAVIOR_EVENT_REF, oldNoneBehaviorEventRef, noneBehaviorEventRef));
}
}
return noneBehaviorEventRef;
}
/**
*
*
* @generated
*/
public EventDefinition basicGetNoneBehaviorEventRef() {
return noneBehaviorEventRef;
}
/**
*
*
* @generated
*/
public void setNoneBehaviorEventRef(EventDefinition newNoneBehaviorEventRef) {
EventDefinition oldNoneBehaviorEventRef = noneBehaviorEventRef;
noneBehaviorEventRef = newNoneBehaviorEventRef;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.MULTI_INSTANCE_LOOP_CHARACTERISTICS__NONE_BEHAVIOR_EVENT_REF, oldNoneBehaviorEventRef, noneBehaviorEventRef));
}
/**
*
*
* @generated
*/
public EList getComplexBehaviorDefinition() {
if (complexBehaviorDefinition == null) {
complexBehaviorDefinition = new EObjectResolvingEList(ComplexBehaviorDefinition.class, this, BPMNProfilePackage.MULTI_INSTANCE_LOOP_CHARACTERISTICS__COMPLEX_BEHAVIOR_DEFINITION);
}
return complexBehaviorDefinition;
}
/**
*
*
* @generated
*/
public boolean MultiinstanceLoopCharacteristicstarget(DiagnosticChain diagnostics, Map