diff options
Diffstat (limited to 'org.eclipse.rmf.pror.reqif10/src/org/eclipse/rmf/pror/reqif10/configuration/impl/ProrSpecViewConfigurationImpl.java')
-rw-r--r-- | org.eclipse.rmf.pror.reqif10/src/org/eclipse/rmf/pror/reqif10/configuration/impl/ProrSpecViewConfigurationImpl.java | 225 |
1 files changed, 225 insertions, 0 deletions
diff --git a/org.eclipse.rmf.pror.reqif10/src/org/eclipse/rmf/pror/reqif10/configuration/impl/ProrSpecViewConfigurationImpl.java b/org.eclipse.rmf.pror.reqif10/src/org/eclipse/rmf/pror/reqif10/configuration/impl/ProrSpecViewConfigurationImpl.java new file mode 100644 index 00000000..dfda6833 --- /dev/null +++ b/org.eclipse.rmf.pror.reqif10/src/org/eclipse/rmf/pror/reqif10/configuration/impl/ProrSpecViewConfigurationImpl.java @@ -0,0 +1,225 @@ +/******************************************************************************* + * Copyright (c) 2011 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.pror.reqif10.configuration.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +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.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.rmf.pror.reqif10.configuration.Column; +import org.eclipse.rmf.pror.reqif10.configuration.ConfigPackage; +import org.eclipse.rmf.pror.reqif10.configuration.ProrSpecViewConfiguration; +import org.eclipse.rmf.reqif10.Specification; + + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Pror Spec View Configuration</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.rmf.pror.reqif10.configuration.impl.ProrSpecViewConfigurationImpl#getSpecification <em>Specification</em>}</li> + * <li>{@link org.eclipse.rmf.pror.reqif10.configuration.impl.ProrSpecViewConfigurationImpl#getColumns <em>Columns</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class ProrSpecViewConfigurationImpl extends EObjectImpl implements ProrSpecViewConfiguration { + /** + * The cached value of the '{@link #getSpecification() <em>Specification</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSpecification() + * @generated + * @ordered + */ + protected Specification specification; + + /** + * The cached value of the '{@link #getColumns() <em>Columns</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getColumns() + * @generated + * @ordered + */ + protected EList<Column> columns; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ProrSpecViewConfigurationImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ConfigPackage.Literals.PROR_SPEC_VIEW_CONFIGURATION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Specification getSpecification() { + if (specification != null && specification.eIsProxy()) { + InternalEObject oldSpecification = (InternalEObject)specification; + specification = (Specification)eResolveProxy(oldSpecification); + if (specification != oldSpecification) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigPackage.PROR_SPEC_VIEW_CONFIGURATION__SPECIFICATION, oldSpecification, specification)); + } + } + return specification; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Specification basicGetSpecification() { + return specification; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setSpecification(Specification newSpecification) { + Specification oldSpecification = specification; + specification = newSpecification; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ConfigPackage.PROR_SPEC_VIEW_CONFIGURATION__SPECIFICATION, oldSpecification, specification)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<Column> getColumns() { + if (columns == null) { + columns = new EObjectContainmentEList<Column>(Column.class, this, ConfigPackage.PROR_SPEC_VIEW_CONFIGURATION__COLUMNS); + } + return columns; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ConfigPackage.PROR_SPEC_VIEW_CONFIGURATION__COLUMNS: + return ((InternalEList<?>)getColumns()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ConfigPackage.PROR_SPEC_VIEW_CONFIGURATION__SPECIFICATION: + if (resolve) return getSpecification(); + return basicGetSpecification(); + case ConfigPackage.PROR_SPEC_VIEW_CONFIGURATION__COLUMNS: + return getColumns(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ConfigPackage.PROR_SPEC_VIEW_CONFIGURATION__SPECIFICATION: + setSpecification((Specification)newValue); + return; + case ConfigPackage.PROR_SPEC_VIEW_CONFIGURATION__COLUMNS: + getColumns().clear(); + getColumns().addAll((Collection<? extends Column>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ConfigPackage.PROR_SPEC_VIEW_CONFIGURATION__SPECIFICATION: + setSpecification((Specification)null); + return; + case ConfigPackage.PROR_SPEC_VIEW_CONFIGURATION__COLUMNS: + getColumns().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ConfigPackage.PROR_SPEC_VIEW_CONFIGURATION__SPECIFICATION: + return specification != null; + case ConfigPackage.PROR_SPEC_VIEW_CONFIGURATION__COLUMNS: + return columns != null && !columns.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ProrSpecViewConfigurationImpl |