| /******************************************************************************* |
| * Copyright (c) 2008-2010 Sonatype, Inc. |
| * 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: |
| * Sonatype, Inc. - initial API and implementation |
| *******************************************************************************/ |
| |
| package org.eclipse.m2e.model.edit.pom.impl; |
| |
| 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; |
| |
| import org.eclipse.m2e.model.edit.pom.IssueManagement; |
| import org.eclipse.m2e.model.edit.pom.PomPackage; |
| |
| |
| /** |
| * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Issue Management</b></em>'. <!-- end-user-doc |
| * --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.m2e.model.edit.pom.impl.IssueManagementImpl#getSystem <em>System</em>}</li> |
| * <li>{@link org.eclipse.m2e.model.edit.pom.impl.IssueManagementImpl#getUrl <em> Url</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class IssueManagementImpl extends EObjectImpl implements IssueManagement { |
| /** |
| * The default value of the '{@link #getSystem() <em>System</em>}' attribute. <!-- begin-user-doc --> <!-- |
| * end-user-doc --> |
| * |
| * @see #getSystem() |
| * @generated |
| * @ordered |
| */ |
| protected static final String SYSTEM_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getSystem() <em>System</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc |
| * --> |
| * |
| * @see #getSystem() |
| * @generated |
| * @ordered |
| */ |
| protected String system = SYSTEM_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getUrl() <em>Url</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @see #getUrl() |
| * @generated |
| * @ordered |
| */ |
| protected static final String URL_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getUrl() <em>Url</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @see #getUrl() |
| * @generated |
| * @ordered |
| */ |
| protected String url = URL_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| protected IssueManagementImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return PomPackage.Literals.ISSUE_MANAGEMENT; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public String getSystem() { |
| return system; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public void setSystem(String newSystem) { |
| String oldSystem = system; |
| system = newSystem; |
| if(eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, PomPackage.ISSUE_MANAGEMENT__SYSTEM, oldSystem, system)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public String getUrl() { |
| return url; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public void setUrl(String newUrl) { |
| String oldUrl = url; |
| url = newUrl; |
| if(eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, PomPackage.ISSUE_MANAGEMENT__URL, oldUrl, url)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch(featureID) { |
| case PomPackage.ISSUE_MANAGEMENT__SYSTEM: |
| return getSystem(); |
| case PomPackage.ISSUE_MANAGEMENT__URL: |
| return getUrl(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch(featureID) { |
| case PomPackage.ISSUE_MANAGEMENT__SYSTEM: |
| setSystem((String) newValue); |
| return; |
| case PomPackage.ISSUE_MANAGEMENT__URL: |
| setUrl((String) newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch(featureID) { |
| case PomPackage.ISSUE_MANAGEMENT__SYSTEM: |
| setSystem(SYSTEM_EDEFAULT); |
| return; |
| case PomPackage.ISSUE_MANAGEMENT__URL: |
| setUrl(URL_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch(featureID) { |
| case PomPackage.ISSUE_MANAGEMENT__SYSTEM: |
| return SYSTEM_EDEFAULT == null ? system != null : !SYSTEM_EDEFAULT.equals(system); |
| case PomPackage.ISSUE_MANAGEMENT__URL: |
| return URL_EDEFAULT == null ? url != null : !URL_EDEFAULT.equals(url); |
| } |
| 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(" (system: "); //$NON-NLS-1$ |
| result.append(system); |
| result.append(", url: "); //$NON-NLS-1$ |
| result.append(url); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } // IssueManagementImpl |