| /******************************************************************************* |
| * Copyright (c) 2009, 2019 Xored Software Inc 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 |
| * https://www.eclipse.org/legal/epl-v20.html |
| * |
| * Contributors: |
| * Xored Software Inc - initial API and implementation and/or initial documentation |
| *******************************************************************************/ |
| package org.eclipse.rcptt.core.ecl.core.model.impl; |
| |
| import org.eclipse.rcptt.core.ecl.core.model.PerspectiveInfo; |
| import org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| import org.eclipse.emf.ecore.impl.EObjectImpl; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Perspective Info</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.rcptt.core.ecl.core.model.impl.PerspectiveInfoImpl#getId <em>Id</em>}</li> |
| * <li>{@link org.eclipse.rcptt.core.ecl.core.model.impl.PerspectiveInfoImpl#getImage <em>Image</em>}</li> |
| * <li>{@link org.eclipse.rcptt.core.ecl.core.model.impl.PerspectiveInfoImpl#getLabel <em>Label</em>}</li> |
| * <li>{@link org.eclipse.rcptt.core.ecl.core.model.impl.PerspectiveInfoImpl#getDescription <em>Description</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class PerspectiveInfoImpl extends EObjectImpl implements PerspectiveInfo { |
| /** |
| * The default value of the '{@link #getId() <em>Id</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getId() |
| * @generated |
| * @ordered |
| */ |
| protected static final String ID_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getId() <em>Id</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getId() |
| * @generated |
| * @ordered |
| */ |
| protected String id = ID_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getImage() <em>Image</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getImage() |
| * @generated |
| * @ordered |
| */ |
| protected static final byte[] IMAGE_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getImage() <em>Image</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getImage() |
| * @generated |
| * @ordered |
| */ |
| protected byte[] image = IMAGE_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getLabel() <em>Label</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getLabel() |
| * @generated |
| * @ordered |
| */ |
| protected static final String LABEL_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getLabel() <em>Label</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getLabel() |
| * @generated |
| * @ordered |
| */ |
| protected String label = LABEL_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getDescription() <em>Description</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getDescription() |
| * @generated |
| * @ordered |
| */ |
| protected static final String DESCRIPTION_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getDescription() |
| * @generated |
| * @ordered |
| */ |
| protected String description = DESCRIPTION_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected PerspectiveInfoImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return Q7CorePackage.Literals.PERSPECTIVE_INFO; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getId() { |
| return id; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setId(String newId) { |
| String oldId = id; |
| id = newId; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.PERSPECTIVE_INFO__ID, oldId, id)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public byte[] getImage() { |
| return image; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setImage(byte[] newImage) { |
| byte[] oldImage = image; |
| image = newImage; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.PERSPECTIVE_INFO__IMAGE, oldImage, image)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getLabel() { |
| return label; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setLabel(String newLabel) { |
| String oldLabel = label; |
| label = newLabel; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.PERSPECTIVE_INFO__LABEL, oldLabel, label)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getDescription() { |
| return description; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setDescription(String newDescription) { |
| String oldDescription = description; |
| description = newDescription; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.PERSPECTIVE_INFO__DESCRIPTION, oldDescription, description)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case Q7CorePackage.PERSPECTIVE_INFO__ID: |
| return getId(); |
| case Q7CorePackage.PERSPECTIVE_INFO__IMAGE: |
| return getImage(); |
| case Q7CorePackage.PERSPECTIVE_INFO__LABEL: |
| return getLabel(); |
| case Q7CorePackage.PERSPECTIVE_INFO__DESCRIPTION: |
| return getDescription(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case Q7CorePackage.PERSPECTIVE_INFO__ID: |
| setId((String)newValue); |
| return; |
| case Q7CorePackage.PERSPECTIVE_INFO__IMAGE: |
| setImage((byte[])newValue); |
| return; |
| case Q7CorePackage.PERSPECTIVE_INFO__LABEL: |
| setLabel((String)newValue); |
| return; |
| case Q7CorePackage.PERSPECTIVE_INFO__DESCRIPTION: |
| setDescription((String)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case Q7CorePackage.PERSPECTIVE_INFO__ID: |
| setId(ID_EDEFAULT); |
| return; |
| case Q7CorePackage.PERSPECTIVE_INFO__IMAGE: |
| setImage(IMAGE_EDEFAULT); |
| return; |
| case Q7CorePackage.PERSPECTIVE_INFO__LABEL: |
| setLabel(LABEL_EDEFAULT); |
| return; |
| case Q7CorePackage.PERSPECTIVE_INFO__DESCRIPTION: |
| setDescription(DESCRIPTION_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case Q7CorePackage.PERSPECTIVE_INFO__ID: |
| return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); |
| case Q7CorePackage.PERSPECTIVE_INFO__IMAGE: |
| return IMAGE_EDEFAULT == null ? image != null : !IMAGE_EDEFAULT.equals(image); |
| case Q7CorePackage.PERSPECTIVE_INFO__LABEL: |
| return LABEL_EDEFAULT == null ? label != null : !LABEL_EDEFAULT.equals(label); |
| case Q7CorePackage.PERSPECTIVE_INFO__DESCRIPTION: |
| return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String toString() { |
| if (eIsProxy()) return super.toString(); |
| |
| StringBuffer result = new StringBuffer(super.toString()); |
| result.append(" (id: "); |
| result.append(id); |
| result.append(", image: "); |
| result.append(image); |
| result.append(", label: "); |
| result.append(label); |
| result.append(", description: "); |
| result.append(description); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //PerspectiveInfoImpl |