blob: 627bd82d5d95b6e1d7a6dc957d4c1918805d6d3c [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2015 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 org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.mdht.uml.fhir.core.datatype.impl.BackboneElementImpl;
import org.eclipse.mdht.uml.fhir.core.resource.FhirResourcePackage;
import org.eclipse.mdht.uml.fhir.core.resource.TestScriptSetupActionOperationRequestHeader;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Test Script Setup Action Operation Request Header</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.TestScriptSetupActionOperationRequestHeaderImpl#getField <em>Field</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.TestScriptSetupActionOperationRequestHeaderImpl#getValue <em>Value</em>}</li>
* </ul>
*
* @generated
*/
public class TestScriptSetupActionOperationRequestHeaderImpl extends BackboneElementImpl implements TestScriptSetupActionOperationRequestHeader {
/**
* The cached value of the '{@link #getField() <em>Field</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getField()
* @generated
* @ordered
*/
protected org.eclipse.mdht.uml.fhir.core.datatype.String field;
/**
* The cached value of the '{@link #getValue() <em>Value</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValue()
* @generated
* @ordered
*/
protected org.eclipse.mdht.uml.fhir.core.datatype.String value;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected TestScriptSetupActionOperationRequestHeaderImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirResourcePackage.eINSTANCE.getTestScriptSetupActionOperationRequestHeader();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.mdht.uml.fhir.core.datatype.String getField() {
if (field != null && field.eIsProxy()) {
InternalEObject oldField = (InternalEObject)field;
field = (org.eclipse.mdht.uml.fhir.core.datatype.String)eResolveProxy(oldField);
if (field != oldField) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.TEST_SCRIPT_SETUP_ACTION_OPERATION_REQUEST_HEADER__FIELD, oldField, field));
}
}
return field;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.mdht.uml.fhir.core.datatype.String basicGetField() {
return field;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setField(org.eclipse.mdht.uml.fhir.core.datatype.String newField) {
org.eclipse.mdht.uml.fhir.core.datatype.String oldField = field;
field = newField;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.TEST_SCRIPT_SETUP_ACTION_OPERATION_REQUEST_HEADER__FIELD, oldField, field));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.mdht.uml.fhir.core.datatype.String getValue() {
if (value != null && value.eIsProxy()) {
InternalEObject oldValue = (InternalEObject)value;
value = (org.eclipse.mdht.uml.fhir.core.datatype.String)eResolveProxy(oldValue);
if (value != oldValue) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.TEST_SCRIPT_SETUP_ACTION_OPERATION_REQUEST_HEADER__VALUE, oldValue, value));
}
}
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.mdht.uml.fhir.core.datatype.String basicGetValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setValue(org.eclipse.mdht.uml.fhir.core.datatype.String newValue) {
org.eclipse.mdht.uml.fhir.core.datatype.String oldValue = value;
value = newValue;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.TEST_SCRIPT_SETUP_ACTION_OPERATION_REQUEST_HEADER__VALUE, oldValue, value));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FhirResourcePackage.TEST_SCRIPT_SETUP_ACTION_OPERATION_REQUEST_HEADER__FIELD:
if (resolve) return getField();
return basicGetField();
case FhirResourcePackage.TEST_SCRIPT_SETUP_ACTION_OPERATION_REQUEST_HEADER__VALUE:
if (resolve) return getValue();
return basicGetValue();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case FhirResourcePackage.TEST_SCRIPT_SETUP_ACTION_OPERATION_REQUEST_HEADER__FIELD:
setField((org.eclipse.mdht.uml.fhir.core.datatype.String)newValue);
return;
case FhirResourcePackage.TEST_SCRIPT_SETUP_ACTION_OPERATION_REQUEST_HEADER__VALUE:
setValue((org.eclipse.mdht.uml.fhir.core.datatype.String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FhirResourcePackage.TEST_SCRIPT_SETUP_ACTION_OPERATION_REQUEST_HEADER__FIELD:
setField((org.eclipse.mdht.uml.fhir.core.datatype.String)null);
return;
case FhirResourcePackage.TEST_SCRIPT_SETUP_ACTION_OPERATION_REQUEST_HEADER__VALUE:
setValue((org.eclipse.mdht.uml.fhir.core.datatype.String)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FhirResourcePackage.TEST_SCRIPT_SETUP_ACTION_OPERATION_REQUEST_HEADER__FIELD:
return field != null;
case FhirResourcePackage.TEST_SCRIPT_SETUP_ACTION_OPERATION_REQUEST_HEADER__VALUE:
return value != null;
}
return super.eIsSet(featureID);
}
} //TestScriptSetupActionOperationRequestHeaderImpl