Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'core/org.eclipse.papyrus.di/src/org/eclipse/papyrus/di/impl/ImageImpl.java')
-rw-r--r--core/org.eclipse.papyrus.di/src/org/eclipse/papyrus/di/impl/ImageImpl.java227
1 files changed, 227 insertions, 0 deletions
diff --git a/core/org.eclipse.papyrus.di/src/org/eclipse/papyrus/di/impl/ImageImpl.java b/core/org.eclipse.papyrus.di/src/org/eclipse/papyrus/di/impl/ImageImpl.java
new file mode 100644
index 00000000000..59d232a4d30
--- /dev/null
+++ b/core/org.eclipse.papyrus.di/src/org/eclipse/papyrus/di/impl/ImageImpl.java
@@ -0,0 +1,227 @@
+/*****************************************************************************
+ * Copyright (c) 2008 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:
+ * Patrick Tessier (CEA LIST) Patrick.Tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.di.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.di.DiPackage;
+import org.eclipse.papyrus.di.Image;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Image</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.di.impl.ImageImpl#getUri <em>Uri</em>}</li>
+ * <li>{@link org.eclipse.papyrus.di.impl.ImageImpl#getMimeType <em>Mime Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ImageImpl extends LeafElementImpl implements Image {
+ /**
+ * The default value of the '{@link #getUri() <em>Uri</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getUri()
+ * @generated
+ * @ordered
+ */
+ protected static final String URI_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getUri() <em>Uri</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getUri()
+ * @generated
+ * @ordered
+ */
+ protected String uri = URI_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getMimeType() <em>Mime Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMimeType()
+ * @generated
+ * @ordered
+ */
+ protected static final String MIME_TYPE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getMimeType() <em>Mime Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMimeType()
+ * @generated
+ * @ordered
+ */
+ protected String mimeType = MIME_TYPE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ImageImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DiPackage.Literals.IMAGE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getUri() {
+ return uri;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setUri(String newUri) {
+ String oldUri = uri;
+ uri = newUri;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiPackage.IMAGE__URI, oldUri, uri));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getMimeType() {
+ return mimeType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setMimeType(String newMimeType) {
+ String oldMimeType = mimeType;
+ mimeType = newMimeType;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DiPackage.IMAGE__MIME_TYPE, oldMimeType, mimeType));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case DiPackage.IMAGE__URI:
+ return getUri();
+ case DiPackage.IMAGE__MIME_TYPE:
+ return getMimeType();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case DiPackage.IMAGE__URI:
+ setUri((String)newValue);
+ return;
+ case DiPackage.IMAGE__MIME_TYPE:
+ setMimeType((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case DiPackage.IMAGE__URI:
+ setUri(URI_EDEFAULT);
+ return;
+ case DiPackage.IMAGE__MIME_TYPE:
+ setMimeType(MIME_TYPE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case DiPackage.IMAGE__URI:
+ return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri);
+ case DiPackage.IMAGE__MIME_TYPE:
+ return MIME_TYPE_EDEFAULT == null ? mimeType != null : !MIME_TYPE_EDEFAULT.equals(mimeType);
+ }
+ 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(" (uri: ");
+ result.append(uri);
+ result.append(", mimeType: ");
+ result.append(mimeType);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ImageImpl

Back to the top