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

org.omg.bpmn.bpmn2.impl.ConversationNodeImpl 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.Notification;
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.impl.ENotificationImpl;

import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.emf.ecore.util.InternalEList;

import org.omg.bpmn.bpmn2.Bpmn2Package;
import org.omg.bpmn.bpmn2.ConversationLink;
import org.omg.bpmn.bpmn2.ConversationNode;
import org.omg.bpmn.bpmn2.CorrelationKey;
import org.omg.bpmn.bpmn2.InteractionNode;
import org.omg.bpmn.bpmn2.MessageFlow;
import org.omg.bpmn.bpmn2.Participant;

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

* The following features are implemented: *

*
    *
  • {@link org.omg.bpmn.bpmn2.impl.ConversationNodeImpl#getIncomingConversationLinks Incoming Conversation Links}
  • *
  • {@link org.omg.bpmn.bpmn2.impl.ConversationNodeImpl#getOutgoingConversationLinks Outgoing Conversation Links}
  • *
  • {@link org.omg.bpmn.bpmn2.impl.ConversationNodeImpl#getParticipantRefs Participant Refs}
  • *
  • {@link org.omg.bpmn.bpmn2.impl.ConversationNodeImpl#getMessageFlowRefs Message Flow Refs}
  • *
  • {@link org.omg.bpmn.bpmn2.impl.ConversationNodeImpl#getCorrelationKeys Correlation Keys}
  • *
  • {@link org.omg.bpmn.bpmn2.impl.ConversationNodeImpl#getName Name}
  • *
* * @generated */ public class ConversationNodeImpl extends BaseElementImpl implements ConversationNode { /** * The cached value of the '{@link #getParticipantRefs() Participant Refs}' reference list. * * * @see #getParticipantRefs() * @generated * @ordered */ protected EList participantRefs; /** * The cached value of the '{@link #getMessageFlowRefs() Message Flow Refs}' reference list. * * * @see #getMessageFlowRefs() * @generated * @ordered */ protected EList messageFlowRefs; /** * The cached value of the '{@link #getCorrelationKeys() Correlation Keys}' containment reference list. * * * @see #getCorrelationKeys() * @generated * @ordered */ protected EList correlationKeys; /** * The default value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ protected static final String NAME_EDEFAULT = null; /** * The cached value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ protected String name = NAME_EDEFAULT; /** * * * @generated */ protected ConversationNodeImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return Bpmn2Package.eINSTANCE.getConversationNode(); } /** * * * @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 EList getParticipantRefs() { if (participantRefs == null) { participantRefs = new EObjectResolvingEList(Participant.class, this, Bpmn2Package.CONVERSATION_NODE__PARTICIPANT_REFS); } return participantRefs; } /** * * * @generated */ @Override public EList getMessageFlowRefs() { if (messageFlowRefs == null) { messageFlowRefs = new EObjectResolvingEList(MessageFlow.class, this, Bpmn2Package.CONVERSATION_NODE__MESSAGE_FLOW_REFS); } return messageFlowRefs; } /** * * * @generated */ @Override public EList getCorrelationKeys() { if (correlationKeys == null) { correlationKeys = new EObjectContainmentEList(CorrelationKey.class, this, Bpmn2Package.CONVERSATION_NODE__CORRELATION_KEYS); } return correlationKeys; } /** * * * @generated */ @Override public String getName() { return name; } /** * * * @generated */ @Override public void setName(String newName) { String oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.CONVERSATION_NODE__NAME, oldName, name)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case Bpmn2Package.CONVERSATION_NODE__CORRELATION_KEYS: return ((InternalEList)getCorrelationKeys()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case Bpmn2Package.CONVERSATION_NODE__INCOMING_CONVERSATION_LINKS: return getIncomingConversationLinks(); case Bpmn2Package.CONVERSATION_NODE__OUTGOING_CONVERSATION_LINKS: return getOutgoingConversationLinks(); case Bpmn2Package.CONVERSATION_NODE__PARTICIPANT_REFS: return getParticipantRefs(); case Bpmn2Package.CONVERSATION_NODE__MESSAGE_FLOW_REFS: return getMessageFlowRefs(); case Bpmn2Package.CONVERSATION_NODE__CORRELATION_KEYS: return getCorrelationKeys(); case Bpmn2Package.CONVERSATION_NODE__NAME: return getName(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case Bpmn2Package.CONVERSATION_NODE__PARTICIPANT_REFS: getParticipantRefs().clear(); getParticipantRefs().addAll((Collection)newValue); return; case Bpmn2Package.CONVERSATION_NODE__MESSAGE_FLOW_REFS: getMessageFlowRefs().clear(); getMessageFlowRefs().addAll((Collection)newValue); return; case Bpmn2Package.CONVERSATION_NODE__CORRELATION_KEYS: getCorrelationKeys().clear(); getCorrelationKeys().addAll((Collection)newValue); return; case Bpmn2Package.CONVERSATION_NODE__NAME: setName((String)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case Bpmn2Package.CONVERSATION_NODE__PARTICIPANT_REFS: getParticipantRefs().clear(); return; case Bpmn2Package.CONVERSATION_NODE__MESSAGE_FLOW_REFS: getMessageFlowRefs().clear(); return; case Bpmn2Package.CONVERSATION_NODE__CORRELATION_KEYS: getCorrelationKeys().clear(); return; case Bpmn2Package.CONVERSATION_NODE__NAME: setName(NAME_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case Bpmn2Package.CONVERSATION_NODE__INCOMING_CONVERSATION_LINKS: return !getIncomingConversationLinks().isEmpty(); case Bpmn2Package.CONVERSATION_NODE__OUTGOING_CONVERSATION_LINKS: return !getOutgoingConversationLinks().isEmpty(); case Bpmn2Package.CONVERSATION_NODE__PARTICIPANT_REFS: return participantRefs != null && !participantRefs.isEmpty(); case Bpmn2Package.CONVERSATION_NODE__MESSAGE_FLOW_REFS: return messageFlowRefs != null && !messageFlowRefs.isEmpty(); case Bpmn2Package.CONVERSATION_NODE__CORRELATION_KEYS: return correlationKeys != null && !correlationKeys.isEmpty(); case Bpmn2Package.CONVERSATION_NODE__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { if (baseClass == InteractionNode.class) { switch (derivedFeatureID) { case Bpmn2Package.CONVERSATION_NODE__INCOMING_CONVERSATION_LINKS: return Bpmn2Package.INTERACTION_NODE__INCOMING_CONVERSATION_LINKS; case Bpmn2Package.CONVERSATION_NODE__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.CONVERSATION_NODE__INCOMING_CONVERSATION_LINKS; case Bpmn2Package.INTERACTION_NODE__OUTGOING_CONVERSATION_LINKS: return Bpmn2Package.CONVERSATION_NODE__OUTGOING_CONVERSATION_LINKS; default: return -1; } } return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (name: "); result.append(name); result.append(')'); return result.toString(); } } //ConversationNodeImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy