1 7 package Olj.impl; 8 9 import Olj.IncludeType; 10 import Olj.OljPackage; 11 12 import org.eclipse.emf.common.notify.Notification; 13 14 import org.eclipse.emf.ecore.EClass; 15 import org.eclipse.emf.ecore.EStructuralFeature; 16 17 import org.eclipse.emf.ecore.impl.ENotificationImpl; 18 import org.eclipse.emf.ecore.impl.EObjectImpl; 19 20 34 public class IncludeTypeImpl extends EObjectImpl implements IncludeType { 35 43 protected static final String HREF_EDEFAULT = null; 44 45 53 protected String href = HREF_EDEFAULT; 54 55 63 protected static final String PARSE_EDEFAULT = null; 64 65 73 protected String parse = PARSE_EDEFAULT; 74 75 80 protected IncludeTypeImpl() { 81 super(); 82 } 83 84 89 protected EClass eStaticClass() { 90 return OljPackage.eINSTANCE.getIncludeType(); 91 } 92 93 98 public String getHref() { 99 return href; 100 } 101 102 107 public void setHref(String newHref) { 108 String oldHref = href; 109 href = newHref; 110 if (eNotificationRequired()) 111 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.INCLUDE_TYPE__HREF, oldHref, href)); 112 } 113 114 119 public String getParse() { 120 return parse; 121 } 122 123 128 public void setParse(String newParse) { 129 String oldParse = parse; 130 parse = newParse; 131 if (eNotificationRequired()) 132 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.INCLUDE_TYPE__PARSE, oldParse, parse)); 133 } 134 135 140 public Object eGet(EStructuralFeature eFeature, boolean resolve) { 141 switch (eDerivedStructuralFeatureID(eFeature)) { 142 case OljPackage.INCLUDE_TYPE__HREF: 143 return getHref(); 144 case OljPackage.INCLUDE_TYPE__PARSE: 145 return getParse(); 146 } 147 return eDynamicGet(eFeature, resolve); 148 } 149 150 155 public void eSet(EStructuralFeature eFeature, Object newValue) { 156 switch (eDerivedStructuralFeatureID(eFeature)) { 157 case OljPackage.INCLUDE_TYPE__HREF: 158 setHref((String )newValue); 159 return; 160 case OljPackage.INCLUDE_TYPE__PARSE: 161 setParse((String )newValue); 162 return; 163 } 164 eDynamicSet(eFeature, newValue); 165 } 166 167 172 public void eUnset(EStructuralFeature eFeature) { 173 switch (eDerivedStructuralFeatureID(eFeature)) { 174 case OljPackage.INCLUDE_TYPE__HREF: 175 setHref(HREF_EDEFAULT); 176 return; 177 case OljPackage.INCLUDE_TYPE__PARSE: 178 setParse(PARSE_EDEFAULT); 179 return; 180 } 181 eDynamicUnset(eFeature); 182 } 183 184 189 public boolean eIsSet(EStructuralFeature eFeature) { 190 switch (eDerivedStructuralFeatureID(eFeature)) { 191 case OljPackage.INCLUDE_TYPE__HREF: 192 return HREF_EDEFAULT == null ? href != null : !HREF_EDEFAULT.equals(href); 193 case OljPackage.INCLUDE_TYPE__PARSE: 194 return PARSE_EDEFAULT == null ? parse != null : !PARSE_EDEFAULT.equals(parse); 195 } 196 return eDynamicIsSet(eFeature); 197 } 198 199 204 public String toString() { 205 if (eIsProxy()) return super.toString(); 206 207 StringBuffer result = new StringBuffer (super.toString()); 208 result.append(" (href: "); 209 result.append(href); 210 result.append(", parse: "); 211 result.append(parse); 212 result.append(')'); 213 return result.toString(); 214 } 215 216 } | Popular Tags |