| /******************************************************************************* |
| * 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.verifications.status.impl; |
| |
| import org.eclipse.rcptt.verifications.status.StatusPackage; |
| import org.eclipse.rcptt.verifications.status.VerificationStatusData; |
| |
| 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>Verification Status Data</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.rcptt.verifications.status.impl.VerificationStatusDataImpl#getMessage <em>Message</em>}</li> |
| * <li>{@link org.eclipse.rcptt.verifications.status.impl.VerificationStatusDataImpl#getResourceId <em>Resource Id</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class VerificationStatusDataImpl extends EObjectImpl implements VerificationStatusData { |
| /** |
| * The default value of the '{@link #getMessage() <em>Message</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getMessage() |
| * @generated |
| * @ordered |
| */ |
| protected static final String MESSAGE_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getMessage() <em>Message</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getMessage() |
| * @generated |
| * @ordered |
| */ |
| protected String message = MESSAGE_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getResourceId() <em>Resource Id</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getResourceId() |
| * @generated |
| * @ordered |
| */ |
| protected static final String RESOURCE_ID_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getResourceId() <em>Resource Id</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getResourceId() |
| * @generated |
| * @ordered |
| */ |
| protected String resourceId = RESOURCE_ID_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected VerificationStatusDataImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return StatusPackage.Literals.VERIFICATION_STATUS_DATA; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getMessage() { |
| return message; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setMessage(String newMessage) { |
| String oldMessage = message; |
| message = newMessage; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, StatusPackage.VERIFICATION_STATUS_DATA__MESSAGE, oldMessage, message)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getResourceId() { |
| return resourceId; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setResourceId(String newResourceId) { |
| String oldResourceId = resourceId; |
| resourceId = newResourceId; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, StatusPackage.VERIFICATION_STATUS_DATA__RESOURCE_ID, oldResourceId, resourceId)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case StatusPackage.VERIFICATION_STATUS_DATA__MESSAGE: |
| return getMessage(); |
| case StatusPackage.VERIFICATION_STATUS_DATA__RESOURCE_ID: |
| return getResourceId(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case StatusPackage.VERIFICATION_STATUS_DATA__MESSAGE: |
| setMessage((String)newValue); |
| return; |
| case StatusPackage.VERIFICATION_STATUS_DATA__RESOURCE_ID: |
| setResourceId((String)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case StatusPackage.VERIFICATION_STATUS_DATA__MESSAGE: |
| setMessage(MESSAGE_EDEFAULT); |
| return; |
| case StatusPackage.VERIFICATION_STATUS_DATA__RESOURCE_ID: |
| setResourceId(RESOURCE_ID_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case StatusPackage.VERIFICATION_STATUS_DATA__MESSAGE: |
| return MESSAGE_EDEFAULT == null ? message != null : !MESSAGE_EDEFAULT.equals(message); |
| case StatusPackage.VERIFICATION_STATUS_DATA__RESOURCE_ID: |
| return RESOURCE_ID_EDEFAULT == null ? resourceId != null : !RESOURCE_ID_EDEFAULT.equals(resourceId); |
| } |
| 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(" (message: "); |
| result.append(message); |
| result.append(", resourceId: "); |
| result.append(resourceId); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //VerificationStatusDataImpl |