gt: 		switch (featureID) {
context: /*******************************************************************************
   * Debrief - the Open Source Maritime Analysis Application
   * http://debrief.info
   *
   * (C) 2000-2020, Deep Blue C Technology Ltd
   *
   * This library is free software; you can redistribute it and/or
   * modify it under the terms of the Eclipse Public License v1.0
   * (http://www.eclipse.org/legal/epl-v10.html)
   *
   * This library is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
   *******************************************************************************/
  /**
   */
  package info.limpet.stackedcharts.model.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.MinimalEObjectImpl;
  import org.eclipse.emf.ecore.util.EObjectContainmentEList;
  import org.eclipse.emf.ecore.util.InternalEList;
  
  import info.limpet.stackedcharts.model.DataItem;
  import info.limpet.stackedcharts.model.Dataset;
  import info.limpet.stackedcharts.model.StackedchartsPackage;
  import info.limpet.stackedcharts.model.Styling;
  
  /**
   * <!-- begin-user-doc --> An implementation of the model object
   * '<em><b>Dataset</b></em>'. <!-- end-user-doc -->
   * <p>
   * The following features are implemented:
   * </p>
   * <ul>
   * <li>{@link info.limpet.stackedcharts.model.impl.DatasetImpl#getName
   * <em>Name</em>}</li>
   * <li>{@link info.limpet.stackedcharts.model.impl.DatasetImpl#getMeasurements
   * <em>Measurements</em>}</li>
   * <li>{@link info.limpet.stackedcharts.model.impl.DatasetImpl#getStyling
   * <em>Styling</em>}</li>
   * <li>{@link info.limpet.stackedcharts.model.impl.DatasetImpl#getUnits
   * <em>Units</em>}</li>
   * </ul>
   *
   * @generated
   */
  public class DatasetImpl extends MinimalEObjectImpl.Container implements Dataset {
  	/**
  	 * The default value of the '{@link #getName() <em>Name</em>}' attribute. <!--
  	 * begin-user-doc --> <!-- end-user-doc -->
  	 *
  	 * @see #getName()
  	 * @generated
  	 * @ordered
  	 */
  	protected static final String NAME_EDEFAULT = null;
  
  	/**
  	 * The default value of the '{@link #getUnits() <em>Units</em>}' attribute. <!--
  	 * begin-user-doc --> <!-- end-user-doc -->
  	 *
  	 * @see #getUnits()
  	 * @generated
  	 * @ordered
  	 */
  	protected static final String UNITS_EDEFAULT = null;
  
  	/**
  	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute. <!--
  	 * begin-user-doc --> <!-- end-user-doc -->
  	 *
  	 * @see #getName()
  	 * @generated
  	 * @ordered
  	 */
  	protected String name = NAME_EDEFAULT;
  
  	/**
  	 * The cached value of the '{@link #getMeasurements() <em>Measurements</em>}'
  	 * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
  	 *
  	 * @see #getMeasurements()
  	 * @generated
  	 * @ordered
  	 */
  	protected EList<DataItem> measurements;
  
  	/**
  	 * The cached value of the '{@link #getStyling() <em>Styling</em>}' containment
  	 * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
  	 *
  	 * @see #getStyling()
  	 * @generated
  	 * @ordered
  	 */
  	protected Styling styling;
  
  	/**
  	 * The cached value of the '{@link #getUnits() <em>Units</em>}' attribute. <!--
  	 * begin-user-doc --> <!-- end-user-doc -->
  	 *
  	 * @see #getUnits()
  	 * @generated
  	 * @ordered
  	 */
  	protected String units = UNITS_EDEFAULT;
  
  	/**
  	 * <!-- begin-user-doc --> <!-- end-user-doc -->
  	 *
  	 * @generated
  	 */
  	protected DatasetImpl() {
  		super();
  	}
  
  	/**
  	 * <!-- begin-user-doc --> <!-- end-user-doc -->
  	 *
  	 * @generated
  	 */
  	public NotificationChain basicSetStyling(final Styling newStyling, NotificationChain msgs) {
  		final Styling oldStyling = styling;
  		styling = newStyling;
  		if (eNotificationRequired()) {
  			final ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
  					StackedchartsPackage.DATASET__STYLING, oldStyling, newStyling);
  			if (msgs == null)
  				msgs = notification;
  			else
  				msgs.add(notification);
  		}
  		return msgs;
  	}
  
  	/**
  	 * <!-- begin-user-doc --> <!-- end-user-doc -->
  	 *
  	 * @generated
  	 */
  	@Override
  	public Object eGet(final int featureID, final boolean resolve, final boolean coreType) {
  		switch (featureID) {
  		case StackedchartsPackage.DATASET__NAME:
  			return getName();
  		case StackedchartsPackage.DATASET__MEASUREMENTS:
  			return getMeasurements();
  		case StackedchartsPackage.DATASET__STYLING:
  			return getStyling();
  		case StackedchartsPackage.DATASET__UNITS:
  			return getUnits();
  		}
  		return super.eGet(featureID, resolve, coreType);
  	}
  
  	/**
  	 * <!-- begin-user-doc --> <!-- end-user-doc -->
  	 *
  	 * @generated
  	 */
  	@Override
  	public NotificationChain eInverseRemove(final InternalEObject otherEnd, final int featureID,
  			final NotificationChain msgs) {
  		switch (featureID) {
  		case StackedchartsPackage.DATASET__MEASUREMENTS:
  			return ((InternalEList<?>) getMeasurements()).basicRemove(otherEnd, msgs);
  		case StackedchartsPackage.DATASET__STYLING:
  			return basicSetStyling(null, msgs);
  		}
  		return super.eInverseRemove(otherEnd, featureID, msgs);
  	}
  
  	/**
  	 * <!-- begin-user-doc --> <!-- end-user-doc -->
  	 *
  	 * @generated
  	 */
  	@Override
  	public boolean eIsSet(final int featureID) {
  		switch (featureID) {
  		case StackedchartsPackage.DATASET__NAME:
  			return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
  		case StackedchartsPackage.DATASET__MEASUREMENTS:
  			return measurements != null && !measurements.isEmpty();
  		case StackedchartsPackage.DATASET__STYLING:
  			return styling != null;
  		case StackedchartsPackage.DATASET__UNITS:
  			return UNITS_EDEFAULT == null ? units != null : !UNITS_EDEFAULT.equals(units);
  		}
  		return super.eIsSet(featureID);
  	}
  
  	/**
  	 * <!-- begin-user-doc --> <!-- end-user-doc -->
  	 *
  	 * @generated
  	 */
  	@SuppressWarnings("unchecked")
  	@Override
  	public void eSet(final int featureID, final Object newValue) {
  		switch (featureID) {
  		case StackedchartsPackage.DATASET__NAME:
  			setName((String) newValue);
  			return;
  		case StackedchartsPackage.DATASET__MEASUREMENTS:
  			getMeasurements().clear();
  			getMeasurements().addAll((Collection<? extends DataItem>) newValue);
  			return;
  		case StackedchartsPackage.DATASET__STYLING:
  			setStyling((Styling) newValue);
  			return;
  		case StackedchartsPackage.DATASET__UNITS:
  			setUnits((String) newValue);
  			return;
  		}
  		super.eSet(featureID, newValue);
  	}
  
  	/**
  	 * <!-- begin-user-doc --> <!-- end-user-doc -->
  	 *
  	 * @generated
  	 */
  	@Override
  	protected EClass eStaticClass() {
  		return StackedchartsPackage.Literals.DATASET;
  	}
  
  	/**
  	 * <!-- begin-user-doc --> <!-- end-user-doc -->
  	 *
  	 * @generated
  	 */
  	@Override
  	public void eUnset(final int featureID) {
  