| /******************************************************************************* |
| * 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 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.OrderSetItemCustomization; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Order Set Item Customization</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.OrderSetItemCustomizationImpl#getPath <em>Path</em>}</li> |
| * <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.OrderSetItemCustomizationImpl#getExpression <em>Expression</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class OrderSetItemCustomizationImpl extends BackboneElementImpl implements OrderSetItemCustomization { |
| /** |
| * The cached value of the '{@link #getPath() <em>Path</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getPath() |
| * @generated |
| * @ordered |
| */ |
| protected org.eclipse.mdht.uml.fhir.core.datatype.String path; |
| |
| /** |
| * The cached value of the '{@link #getExpression() <em>Expression</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getExpression() |
| * @generated |
| * @ordered |
| */ |
| protected org.eclipse.mdht.uml.fhir.core.datatype.String expression; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected OrderSetItemCustomizationImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirResourcePackage.eINSTANCE.getOrderSetItemCustomization(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.eclipse.mdht.uml.fhir.core.datatype.String getPath() { |
| if (path != null && path.eIsProxy()) { |
| InternalEObject oldPath = (InternalEObject)path; |
| path = (org.eclipse.mdht.uml.fhir.core.datatype.String)eResolveProxy(oldPath); |
| if (path != oldPath) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.ORDER_SET_ITEM_CUSTOMIZATION__PATH, oldPath, path)); |
| } |
| } |
| return path; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.eclipse.mdht.uml.fhir.core.datatype.String basicGetPath() { |
| return path; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setPath(org.eclipse.mdht.uml.fhir.core.datatype.String newPath) { |
| org.eclipse.mdht.uml.fhir.core.datatype.String oldPath = path; |
| path = newPath; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.ORDER_SET_ITEM_CUSTOMIZATION__PATH, oldPath, path)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.eclipse.mdht.uml.fhir.core.datatype.String getExpression() { |
| if (expression != null && expression.eIsProxy()) { |
| InternalEObject oldExpression = (InternalEObject)expression; |
| expression = (org.eclipse.mdht.uml.fhir.core.datatype.String)eResolveProxy(oldExpression); |
| if (expression != oldExpression) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.ORDER_SET_ITEM_CUSTOMIZATION__EXPRESSION, oldExpression, expression)); |
| } |
| } |
| return expression; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.eclipse.mdht.uml.fhir.core.datatype.String basicGetExpression() { |
| return expression; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setExpression(org.eclipse.mdht.uml.fhir.core.datatype.String newExpression) { |
| org.eclipse.mdht.uml.fhir.core.datatype.String oldExpression = expression; |
| expression = newExpression; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.ORDER_SET_ITEM_CUSTOMIZATION__EXPRESSION, oldExpression, expression)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case FhirResourcePackage.ORDER_SET_ITEM_CUSTOMIZATION__PATH: |
| if (resolve) return getPath(); |
| return basicGetPath(); |
| case FhirResourcePackage.ORDER_SET_ITEM_CUSTOMIZATION__EXPRESSION: |
| if (resolve) return getExpression(); |
| return basicGetExpression(); |
| } |
| 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.ORDER_SET_ITEM_CUSTOMIZATION__PATH: |
| setPath((org.eclipse.mdht.uml.fhir.core.datatype.String)newValue); |
| return; |
| case FhirResourcePackage.ORDER_SET_ITEM_CUSTOMIZATION__EXPRESSION: |
| setExpression((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.ORDER_SET_ITEM_CUSTOMIZATION__PATH: |
| setPath((org.eclipse.mdht.uml.fhir.core.datatype.String)null); |
| return; |
| case FhirResourcePackage.ORDER_SET_ITEM_CUSTOMIZATION__EXPRESSION: |
| setExpression((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.ORDER_SET_ITEM_CUSTOMIZATION__PATH: |
| return path != null; |
| case FhirResourcePackage.ORDER_SET_ITEM_CUSTOMIZATION__EXPRESSION: |
| return expression != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //OrderSetItemCustomizationImpl |