| /** |
| * Copyright (c) 2014, Loetz GmbH&Co.KG (Heidelberg) |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Based on ideas from Xtext, Xtend, Xcore |
| * |
| * Contributors: |
| * Joerg Riegel - Initial implementation |
| * |
| */ |
| package org.eclipse.osbp.xtext.datainterchange.impl; |
| |
| import java.util.Collection; |
| |
| 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.util.EObjectContainmentEList; |
| import org.eclipse.emf.ecore.util.InternalEList; |
| |
| import org.eclipse.osbp.xtext.datainterchange.DataDSLPackage; |
| import org.eclipse.osbp.xtext.datainterchange.DataInterchangeMarkerEntity; |
| import org.eclipse.osbp.xtext.datainterchange.DataInterchangeMarkerPath; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Data Interchange Marker Path</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.osbp.xtext.datainterchange.impl.DataInterchangeMarkerPathImpl#getPath <em>Path</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class DataInterchangeMarkerPathImpl extends DataInterchangeLazyResolverImpl implements DataInterchangeMarkerPath { |
| /** |
| * The cached value of the '{@link #getPath() <em>Path</em>}' containment reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getPath() |
| * @generated |
| * @ordered |
| */ |
| protected EList<DataInterchangeMarkerEntity> path; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected DataInterchangeMarkerPathImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return DataDSLPackage.Literals.DATA_INTERCHANGE_MARKER_PATH; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList<DataInterchangeMarkerEntity> getPath() { |
| if (path == null) { |
| path = new EObjectContainmentEList<DataInterchangeMarkerEntity>(DataInterchangeMarkerEntity.class, this, DataDSLPackage.DATA_INTERCHANGE_MARKER_PATH__PATH); |
| } |
| return path; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case DataDSLPackage.DATA_INTERCHANGE_MARKER_PATH__PATH: |
| return ((InternalEList<?>)getPath()).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 DataDSLPackage.DATA_INTERCHANGE_MARKER_PATH__PATH: |
| return getPath(); |
| } |
| 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 DataDSLPackage.DATA_INTERCHANGE_MARKER_PATH__PATH: |
| getPath().clear(); |
| getPath().addAll((Collection<? extends DataInterchangeMarkerEntity>)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case DataDSLPackage.DATA_INTERCHANGE_MARKER_PATH__PATH: |
| getPath().clear(); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case DataDSLPackage.DATA_INTERCHANGE_MARKER_PATH__PATH: |
| return path != null && !path.isEmpty(); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //DataInterchangeMarkerPathImpl |