blob: c075d253c4d6057967d7a5e024a80a0a614971cf [file] [log] [blame]
/**
* Copyright (c) 2014 Fraunhofer FOKUS
* 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:
* Max Bureck
*/
package org.eclipse.upr.bpmnprof.impl;
import java.lang.reflect.InvocationTargetException;
import java.util.Map;
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.plugin.EcorePlugin;
import org.eclipse.emf.ecore.util.EObjectValidator;
import org.eclipse.upr.bpmnprof.BpmnprofPackage;
import org.eclipse.upr.bpmnprof.InclusiveGateway;
import org.eclipse.upr.bpmnprof.SequenceFlow;
import org.eclipse.upr.bpmnprof.util.BpmnprofValidator;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Inclusive Gateway</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.upr.bpmnprof.impl.InclusiveGatewayImpl#getDefault <em>Default</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class InclusiveGatewayImpl extends NonExclusiveGatewayImpl implements InclusiveGateway {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected InclusiveGatewayImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return BpmnprofPackage.eINSTANCE.getInclusiveGateway();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SequenceFlow getDefault() {
SequenceFlow default_ = basicGetDefault();
return default_ != null && default_.eIsProxy() ? (SequenceFlow)eResolveProxy((InternalEObject)default_) : default_;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SequenceFlow basicGetDefault() {
// TODO: implement this method to return the 'Default' reference
// -> do not perform proxy resolution
// Ensure that you remove @generated or mark it @generated NOT
throw new UnsupportedOperationException();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDefault(SequenceFlow newDefault) {
// TODO: implement this method to set the 'Default' reference
// Ensure that you remove @generated or mark it @generated NOT
throw new UnsupportedOperationException();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean inclusiveGatewaydefault(DiagnosticChain diagnostics, Map<Object, Object> context) {
// TODO: implement this method
// -> specify the condition that violates the invariant
// -> verify the details of the diagnostic, including severity and message
// Ensure that you remove @generated or mark it @generated NOT
if (false) {
if (diagnostics != null) {
diagnostics.add
(new BasicDiagnostic
(Diagnostic.ERROR,
BpmnprofValidator.DIAGNOSTIC_SOURCE,
BpmnprofValidator.INCLUSIVE_GATEWAY__INCLUSIVE_GATEWAYDEFAULT,
EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "inclusiveGatewaydefault", EObjectValidator.getObjectLabel(this, context) }),
new Object [] { this }));
}
return false;
}
return true;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BpmnprofPackage.INCLUSIVE_GATEWAY__DEFAULT:
if (resolve) return getDefault();
return basicGetDefault();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case BpmnprofPackage.INCLUSIVE_GATEWAY__DEFAULT:
setDefault((SequenceFlow)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BpmnprofPackage.INCLUSIVE_GATEWAY__DEFAULT:
setDefault((SequenceFlow)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BpmnprofPackage.INCLUSIVE_GATEWAY__DEFAULT:
return basicGetDefault() != null;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
@SuppressWarnings("unchecked")
public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
switch (operationID) {
case BpmnprofPackage.INCLUSIVE_GATEWAY___INCLUSIVE_GATEWAYDEFAULT__DIAGNOSTICCHAIN_MAP:
return inclusiveGatewaydefault((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1));
}
return super.eInvoke(operationID, arguments);
}
} //InclusiveGatewayImpl