KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Olj > impl > IncludeTypeImpl


1 /**
2  * <copyright>
3  * </copyright>
4  *
5  * $Id$
6  */

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 /**
21  * <!-- begin-user-doc -->
22  * An implementation of the model object '<em><b>Include Type</b></em>'.
23  * <!-- end-user-doc -->
24  * <p>
25  * The following features are implemented:
26  * <ul>
27  * <li>{@link Olj.impl.IncludeTypeImpl#getHref <em>Href</em>}</li>
28  * <li>{@link Olj.impl.IncludeTypeImpl#getParse <em>Parse</em>}</li>
29  * </ul>
30  * </p>
31  *
32  * @generated
33  */

34 public class IncludeTypeImpl extends EObjectImpl implements IncludeType {
35     /**
36      * The default value of the '{@link #getHref() <em>Href</em>}' attribute.
37      * <!-- begin-user-doc -->
38      * <!-- end-user-doc -->
39      * @see #getHref()
40      * @generated
41      * @ordered
42      */

43     protected static final String JavaDoc HREF_EDEFAULT = null;
44
45     /**
46      * The cached value of the '{@link #getHref() <em>Href</em>}' attribute.
47      * <!-- begin-user-doc -->
48      * <!-- end-user-doc -->
49      * @see #getHref()
50      * @generated
51      * @ordered
52      */

53     protected String JavaDoc href = HREF_EDEFAULT;
54
55     /**
56      * The default value of the '{@link #getParse() <em>Parse</em>}' attribute.
57      * <!-- begin-user-doc -->
58      * <!-- end-user-doc -->
59      * @see #getParse()
60      * @generated
61      * @ordered
62      */

63     protected static final String JavaDoc PARSE_EDEFAULT = null;
64
65     /**
66      * The cached value of the '{@link #getParse() <em>Parse</em>}' attribute.
67      * <!-- begin-user-doc -->
68      * <!-- end-user-doc -->
69      * @see #getParse()
70      * @generated
71      * @ordered
72      */

73     protected String JavaDoc parse = PARSE_EDEFAULT;
74
75     /**
76      * <!-- begin-user-doc -->
77      * <!-- end-user-doc -->
78      * @generated
79      */

80     protected IncludeTypeImpl() {
81         super();
82     }
83
84     /**
85      * <!-- begin-user-doc -->
86      * <!-- end-user-doc -->
87      * @generated
88      */

89     protected EClass eStaticClass() {
90         return OljPackage.eINSTANCE.getIncludeType();
91     }
92
93     /**
94      * <!-- begin-user-doc -->
95      * <!-- end-user-doc -->
96      * @generated
97      */

98     public String JavaDoc getHref() {
99         return href;
100     }
101
102     /**
103      * <!-- begin-user-doc -->
104      * <!-- end-user-doc -->
105      * @generated
106      */

107     public void setHref(String JavaDoc newHref) {
108         String JavaDoc oldHref = href;
109         href = newHref;
110         if (eNotificationRequired())
111             eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.INCLUDE_TYPE__HREF, oldHref, href));
112     }
113
114     /**
115      * <!-- begin-user-doc -->
116      * <!-- end-user-doc -->
117      * @generated
118      */

119     public String JavaDoc getParse() {
120         return parse;
121     }
122
123     /**
124      * <!-- begin-user-doc -->
125      * <!-- end-user-doc -->
126      * @generated
127      */

128     public void setParse(String JavaDoc newParse) {
129         String JavaDoc oldParse = parse;
130         parse = newParse;
131         if (eNotificationRequired())
132             eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.INCLUDE_TYPE__PARSE, oldParse, parse));
133     }
134
135     /**
136      * <!-- begin-user-doc -->
137      * <!-- end-user-doc -->
138      * @generated
139      */

140     public Object JavaDoc 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     /**
151      * <!-- begin-user-doc -->
152      * <!-- end-user-doc -->
153      * @generated
154      */

155     public void eSet(EStructuralFeature eFeature, Object JavaDoc newValue) {
156         switch (eDerivedStructuralFeatureID(eFeature)) {
157             case OljPackage.INCLUDE_TYPE__HREF:
158                 setHref((String JavaDoc)newValue);
159                 return;
160             case OljPackage.INCLUDE_TYPE__PARSE:
161                 setParse((String JavaDoc)newValue);
162                 return;
163         }
164         eDynamicSet(eFeature, newValue);
165     }
166
167     /**
168      * <!-- begin-user-doc -->
169      * <!-- end-user-doc -->
170      * @generated
171      */

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     /**
185      * <!-- begin-user-doc -->
186      * <!-- end-user-doc -->
187      * @generated
188      */

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     /**
200      * <!-- begin-user-doc -->
201      * <!-- end-user-doc -->
202      * @generated
203      */

204     public String JavaDoc toString() {
205         if (eIsProxy()) return super.toString();
206
207         StringBuffer JavaDoc result = new StringBuffer JavaDoc(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 } //IncludeTypeImpl
217
Popular Tags