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

org.omg.bpmn.bpmn2.impl.ExtensionImpl 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 javax.xml.namespace.QName;

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.impl.MinimalEObjectImpl;

import org.omg.bpmn.bpmn2.Bpmn2Package;
import org.omg.bpmn.bpmn2.Extension;
import org.omg.bpmn.bpmn2.ExtensionDefinition;

/**
 * 
 * An implementation of the model object 'Extension'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.omg.bpmn.bpmn2.impl.ExtensionImpl#getDefinition Definition}
  • *
  • {@link org.omg.bpmn.bpmn2.impl.ExtensionImpl#isMustUnderstand Must Understand}
  • *
  • {@link org.omg.bpmn.bpmn2.impl.ExtensionImpl#getXsdDefinition Xsd Definition}
  • *
* * @generated */ public class ExtensionImpl extends MinimalEObjectImpl.Container implements Extension { /** * The cached value of the '{@link #getDefinition() Definition}' containment reference. * * * @see #getDefinition() * @generated * @ordered */ protected ExtensionDefinition definition; /** * The default value of the '{@link #isMustUnderstand() Must Understand}' attribute. * * * @see #isMustUnderstand() * @generated * @ordered */ protected static final boolean MUST_UNDERSTAND_EDEFAULT = false; /** * The cached value of the '{@link #isMustUnderstand() Must Understand}' attribute. * * * @see #isMustUnderstand() * @generated * @ordered */ protected boolean mustUnderstand = MUST_UNDERSTAND_EDEFAULT; /** * The default value of the '{@link #getXsdDefinition() Xsd Definition}' attribute. * * * @see #getXsdDefinition() * @generated * @ordered */ protected static final QName XSD_DEFINITION_EDEFAULT = null; /** * The cached value of the '{@link #getXsdDefinition() Xsd Definition}' attribute. * * * @see #getXsdDefinition() * @generated * @ordered */ protected QName xsdDefinition = XSD_DEFINITION_EDEFAULT; /** * * * @generated */ protected ExtensionImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return Bpmn2Package.eINSTANCE.getExtension(); } /** * * * @generated */ @Override public ExtensionDefinition getDefinition() { return definition; } /** * * * @generated */ public NotificationChain basicSetDefinition(ExtensionDefinition newDefinition, NotificationChain msgs) { ExtensionDefinition oldDefinition = definition; definition = newDefinition; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Bpmn2Package.EXTENSION__DEFINITION, oldDefinition, newDefinition); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ @Override public void setDefinition(ExtensionDefinition newDefinition) { if (newDefinition != definition) { NotificationChain msgs = null; if (definition != null) msgs = ((InternalEObject)definition).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Bpmn2Package.EXTENSION__DEFINITION, null, msgs); if (newDefinition != null) msgs = ((InternalEObject)newDefinition).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Bpmn2Package.EXTENSION__DEFINITION, null, msgs); msgs = basicSetDefinition(newDefinition, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.EXTENSION__DEFINITION, newDefinition, newDefinition)); } /** * * * @generated */ @Override public boolean isMustUnderstand() { return mustUnderstand; } /** * * * @generated */ @Override public void setMustUnderstand(boolean newMustUnderstand) { boolean oldMustUnderstand = mustUnderstand; mustUnderstand = newMustUnderstand; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.EXTENSION__MUST_UNDERSTAND, oldMustUnderstand, mustUnderstand)); } /** * * * @generated */ @Override public QName getXsdDefinition() { return xsdDefinition; } /** * * * @generated */ @Override public void setXsdDefinition(QName newXsdDefinition) { QName oldXsdDefinition = xsdDefinition; xsdDefinition = newXsdDefinition; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.EXTENSION__XSD_DEFINITION, oldXsdDefinition, xsdDefinition)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case Bpmn2Package.EXTENSION__DEFINITION: return basicSetDefinition(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case Bpmn2Package.EXTENSION__DEFINITION: return getDefinition(); case Bpmn2Package.EXTENSION__MUST_UNDERSTAND: return isMustUnderstand(); case Bpmn2Package.EXTENSION__XSD_DEFINITION: return getXsdDefinition(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case Bpmn2Package.EXTENSION__DEFINITION: setDefinition((ExtensionDefinition)newValue); return; case Bpmn2Package.EXTENSION__MUST_UNDERSTAND: setMustUnderstand((Boolean)newValue); return; case Bpmn2Package.EXTENSION__XSD_DEFINITION: setXsdDefinition((QName)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case Bpmn2Package.EXTENSION__DEFINITION: setDefinition((ExtensionDefinition)null); return; case Bpmn2Package.EXTENSION__MUST_UNDERSTAND: setMustUnderstand(MUST_UNDERSTAND_EDEFAULT); return; case Bpmn2Package.EXTENSION__XSD_DEFINITION: setXsdDefinition(XSD_DEFINITION_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case Bpmn2Package.EXTENSION__DEFINITION: return definition != null; case Bpmn2Package.EXTENSION__MUST_UNDERSTAND: return mustUnderstand != MUST_UNDERSTAND_EDEFAULT; case Bpmn2Package.EXTENSION__XSD_DEFINITION: return XSD_DEFINITION_EDEFAULT == null ? xsdDefinition != null : !XSD_DEFINITION_EDEFAULT.equals(xsdDefinition); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (mustUnderstand: "); result.append(mustUnderstand); result.append(", xsdDefinition: "); result.append(xsdDefinition); result.append(')'); return result.toString(); } } //ExtensionImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy