blob: 7b6e809b15437dbf2dbabde0803717d4d52595c3 [file] [log] [blame]
/**
* ****************************************************************************
* Copyright (c) 2020 CEA LIST.
*
*
* 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
*
* Contributors:
* Asma Smaoui (CEA LIST) asma.smaoui@cea.fr - Initial API and implementation
*
* ****************************************************************************
*/
package io.shell.admin.aas._1._0.impl;
import io.shell.admin.aas._1._0.AssetT;
import io.shell.admin.aas._1._0.AssetsT;
import io.shell.admin.aas._1._0._0Package;
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.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Assets T</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link io.shell.admin.aas._1._0.impl.AssetsTImpl#getAsset <em>Asset</em>}</li>
* </ul>
*
* @generated
*/
public class AssetsTImpl extends MinimalEObjectImpl.Container implements AssetsT {
/**
* The cached value of the '{@link #getAsset() <em>Asset</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getAsset()
* @generated
* @ordered
*/
protected EList<AssetT> asset;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected AssetsTImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return _0Package.Literals.ASSETS_T;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<AssetT> getAsset() {
if (asset == null) {
asset = new EObjectContainmentEList<AssetT>(AssetT.class, this, _0Package.ASSETS_T__ASSET);
}
return asset;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case _0Package.ASSETS_T__ASSET:
return ((InternalEList<?>)getAsset()).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 _0Package.ASSETS_T__ASSET:
return getAsset();
}
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 _0Package.ASSETS_T__ASSET:
getAsset().clear();
getAsset().addAll((Collection<? extends AssetT>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case _0Package.ASSETS_T__ASSET:
getAsset().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case _0Package.ASSETS_T__ASSET:
return asset != null && !asset.isEmpty();
}
return super.eIsSet(featureID);
}
} //AssetsTImpl