| /** |
| * Copyright (c) 2013 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: |
| * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation |
| * |
| * |
| */ |
| package org.eclipse.papyrus.infra.gmfdiag.style.cdo.impl; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.EObject; |
| import org.eclipse.emf.internal.cdo.CDOObjectImpl; |
| import org.eclipse.papyrus.infra.gmfdiag.style.PapyrusDiagramStyle; |
| import org.eclipse.papyrus.infra.gmfdiag.style.StylePackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Papyrus Diagram Style</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.papyrus.infra.gmfdiag.style.cdo.impl.PapyrusDiagramStyleImpl#getOwner <em>Owner</em>}</li> |
| * <li>{@link org.eclipse.papyrus.infra.gmfdiag.style.cdo.impl.PapyrusDiagramStyleImpl#getDiagramKindId <em>Diagram Kind Id</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class PapyrusDiagramStyleImpl extends CDOObjectImpl implements PapyrusDiagramStyle { |
| /** |
| * The default value of the '{@link #getDiagramKindId() <em>Diagram Kind Id</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getDiagramKindId() |
| * @generated |
| * @ordered |
| */ |
| protected static final String DIAGRAM_KIND_ID_EDEFAULT = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected PapyrusDiagramStyleImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected int eStaticFeatureCount() { |
| return 0; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EObject getOwner() { |
| return (EObject)eDynamicGet(StylePackage.PAPYRUS_DIAGRAM_STYLE__OWNER, StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE__OWNER, true, true); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EObject basicGetOwner() { |
| return (EObject)eDynamicGet(StylePackage.PAPYRUS_DIAGRAM_STYLE__OWNER, StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE__OWNER, false, true); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void setOwner(EObject newOwner) { |
| eDynamicSet(StylePackage.PAPYRUS_DIAGRAM_STYLE__OWNER, StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE__OWNER, newOwner); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String getDiagramKindId() { |
| return (String)eDynamicGet(StylePackage.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND_ID, StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND_ID, true, true); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void setDiagramKindId(String newDiagramKindId) { |
| eDynamicSet(StylePackage.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND_ID, StylePackage.Literals.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND_ID, newDiagramKindId); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case StylePackage.PAPYRUS_DIAGRAM_STYLE__OWNER: |
| if (resolve) { |
| return getOwner(); |
| } |
| return basicGetOwner(); |
| case StylePackage.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND_ID: |
| return getDiagramKindId(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case StylePackage.PAPYRUS_DIAGRAM_STYLE__OWNER: |
| setOwner((EObject)newValue); |
| return; |
| case StylePackage.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND_ID: |
| setDiagramKindId((String)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case StylePackage.PAPYRUS_DIAGRAM_STYLE__OWNER: |
| setOwner((EObject)null); |
| return; |
| case StylePackage.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND_ID: |
| setDiagramKindId(DIAGRAM_KIND_ID_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case StylePackage.PAPYRUS_DIAGRAM_STYLE__OWNER: |
| return basicGetOwner() != null; |
| case StylePackage.PAPYRUS_DIAGRAM_STYLE__DIAGRAM_KIND_ID: |
| return DIAGRAM_KIND_ID_EDEFAULT == null ? getDiagramKindId() != null : !DIAGRAM_KIND_ID_EDEFAULT.equals(getDiagramKindId()); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //PapyrusDiagramStyleImpl |