diff options
Diffstat (limited to 'extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/elements/impl/TraceableSpecificationImpl.java')
-rw-r--r-- | extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/elements/impl/TraceableSpecificationImpl.java | 173 |
1 files changed, 173 insertions, 0 deletions
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/elements/impl/TraceableSpecificationImpl.java b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/elements/impl/TraceableSpecificationImpl.java new file mode 100644 index 00000000000..b6968595035 --- /dev/null +++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/elements/impl/TraceableSpecificationImpl.java @@ -0,0 +1,173 @@ +/***************************************************************************** + * Copyright (c) 2010 CEA LIST. + * + * + * 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: + * Sara TUCCI (CEA LIST) sara.tucci@cea.fr - Initial API and implementation + * Chokri MRAIDHA (CEA LIST) chokri.mraidha@cea.fr - Initial API and implementation + * David SERVAT (CEA LIST) david.servat@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.eastadl.infrastructure.elements.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.papyrus.eastadl.infrastructure.elements.ElementsPackage; +import org.eclipse.papyrus.eastadl.infrastructure.elements.TraceableSpecification; + + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Traceable Specification</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.papyrus.eastadl.infrastructure.elements.impl.TraceableSpecificationImpl#getNote <em>Note</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public abstract class TraceableSpecificationImpl extends EAPackageableElementImpl implements TraceableSpecification { + /** + * The default value of the '{@link #getNote() <em>Note</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNote() + * @generated + * @ordered + */ + protected static final String NOTE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNote() <em>Note</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNote() + * @generated + * @ordered + */ + protected String note = NOTE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected TraceableSpecificationImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ElementsPackage.TRACEABLE_SPECIFICATION__NOTE: + return getNote(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ElementsPackage.TRACEABLE_SPECIFICATION__NOTE: + return NOTE_EDEFAULT == null ? note != null : !NOTE_EDEFAULT.equals(note); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ElementsPackage.TRACEABLE_SPECIFICATION__NOTE: + setNote((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ElementsPackage.Literals.TRACEABLE_SPECIFICATION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ElementsPackage.TRACEABLE_SPECIFICATION__NOTE: + setNote(NOTE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getNote() { + return note; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setNote(String newNote) { + String oldNote = note; + note = newNote; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ElementsPackage.TRACEABLE_SPECIFICATION__NOTE, oldNote, note)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (note: "); + result.append(note); + result.append(')'); + return result.toString(); + } + +} //TraceableSpecificationImpl |