blob: 338dbc2a6cb6d596b29ab61c66fe1c5bac47f8b8 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2011, 2013 Formal Mind GmbH and University of Dusseldorf.
* 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:
* Michael Jastram - initial API and implementation
******************************************************************************/
package org.eclipse.rmf.reqif10.pror.configuration.impl;
import org.eclipse.emf.common.notify.Notification;
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.EObjectImpl;
import org.eclipse.rmf.reqif10.DatatypeDefinition;
import org.eclipse.rmf.reqif10.pror.configuration.ConfigurationPackage;
import org.eclipse.rmf.reqif10.pror.configuration.ProrPresentationConfiguration;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Pror Presentation Configuration</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.rmf.reqif10.pror.configuration.impl.ProrPresentationConfigurationImpl#getDatatype <em>Datatype</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public abstract class ProrPresentationConfigurationImpl extends EObjectImpl implements ProrPresentationConfiguration {
/**
* The cached value of the '{@link #getDatatype() <em>Datatype</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDatatype()
* @generated
* @ordered
*/
protected DatatypeDefinition datatype;
/**
* This is true if the Datatype reference has been set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
protected boolean datatypeESet;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ProrPresentationConfigurationImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return ConfigurationPackage.Literals.PROR_PRESENTATION_CONFIGURATION;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public DatatypeDefinition getDatatype() {
if (datatype != null && datatype.eIsProxy()) {
InternalEObject oldDatatype = (InternalEObject)datatype;
datatype = (DatatypeDefinition)eResolveProxy(oldDatatype);
if (datatype != oldDatatype) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.PROR_PRESENTATION_CONFIGURATION__DATATYPE, oldDatatype, datatype));
}
}
return datatype;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public DatatypeDefinition basicGetDatatype() {
return datatype;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDatatype(DatatypeDefinition newDatatype) {
DatatypeDefinition oldDatatype = datatype;
datatype = newDatatype;
boolean oldDatatypeESet = datatypeESet;
datatypeESet = true;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PROR_PRESENTATION_CONFIGURATION__DATATYPE, oldDatatype, datatype, !oldDatatypeESet));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void unsetDatatype() {
DatatypeDefinition oldDatatype = datatype;
boolean oldDatatypeESet = datatypeESet;
datatype = null;
datatypeESet = false;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.UNSET, ConfigurationPackage.PROR_PRESENTATION_CONFIGURATION__DATATYPE, oldDatatype, null, oldDatatypeESet));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isSetDatatype() {
return datatypeESet;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case ConfigurationPackage.PROR_PRESENTATION_CONFIGURATION__DATATYPE:
if (resolve) return getDatatype();
return basicGetDatatype();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case ConfigurationPackage.PROR_PRESENTATION_CONFIGURATION__DATATYPE:
setDatatype((DatatypeDefinition)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case ConfigurationPackage.PROR_PRESENTATION_CONFIGURATION__DATATYPE:
unsetDatatype();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case ConfigurationPackage.PROR_PRESENTATION_CONFIGURATION__DATATYPE:
return isSetDatatype();
}
return super.eIsSet(featureID);
}
} //ProrPresentationConfigurationImpl