/******************************************************************************* * Copyright (c) 2006-2012 * Software Technology Group, Dresden University of Technology * DevBoost GmbH, Berlin, Amtsgericht Charlottenburg, HRB 140026 * * 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: * Software Technology Group - TU Dresden, Germany; * DevBoost GmbH - Berlin, Germany * - initial API and implementation ******************************************************************************/ /** * <copyright> * </copyright> * * $Id$ */ package org.oasisopen.names.tc.opendocument.xmlns.drawing.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.oasisopen.names.tc.opendocument.xmlns.drawing.DrawingPackage; import org.oasisopen.names.tc.opendocument.xmlns.drawing.FillImageType; import org.w3.xlink.ActuateType; import org.w3.xlink.ShowType1; import org.w3.xlink.TypeType; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Fill Image Type</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.oasisopen.names.tc.opendocument.xmlns.drawing.impl.FillImageTypeImpl#getActuate <em>Actuate</em>}</li> * <li>{@link org.oasisopen.names.tc.opendocument.xmlns.drawing.impl.FillImageTypeImpl#getDisplayName <em>Display Name</em>}</li> * <li>{@link org.oasisopen.names.tc.opendocument.xmlns.drawing.impl.FillImageTypeImpl#getHeight <em>Height</em>}</li> * <li>{@link org.oasisopen.names.tc.opendocument.xmlns.drawing.impl.FillImageTypeImpl#getHref <em>Href</em>}</li> * <li>{@link org.oasisopen.names.tc.opendocument.xmlns.drawing.impl.FillImageTypeImpl#getName <em>Name</em>}</li> * <li>{@link org.oasisopen.names.tc.opendocument.xmlns.drawing.impl.FillImageTypeImpl#getShow <em>Show</em>}</li> * <li>{@link org.oasisopen.names.tc.opendocument.xmlns.drawing.impl.FillImageTypeImpl#getType <em>Type</em>}</li> * <li>{@link org.oasisopen.names.tc.opendocument.xmlns.drawing.impl.FillImageTypeImpl#getWidth <em>Width</em>}</li> * </ul> * </p> * * @generated */ public class FillImageTypeImpl extends EObjectImpl implements FillImageType { /** * The default value of the '{@link #getActuate() <em>Actuate</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getActuate() * @generated * @ordered */ protected static final ActuateType ACTUATE_EDEFAULT = ActuateType.ON_LOAD; /** * The cached value of the '{@link #getActuate() <em>Actuate</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getActuate() * @generated * @ordered */ protected ActuateType actuate = ACTUATE_EDEFAULT; /** * This is true if the Actuate attribute has been set. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ protected boolean actuateESet; /** * The default value of the '{@link #getDisplayName() <em>Display Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getDisplayName() * @generated * @ordered */ protected static final String DISPLAY_NAME_EDEFAULT = null; /** * The cached value of the '{@link #getDisplayName() <em>Display Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getDisplayName() * @generated * @ordered */ protected String displayName = DISPLAY_NAME_EDEFAULT; /** * The default value of the '{@link #getHeight() <em>Height</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getHeight() * @generated * @ordered */ protected static final String HEIGHT_EDEFAULT = null; /** * The cached value of the '{@link #getHeight() <em>Height</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getHeight() * @generated * @ordered */ protected String height = HEIGHT_EDEFAULT; /** * The default value of the '{@link #getHref() <em>Href</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getHref() * @generated * @ordered */ protected static final String HREF_EDEFAULT = null; /** * The cached value of the '{@link #getHref() <em>Href</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getHref() * @generated * @ordered */ protected String href = HREF_EDEFAULT; /** * The default value of the '{@link #getName() <em>Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getName() * @generated * @ordered */ protected static final String NAME_EDEFAULT = null; /** * The cached value of the '{@link #getName() <em>Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getName() * @generated * @ordered */ protected String name = NAME_EDEFAULT; /** * The default value of the '{@link #getShow() <em>Show</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getShow() * @generated * @ordered */ protected static final ShowType1 SHOW_EDEFAULT = ShowType1.EMBED; /** * The cached value of the '{@link #getShow() <em>Show</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getShow() * @generated * @ordered */ protected ShowType1 show = SHOW_EDEFAULT; /** * This is true if the Show attribute has been set. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ protected boolean showESet; /** * The default value of the '{@link #getType() <em>Type</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getType() * @generated * @ordered */ protected static final TypeType TYPE_EDEFAULT = TypeType.SIMPLE; /** * The cached value of the '{@link #getType() <em>Type</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getType() * @generated * @ordered */ protected TypeType type = TYPE_EDEFAULT; /** * This is true if the Type attribute has been set. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ protected boolean typeESet; /** * The default value of the '{@link #getWidth() <em>Width</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getWidth() * @generated * @ordered */ protected static final String WIDTH_EDEFAULT = null; /** * The cached value of the '{@link #getWidth() <em>Width</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getWidth() * @generated * @ordered */ protected String width = WIDTH_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected FillImageTypeImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return DrawingPackage.eINSTANCE.getFillImageType(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ActuateType getActuate() { return actuate; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setActuate(ActuateType newActuate) { ActuateType oldActuate = actuate; actuate = newActuate == null ? ACTUATE_EDEFAULT : newActuate; boolean oldActuateESet = actuateESet; actuateESet = true; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DrawingPackage.FILL_IMAGE_TYPE__ACTUATE, oldActuate, actuate, !oldActuateESet)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void unsetActuate() { ActuateType oldActuate = actuate; boolean oldActuateESet = actuateESet; actuate = ACTUATE_EDEFAULT; actuateESet = false; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.UNSET, DrawingPackage.FILL_IMAGE_TYPE__ACTUATE, oldActuate, ACTUATE_EDEFAULT, oldActuateESet)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean isSetActuate() { return actuateESet; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getDisplayName() { return displayName; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setDisplayName(String newDisplayName) { String oldDisplayName = displayName; displayName = newDisplayName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DrawingPackage.FILL_IMAGE_TYPE__DISPLAY_NAME, oldDisplayName, displayName)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getHeight() { return height; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setHeight(String newHeight) { String oldHeight = height; height = newHeight; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DrawingPackage.FILL_IMAGE_TYPE__HEIGHT, oldHeight, height)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getHref() { return href; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setHref(String newHref) { String oldHref = href; href = newHref; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DrawingPackage.FILL_IMAGE_TYPE__HREF, oldHref, href)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getName() { return name; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setName(String newName) { String oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DrawingPackage.FILL_IMAGE_TYPE__NAME, oldName, name)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ShowType1 getShow() { return show; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setShow(ShowType1 newShow) { ShowType1 oldShow = show; show = newShow == null ? SHOW_EDEFAULT : newShow; boolean oldShowESet = showESet; showESet = true; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DrawingPackage.FILL_IMAGE_TYPE__SHOW, oldShow, show, !oldShowESet)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void unsetShow() { ShowType1 oldShow = show; boolean oldShowESet = showESet; show = SHOW_EDEFAULT; showESet = false; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.UNSET, DrawingPackage.FILL_IMAGE_TYPE__SHOW, oldShow, SHOW_EDEFAULT, oldShowESet)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean isSetShow() { return showESet; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public TypeType getType() { return type; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setType(TypeType newType) { TypeType oldType = type; type = newType == null ? TYPE_EDEFAULT : newType; boolean oldTypeESet = typeESet; typeESet = true; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DrawingPackage.FILL_IMAGE_TYPE__TYPE, oldType, type, !oldTypeESet)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void unsetType() { TypeType oldType = type; boolean oldTypeESet = typeESet; type = TYPE_EDEFAULT; typeESet = false; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.UNSET, DrawingPackage.FILL_IMAGE_TYPE__TYPE, oldType, TYPE_EDEFAULT, oldTypeESet)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean isSetType() { return typeESet; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getWidth() { return width; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setWidth(String newWidth) { String oldWidth = width; width = newWidth; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DrawingPackage.FILL_IMAGE_TYPE__WIDTH, oldWidth, width)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case DrawingPackage.FILL_IMAGE_TYPE__ACTUATE: return getActuate(); case DrawingPackage.FILL_IMAGE_TYPE__DISPLAY_NAME: return getDisplayName(); case DrawingPackage.FILL_IMAGE_TYPE__HEIGHT: return getHeight(); case DrawingPackage.FILL_IMAGE_TYPE__HREF: return getHref(); case DrawingPackage.FILL_IMAGE_TYPE__NAME: return getName(); case DrawingPackage.FILL_IMAGE_TYPE__SHOW: return getShow(); case DrawingPackage.FILL_IMAGE_TYPE__TYPE: return getType(); case DrawingPackage.FILL_IMAGE_TYPE__WIDTH: return getWidth(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case DrawingPackage.FILL_IMAGE_TYPE__ACTUATE: setActuate((ActuateType)newValue); return; case DrawingPackage.FILL_IMAGE_TYPE__DISPLAY_NAME: setDisplayName((String)newValue); return; case DrawingPackage.FILL_IMAGE_TYPE__HEIGHT: setHeight((String)newValue); return; case DrawingPackage.FILL_IMAGE_TYPE__HREF: setHref((String)newValue); return; case DrawingPackage.FILL_IMAGE_TYPE__NAME: setName((String)newValue); return; case DrawingPackage.FILL_IMAGE_TYPE__SHOW: setShow((ShowType1)newValue); return; case DrawingPackage.FILL_IMAGE_TYPE__TYPE: setType((TypeType)newValue); return; case DrawingPackage.FILL_IMAGE_TYPE__WIDTH: setWidth((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DrawingPackage.FILL_IMAGE_TYPE__ACTUATE: unsetActuate(); return; case DrawingPackage.FILL_IMAGE_TYPE__DISPLAY_NAME: setDisplayName(DISPLAY_NAME_EDEFAULT); return; case DrawingPackage.FILL_IMAGE_TYPE__HEIGHT: setHeight(HEIGHT_EDEFAULT); return; case DrawingPackage.FILL_IMAGE_TYPE__HREF: setHref(HREF_EDEFAULT); return; case DrawingPackage.FILL_IMAGE_TYPE__NAME: setName(NAME_EDEFAULT); return; case DrawingPackage.FILL_IMAGE_TYPE__SHOW: unsetShow(); return; case DrawingPackage.FILL_IMAGE_TYPE__TYPE: unsetType(); return; case DrawingPackage.FILL_IMAGE_TYPE__WIDTH: setWidth(WIDTH_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DrawingPackage.FILL_IMAGE_TYPE__ACTUATE: return isSetActuate(); case DrawingPackage.FILL_IMAGE_TYPE__DISPLAY_NAME: return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); case DrawingPackage.FILL_IMAGE_TYPE__HEIGHT: return HEIGHT_EDEFAULT == null ? height != null : !HEIGHT_EDEFAULT.equals(height); case DrawingPackage.FILL_IMAGE_TYPE__HREF: return HREF_EDEFAULT == null ? href != null : !HREF_EDEFAULT.equals(href); case DrawingPackage.FILL_IMAGE_TYPE__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case DrawingPackage.FILL_IMAGE_TYPE__SHOW: return isSetShow(); case DrawingPackage.FILL_IMAGE_TYPE__TYPE: return isSetType(); case DrawingPackage.FILL_IMAGE_TYPE__WIDTH: return WIDTH_EDEFAULT == null ? width != null : !WIDTH_EDEFAULT.equals(width); } 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(" (actuate: "); if (actuateESet) result.append(actuate); else result.append("<unset>"); result.append(", displayName: "); result.append(displayName); result.append(", height: "); result.append(height); result.append(", href: "); result.append(href); result.append(", name: "); result.append(name); result.append(", show: "); if (showESet) result.append(show); else result.append("<unset>"); result.append(", type: "); if (typeESet) result.append(type); else result.append("<unset>"); result.append(", width: "); result.append(width); result.append(')'); return result.toString(); } } //FillImageTypeImpl