blob: 136b710b2109dcdcf993af7507eecaf5e712cb2b [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2016 David Carlson and others.
* 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:
* David Carlson (Clinical Cloud Solutions, LLC) - initial API and implementation
*******************************************************************************/
/**
*/
package org.eclipse.mdht.uml.fhir.core.resource.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.mdht.uml.fhir.core.resource.FhirResourcePackage;
import org.eclipse.mdht.uml.fhir.core.resource.OperationOutcome;
import org.eclipse.mdht.uml.fhir.core.resource.OperationOutcomeIssue;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Operation Outcome</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.OperationOutcomeImpl#getIssues <em>Issue</em>}</li>
* </ul>
*
* @generated
*/
public class OperationOutcomeImpl extends DomainResourceImpl implements OperationOutcome {
/**
* The cached value of the '{@link #getIssues() <em>Issue</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getIssues()
* @generated
* @ordered
*/
protected EList<OperationOutcomeIssue> issues;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected OperationOutcomeImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirResourcePackage.eINSTANCE.getOperationOutcome();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<OperationOutcomeIssue> getIssues() {
if (issues == null) {
issues = new EObjectContainmentEList<OperationOutcomeIssue>(OperationOutcomeIssue.class, this, FhirResourcePackage.OPERATION_OUTCOME__ISSUE);
}
return issues;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FhirResourcePackage.OPERATION_OUTCOME__ISSUE:
return ((InternalEList<?>)getIssues()).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 FhirResourcePackage.OPERATION_OUTCOME__ISSUE:
return getIssues();
}
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 FhirResourcePackage.OPERATION_OUTCOME__ISSUE:
getIssues().clear();
getIssues().addAll((Collection<? extends OperationOutcomeIssue>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FhirResourcePackage.OPERATION_OUTCOME__ISSUE:
getIssues().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FhirResourcePackage.OPERATION_OUTCOME__ISSUE:
return issues != null && !issues.isEmpty();
}
return super.eIsSet(featureID);
}
} //OperationOutcomeImpl