justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 1 | /*************************************************************************************************** |
| 2 | * Copyright (c) 2005, 2006 IBM Corporation and others. |
| 3 | * All rights reserved. This program and the accompanying materials |
| 4 | * are made available under the terms of the Eclipse Public License v1.0 |
| 5 | * which accompanies this distribution, and is available at |
| 6 | * http://www.eclipse.org/legal/epl-v10.html |
| 7 | * |
| 8 | * Contributors: |
| 9 | * IBM Corporation - initial API and implementation |
| 10 | * Oracle Corporation - revision |
| 11 | **************************************************************************************************/ |
| 12 | package org.eclipse.jst.jsf.facesconfig.emf.impl; |
| 13 | |
| 14 | import org.eclipse.emf.common.notify.Notification; |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 15 | import org.eclipse.emf.ecore.EClass; |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 16 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| 17 | import org.eclipse.emf.ecore.impl.EObjectImpl; |
| 18 | import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage; |
| 19 | import org.eclipse.jst.jsf.facesconfig.emf.RendererClassType; |
| 20 | |
| 21 | |
| 22 | /** |
| 23 | * <!-- begin-user-doc --> |
| 24 | * An implementation of the model object '<em><b>Renderer Class Type</b></em>'. |
| 25 | * <!-- end-user-doc --> |
| 26 | * <p> |
| 27 | * The following features are implemented: |
| 28 | * <ul> |
| 29 | * <li>{@link org.eclipse.jst.jsf.facesconfig.emf.impl.RendererClassTypeImpl#getTextContent <em>Text Content</em>}</li> |
| 30 | * <li>{@link org.eclipse.jst.jsf.facesconfig.emf.impl.RendererClassTypeImpl#getId <em>Id</em>}</li> |
| 31 | * </ul> |
| 32 | * </p> |
| 33 | * |
| 34 | * @generated |
| 35 | */ |
| 36 | public class RendererClassTypeImpl extends EObjectImpl implements RendererClassType { |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 37 | /** |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 38 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 39 | * <!-- end-user-doc --> |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 40 | * @generated |
| 41 | */ |
gkessler | cfc5308 | 2008-11-18 22:25:04 +0000 | [diff] [blame] | 42 | public static final String copyright = "Copyright (c) 2005, 2006 IBM Corporation and others"; //$NON-NLS-1$ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 43 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 44 | /** |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 45 | * The default value of the '{@link #getTextContent() <em>Text Content</em>}' attribute. |
| 46 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 47 | * <!-- end-user-doc --> |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 48 | * @see #getTextContent() |
| 49 | * @generated |
| 50 | * @ordered |
| 51 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 52 | protected static final String TEXT_CONTENT_EDEFAULT = null; |
| 53 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 54 | /** |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 55 | * The cached value of the '{@link #getTextContent() <em>Text Content</em>}' attribute. |
| 56 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 57 | * <!-- end-user-doc --> |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 58 | * @see #getTextContent() |
| 59 | * @generated |
| 60 | * @ordered |
| 61 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 62 | protected String textContent = TEXT_CONTENT_EDEFAULT; |
| 63 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 64 | /** |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 65 | * The default value of the '{@link #getId() <em>Id</em>}' attribute. |
| 66 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 67 | * <!-- end-user-doc --> |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 68 | * @see #getId() |
| 69 | * @generated |
| 70 | * @ordered |
| 71 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 72 | protected static final String ID_EDEFAULT = null; |
| 73 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 74 | /** |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 75 | * The cached value of the '{@link #getId() <em>Id</em>}' attribute. |
| 76 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 77 | * <!-- end-user-doc --> |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 78 | * @see #getId() |
| 79 | * @generated |
| 80 | * @ordered |
| 81 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 82 | protected String id = ID_EDEFAULT; |
| 83 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 84 | /** |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 85 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 86 | * <!-- end-user-doc --> |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 87 | * @generated |
| 88 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 89 | protected RendererClassTypeImpl() { |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 90 | super(); |
| 91 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 92 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 93 | /** |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 94 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 95 | * <!-- end-user-doc --> |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 96 | * @generated |
| 97 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 98 | protected EClass eStaticClass() { |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 99 | return FacesConfigPackage.Literals.RENDERER_CLASS_TYPE; |
| 100 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 101 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 102 | /** |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 103 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 104 | * <!-- end-user-doc --> |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 105 | * @generated |
| 106 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 107 | public String getTextContent() { |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 108 | return textContent; |
| 109 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 110 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 111 | /** |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 112 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 113 | * <!-- end-user-doc --> |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 114 | * @generated |
| 115 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 116 | public void setTextContent(String newTextContent) { |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 117 | String oldTextContent = textContent; |
| 118 | textContent = newTextContent; |
| 119 | if (eNotificationRequired()) |
| 120 | eNotify(new ENotificationImpl(this, Notification.SET, FacesConfigPackage.RENDERER_CLASS_TYPE__TEXT_CONTENT, oldTextContent, textContent)); |
| 121 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 122 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 123 | /** |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 124 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 125 | * <!-- end-user-doc --> |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 126 | * @generated |
| 127 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 128 | public String getId() { |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 129 | return id; |
| 130 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 131 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 132 | /** |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 133 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 134 | * <!-- end-user-doc --> |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 135 | * @generated |
| 136 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 137 | public void setId(String newId) { |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 138 | String oldId = id; |
| 139 | id = newId; |
| 140 | if (eNotificationRequired()) |
| 141 | eNotify(new ENotificationImpl(this, Notification.SET, FacesConfigPackage.RENDERER_CLASS_TYPE__ID, oldId, id)); |
| 142 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 143 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 144 | /** |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 145 | * <!-- begin-user-doc --> |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 146 | * <!-- end-user-doc --> |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 147 | * @generated |
| 148 | */ |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 149 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 150 | switch (featureID) { |
| 151 | case FacesConfigPackage.RENDERER_CLASS_TYPE__TEXT_CONTENT: |
| 152 | return getTextContent(); |
| 153 | case FacesConfigPackage.RENDERER_CLASS_TYPE__ID: |
| 154 | return getId(); |
| 155 | } |
| 156 | return super.eGet(featureID, resolve, coreType); |
| 157 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 158 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 159 | /** |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 160 | * <!-- begin-user-doc --> |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 161 | * <!-- end-user-doc --> |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 162 | * @generated |
| 163 | */ |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 164 | public void eSet(int featureID, Object newValue) { |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 165 | switch (featureID) { |
| 166 | case FacesConfigPackage.RENDERER_CLASS_TYPE__TEXT_CONTENT: |
| 167 | setTextContent((String)newValue); |
| 168 | return; |
| 169 | case FacesConfigPackage.RENDERER_CLASS_TYPE__ID: |
| 170 | setId((String)newValue); |
| 171 | return; |
| 172 | } |
| 173 | super.eSet(featureID, newValue); |
| 174 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 175 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 176 | /** |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 177 | * <!-- begin-user-doc --> |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 178 | * <!-- end-user-doc --> |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 179 | * @generated |
| 180 | */ |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 181 | public void eUnset(int featureID) { |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 182 | switch (featureID) { |
| 183 | case FacesConfigPackage.RENDERER_CLASS_TYPE__TEXT_CONTENT: |
| 184 | setTextContent(TEXT_CONTENT_EDEFAULT); |
| 185 | return; |
| 186 | case FacesConfigPackage.RENDERER_CLASS_TYPE__ID: |
| 187 | setId(ID_EDEFAULT); |
| 188 | return; |
| 189 | } |
| 190 | super.eUnset(featureID); |
| 191 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 192 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 193 | /** |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 194 | * <!-- begin-user-doc --> |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 195 | * <!-- end-user-doc --> |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 196 | * @generated |
| 197 | */ |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 198 | public boolean eIsSet(int featureID) { |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 199 | switch (featureID) { |
| 200 | case FacesConfigPackage.RENDERER_CLASS_TYPE__TEXT_CONTENT: |
| 201 | return TEXT_CONTENT_EDEFAULT == null ? textContent != null : !TEXT_CONTENT_EDEFAULT.equals(textContent); |
| 202 | case FacesConfigPackage.RENDERER_CLASS_TYPE__ID: |
| 203 | return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); |
| 204 | } |
| 205 | return super.eIsSet(featureID); |
| 206 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 207 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 208 | /** |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 209 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 210 | * <!-- end-user-doc --> |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 211 | * @generated NOT |
| 212 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 213 | public String toString() { |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 214 | if (eIsProxy()) return super.toString(); |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 215 | |
gkessler | 4027278 | 2010-03-17 00:22:30 +0000 | [diff] [blame] | 216 | StringBuffer result = new StringBuffer(super.toString()); |
| 217 | result.append(" (textContent: "); //$NON-NLS-1$ |
| 218 | result.append(textContent); |
| 219 | result.append(", id: "); //$NON-NLS-1$ |
| 220 | result.append(id); |
| 221 | result.append(')'); |
| 222 | return result.toString(); |
| 223 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 224 | |
| 225 | } //RendererClassTypeImpl |