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

org.omg.bpmn.bpmn2.impl.CallActivityImpl 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 org.eclipse.emf.common.notify.Notification;

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.omg.bpmn.bpmn2.Bpmn2Package;
import org.omg.bpmn.bpmn2.CallActivity;
import org.omg.bpmn.bpmn2.CallableElement;
import org.omg.bpmn.bpmn2.ConversationLink;
import org.omg.bpmn.bpmn2.InteractionNode;

/**
 * 
 * An implementation of the model object 'Call Activity'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.omg.bpmn.bpmn2.impl.CallActivityImpl#getIncomingConversationLinks Incoming Conversation Links}
  • *
  • {@link org.omg.bpmn.bpmn2.impl.CallActivityImpl#getOutgoingConversationLinks Outgoing Conversation Links}
  • *
  • {@link org.omg.bpmn.bpmn2.impl.CallActivityImpl#getCalledElementRef Called Element Ref}
  • *
* * @generated */ public class CallActivityImpl extends ActivityImpl implements CallActivity { /** * The cached value of the '{@link #getCalledElementRef() Called Element Ref}' reference. * * * @see #getCalledElementRef() * @generated * @ordered */ protected CallableElement calledElementRef; /** * * * @generated */ protected CallActivityImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return Bpmn2Package.eINSTANCE.getCallActivity(); } /** * * * @generated */ @Override public EList getIncomingConversationLinks() { // TODO: implement this method to return the 'Incoming Conversation Links' reference list // Ensure that you remove @generated or mark it @generated NOT // The list is expected to implement org.eclipse.emf.ecore.util.InternalEList and org.eclipse.emf.ecore.EStructuralFeature.Setting // so it's likely that an appropriate subclass of org.eclipse.emf.ecore.util.EcoreEList should be used. throw new UnsupportedOperationException(); } /** * * * @generated */ @Override public EList getOutgoingConversationLinks() { // TODO: implement this method to return the 'Outgoing Conversation Links' reference list // Ensure that you remove @generated or mark it @generated NOT // The list is expected to implement org.eclipse.emf.ecore.util.InternalEList and org.eclipse.emf.ecore.EStructuralFeature.Setting // so it's likely that an appropriate subclass of org.eclipse.emf.ecore.util.EcoreEList should be used. throw new UnsupportedOperationException(); } /** * * * @generated */ @Override public CallableElement getCalledElementRef() { if (calledElementRef != null && calledElementRef.eIsProxy()) { InternalEObject oldCalledElementRef = (InternalEObject)calledElementRef; calledElementRef = (CallableElement)eResolveProxy(oldCalledElementRef); if (calledElementRef != oldCalledElementRef) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, Bpmn2Package.CALL_ACTIVITY__CALLED_ELEMENT_REF, oldCalledElementRef, calledElementRef)); } } return calledElementRef; } /** * * * @generated */ public CallableElement basicGetCalledElementRef() { return calledElementRef; } /** * * * @generated */ @Override public void setCalledElementRef(CallableElement newCalledElementRef) { CallableElement oldCalledElementRef = calledElementRef; calledElementRef = newCalledElementRef; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.CALL_ACTIVITY__CALLED_ELEMENT_REF, oldCalledElementRef, calledElementRef)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case Bpmn2Package.CALL_ACTIVITY__INCOMING_CONVERSATION_LINKS: return getIncomingConversationLinks(); case Bpmn2Package.CALL_ACTIVITY__OUTGOING_CONVERSATION_LINKS: return getOutgoingConversationLinks(); case Bpmn2Package.CALL_ACTIVITY__CALLED_ELEMENT_REF: if (resolve) return getCalledElementRef(); return basicGetCalledElementRef(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case Bpmn2Package.CALL_ACTIVITY__CALLED_ELEMENT_REF: setCalledElementRef((CallableElement)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case Bpmn2Package.CALL_ACTIVITY__CALLED_ELEMENT_REF: setCalledElementRef((CallableElement)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case Bpmn2Package.CALL_ACTIVITY__INCOMING_CONVERSATION_LINKS: return !getIncomingConversationLinks().isEmpty(); case Bpmn2Package.CALL_ACTIVITY__OUTGOING_CONVERSATION_LINKS: return !getOutgoingConversationLinks().isEmpty(); case Bpmn2Package.CALL_ACTIVITY__CALLED_ELEMENT_REF: return calledElementRef != null; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { if (baseClass == InteractionNode.class) { switch (derivedFeatureID) { case Bpmn2Package.CALL_ACTIVITY__INCOMING_CONVERSATION_LINKS: return Bpmn2Package.INTERACTION_NODE__INCOMING_CONVERSATION_LINKS; case Bpmn2Package.CALL_ACTIVITY__OUTGOING_CONVERSATION_LINKS: return Bpmn2Package.INTERACTION_NODE__OUTGOING_CONVERSATION_LINKS; default: return -1; } } return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); } /** * * * @generated */ @Override public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { if (baseClass == InteractionNode.class) { switch (baseFeatureID) { case Bpmn2Package.INTERACTION_NODE__INCOMING_CONVERSATION_LINKS: return Bpmn2Package.CALL_ACTIVITY__INCOMING_CONVERSATION_LINKS; case Bpmn2Package.INTERACTION_NODE__OUTGOING_CONVERSATION_LINKS: return Bpmn2Package.CALL_ACTIVITY__OUTGOING_CONVERSATION_LINKS; default: return -1; } } return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); } } //CallActivityImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy