/******************************************************************************* | |
* Copyright (c) 2016 Fundación Tecnalia Research & Innovation. | |
* | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v2.0 | |
* which accompanies this distribution, and is available at | |
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html | |
* | |
* SPDX-License-Identifier: EPL-2.0 | |
* | |
* Contributors: | |
* Huascar Espinoza - initial API and implementation | |
* Alejandra Ruíz - initial API and implementation | |
* Idoya Del Río - initial API and implementation | |
* Mari Carmen Palacios - initial API and implementation | |
* Angel López - initial API and implementation | |
*******************************************************************************/ | |
/** | |
*/ | |
package org.eclipse.opencert.pkm.refframework.refframework.impl; | |
import java.util.Collection; | |
import org.eclipse.emf.common.util.EList; | |
import org.eclipse.emf.ecore.EClass; | |
import org.eclipse.opencert.infra.mappings.mapping.impl.EquivalenceMapImpl; | |
import org.eclipse.opencert.pkm.refframework.refframework.RefAssurableElement; | |
import org.eclipse.opencert.pkm.refframework.refframework.RefEquivalenceMap; | |
import org.eclipse.opencert.pkm.refframework.refframework.RefframeworkPackage; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model object '<em><b>Ref Equivalence Map</b></em>'. | |
* <!-- end-user-doc --> | |
* <p> | |
* The following features are implemented: | |
* <ul> | |
* <li>{@link org.eclipse.opencert.pkm.refframework.refframework.impl.RefEquivalenceMapImpl#getTarget <em>Target</em>}</li> | |
* </ul> | |
* </p> | |
* | |
* @generated | |
*/ | |
public class RefEquivalenceMapImpl extends EquivalenceMapImpl implements RefEquivalenceMap { | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected RefEquivalenceMapImpl() { | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
protected EClass eStaticClass() { | |
return RefframeworkPackage.Literals.REF_EQUIVALENCE_MAP; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@SuppressWarnings("unchecked") | |
public EList<RefAssurableElement> getTarget() { | |
return (EList<RefAssurableElement>)eDynamicGet(RefframeworkPackage.REF_EQUIVALENCE_MAP__TARGET, RefframeworkPackage.Literals.REF_EQUIVALENCE_MAP__TARGET, true, true); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public Object eGet(int featureID, boolean resolve, boolean coreType) { | |
switch (featureID) { | |
case RefframeworkPackage.REF_EQUIVALENCE_MAP__TARGET: | |
return getTarget(); | |
} | |
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 RefframeworkPackage.REF_EQUIVALENCE_MAP__TARGET: | |
getTarget().clear(); | |
getTarget().addAll((Collection<? extends RefAssurableElement>)newValue); | |
return; | |
} | |
super.eSet(featureID, newValue); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eUnset(int featureID) { | |
switch (featureID) { | |
case RefframeworkPackage.REF_EQUIVALENCE_MAP__TARGET: | |
getTarget().clear(); | |
return; | |
} | |
super.eUnset(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public boolean eIsSet(int featureID) { | |
switch (featureID) { | |
case RefframeworkPackage.REF_EQUIVALENCE_MAP__TARGET: | |
return !getTarget().isEmpty(); | |
} | |
return super.eIsSet(featureID); | |
} | |
} //RefEquivalenceMapImpl |