org.eclipse.bpmn2.impl.FormalExpressionImpl 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 org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.FormalExpression;
import org.eclipse.bpmn2.ItemDefinition;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
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.BasicFeatureMap;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.util.InternalEList;
/**
*
* An implementation of the model object 'Formal Expression'.
*
*
* The following features are implemented:
*
*
* - {@link org.eclipse.bpmn2.impl.FormalExpressionImpl#getMixed Mixed}
* - {@link org.eclipse.bpmn2.impl.FormalExpressionImpl#getBody Body}
* - {@link org.eclipse.bpmn2.impl.FormalExpressionImpl#getEvaluatesToTypeRef Evaluates To Type Ref}
* - {@link org.eclipse.bpmn2.impl.FormalExpressionImpl#getLanguage Language}
*
*
* @generated
*/
public class FormalExpressionImpl extends ExpressionImpl implements FormalExpression {
/**
* The cached value of the '{@link #getMixed() Mixed}' attribute list.
*
*
* @see #getMixed()
* @generated
* @ordered
*/
@GwtTransient
protected FeatureMap mixed;
/**
* The default value of the '{@link #getBody() Body}' attribute.
*
*
* @see #getBody()
* @generated
* @ordered
*/
protected static final String BODY_EDEFAULT = null;
/**
* The cached value of the '{@link #getEvaluatesToTypeRef() Evaluates To Type Ref}' reference.
*
*
* @see #getEvaluatesToTypeRef()
* @generated
* @ordered
*/
@GwtTransient
protected ItemDefinition evaluatesToTypeRef;
/**
* The default value of the '{@link #getLanguage() Language}' attribute.
*
*
* @see #getLanguage()
* @generated
* @ordered
*/
protected static final String LANGUAGE_EDEFAULT = null;
/**
* The cached value of the '{@link #getLanguage() Language}' attribute.
*
*
* @see #getLanguage()
* @generated
* @ordered
*/
@GwtTransient
protected String language = LANGUAGE_EDEFAULT;
/**
*
*
* @generated
*/
protected FormalExpressionImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return Bpmn2Package.Literals.FORMAL_EXPRESSION;
}
/**
*
*
* @generated
*/
@Override
public FeatureMap getMixed() {
if (mixed == null) {
mixed = new BasicFeatureMap(this, Bpmn2Package.FORMAL_EXPRESSION__MIXED);
}
return mixed;
}
/**
*
*
* @generated
*/
@Override
public String getBody() {
// TODO: implement this method to return the 'Body' attribute
// Ensure that you remove @generated or mark it @generated NOT
throw new UnsupportedOperationException();
}
/**
*
*
* @generated
*/
@Override
public void setBody(String newBody) {
// TODO: implement this method to set the 'Body' attribute
// Ensure that you remove @generated or mark it @generated NOT
throw new UnsupportedOperationException();
}
/**
*
*
* @generated
*/
@Override
public ItemDefinition getEvaluatesToTypeRef() {
if (evaluatesToTypeRef != null && evaluatesToTypeRef.eIsProxy()) {
InternalEObject oldEvaluatesToTypeRef = (InternalEObject) evaluatesToTypeRef;
evaluatesToTypeRef = (ItemDefinition) eResolveProxy(oldEvaluatesToTypeRef);
if (evaluatesToTypeRef != oldEvaluatesToTypeRef) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE,
Bpmn2Package.FORMAL_EXPRESSION__EVALUATES_TO_TYPE_REF, oldEvaluatesToTypeRef,
evaluatesToTypeRef));
}
}
return evaluatesToTypeRef;
}
/**
*
*
* @generated
*/
public ItemDefinition basicGetEvaluatesToTypeRef() {
return evaluatesToTypeRef;
}
/**
*
*
* @generated
*/
@Override
public void setEvaluatesToTypeRef(ItemDefinition newEvaluatesToTypeRef) {
ItemDefinition oldEvaluatesToTypeRef = evaluatesToTypeRef;
evaluatesToTypeRef = newEvaluatesToTypeRef;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.FORMAL_EXPRESSION__EVALUATES_TO_TYPE_REF,
oldEvaluatesToTypeRef, evaluatesToTypeRef));
}
/**
*
*
* @generated
*/
@Override
public String getLanguage() {
return language;
}
/**
*
*
* @generated
*/
@Override
public void setLanguage(String newLanguage) {
String oldLanguage = language;
language = newLanguage;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.FORMAL_EXPRESSION__LANGUAGE, oldLanguage,
language));
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case Bpmn2Package.FORMAL_EXPRESSION__MIXED:
return ((InternalEList>) getMixed()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Bpmn2Package.FORMAL_EXPRESSION__MIXED:
if (coreType)
return getMixed();
return ((FeatureMap.Internal) getMixed()).getWrapper();
case Bpmn2Package.FORMAL_EXPRESSION__BODY:
return getBody();
case Bpmn2Package.FORMAL_EXPRESSION__EVALUATES_TO_TYPE_REF:
if (resolve)
return getEvaluatesToTypeRef();
return basicGetEvaluatesToTypeRef();
case Bpmn2Package.FORMAL_EXPRESSION__LANGUAGE:
return getLanguage();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Bpmn2Package.FORMAL_EXPRESSION__MIXED:
((FeatureMap.Internal) getMixed()).set(newValue);
return;
case Bpmn2Package.FORMAL_EXPRESSION__BODY:
setBody((String) newValue);
return;
case Bpmn2Package.FORMAL_EXPRESSION__EVALUATES_TO_TYPE_REF:
setEvaluatesToTypeRef((ItemDefinition) newValue);
return;
case Bpmn2Package.FORMAL_EXPRESSION__LANGUAGE:
setLanguage((String) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case Bpmn2Package.FORMAL_EXPRESSION__MIXED:
getMixed().clear();
return;
case Bpmn2Package.FORMAL_EXPRESSION__BODY:
setBody(BODY_EDEFAULT);
return;
case Bpmn2Package.FORMAL_EXPRESSION__EVALUATES_TO_TYPE_REF:
setEvaluatesToTypeRef((ItemDefinition) null);
return;
case Bpmn2Package.FORMAL_EXPRESSION__LANGUAGE:
setLanguage(LANGUAGE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case Bpmn2Package.FORMAL_EXPRESSION__MIXED:
return mixed != null && !mixed.isEmpty();
case Bpmn2Package.FORMAL_EXPRESSION__BODY:
return BODY_EDEFAULT == null ? getBody() != null : !BODY_EDEFAULT.equals(getBody());
case Bpmn2Package.FORMAL_EXPRESSION__EVALUATES_TO_TYPE_REF:
return evaluatesToTypeRef != null;
case Bpmn2Package.FORMAL_EXPRESSION__LANGUAGE:
return LANGUAGE_EDEFAULT == null ? language != null : !LANGUAGE_EDEFAULT.equals(language);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (mixed: ");
result.append(mixed);
result.append(", language: ");
result.append(language);
result.append(')');
return result.toString();
}
} //FormalExpressionImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy