org.eclipse.bpmn2.impl.EventImpl Maven / Gradle / Ivy
/**
*
*
* 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.ConversationLink;
import org.eclipse.bpmn2.Event;
import org.eclipse.bpmn2.InteractionNode;
import org.eclipse.bpmn2.Property;
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 'Event'.
*
*
* The following features are implemented:
*
*
* - {@link org.eclipse.bpmn2.impl.EventImpl#getIncomingConversationLinks Incoming Conversation Links}
* - {@link org.eclipse.bpmn2.impl.EventImpl#getOutgoingConversationLinks Outgoing Conversation Links}
* - {@link org.eclipse.bpmn2.impl.EventImpl#getProperties Properties}
*
*
* @generated
*/
public abstract class EventImpl extends FlowNodeImpl implements Event {
/**
* The cached value of the '{@link #getProperties() Properties}' containment reference list.
*
*
* @see #getProperties()
* @generated
* @ordered
*/
@GwtTransient
protected EList properties;
/**
*
*
* @generated
*/
protected EventImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return Bpmn2Package.Literals.EVENT;
}
/**
*
*
* @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 getProperties() {
if (properties == null) {
properties = new EObjectContainmentEList(Property.class, this, Bpmn2Package.EVENT__PROPERTIES);
}
return properties;
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case Bpmn2Package.EVENT__PROPERTIES:
return ((InternalEList>) getProperties()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Bpmn2Package.EVENT__INCOMING_CONVERSATION_LINKS:
return getIncomingConversationLinks();
case Bpmn2Package.EVENT__OUTGOING_CONVERSATION_LINKS:
return getOutgoingConversationLinks();
case Bpmn2Package.EVENT__PROPERTIES:
return getProperties();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Bpmn2Package.EVENT__PROPERTIES:
getProperties().clear();
getProperties().addAll((Collection extends Property>) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case Bpmn2Package.EVENT__PROPERTIES:
getProperties().clear();
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case Bpmn2Package.EVENT__INCOMING_CONVERSATION_LINKS:
return !getIncomingConversationLinks().isEmpty();
case Bpmn2Package.EVENT__OUTGOING_CONVERSATION_LINKS:
return !getOutgoingConversationLinks().isEmpty();
case Bpmn2Package.EVENT__PROPERTIES:
return properties != null && !properties.isEmpty();
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public int eBaseStructuralFeatureID(int derivedFeatureID, Class> baseClass) {
if (baseClass == InteractionNode.class) {
switch (derivedFeatureID) {
case Bpmn2Package.EVENT__INCOMING_CONVERSATION_LINKS:
return Bpmn2Package.INTERACTION_NODE__INCOMING_CONVERSATION_LINKS;
case Bpmn2Package.EVENT__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.EVENT__INCOMING_CONVERSATION_LINKS;
case Bpmn2Package.INTERACTION_NODE__OUTGOING_CONVERSATION_LINKS:
return Bpmn2Package.EVENT__OUTGOING_CONVERSATION_LINKS;
default:
return -1;
}
}
return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
}
} //EventImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy