0
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
package com.nokia.s60tools.imaker.internal.model.iContent.impl;
|
|
18 |
|
|
19 |
import com.nokia.s60tools.imaker.internal.model.iContent.IContentFactory;
|
|
20 |
import com.nokia.s60tools.imaker.internal.model.iContent.IContentPackage;
|
|
21 |
import com.nokia.s60tools.imaker.internal.model.iContent.IbyEntry;
|
|
22 |
import com.nokia.s60tools.imaker.internal.model.iContent.ImageContent;
|
|
23 |
|
|
24 |
import org.eclipse.emf.ecore.EAttribute;
|
|
25 |
import org.eclipse.emf.ecore.EClass;
|
|
26 |
import org.eclipse.emf.ecore.EEnum;
|
|
27 |
import org.eclipse.emf.ecore.EPackage;
|
|
28 |
import org.eclipse.emf.ecore.EReference;
|
|
29 |
|
|
30 |
import org.eclipse.emf.ecore.impl.EPackageImpl;
|
|
31 |
|
|
32 |
/**
|
|
33 |
* <!-- begin-user-doc -->
|
|
34 |
* An implementation of the model <b>Package</b>.
|
|
35 |
* <!-- end-user-doc -->
|
|
36 |
* @generated
|
|
37 |
*/
|
|
38 |
public class IContentPackageImpl extends EPackageImpl implements IContentPackage {
|
|
39 |
/**
|
|
40 |
* <!-- begin-user-doc -->
|
|
41 |
* <!-- end-user-doc -->
|
|
42 |
* @generated
|
|
43 |
*/
|
|
44 |
private EClass imageContentEClass = null;
|
|
45 |
|
|
46 |
/**
|
|
47 |
* <!-- begin-user-doc -->
|
|
48 |
* <!-- end-user-doc -->
|
|
49 |
* @generated
|
|
50 |
*/
|
|
51 |
private EClass ibyEntryEClass = null;
|
|
52 |
|
|
53 |
/**
|
|
54 |
* <!-- begin-user-doc -->
|
|
55 |
* <!-- end-user-doc -->
|
|
56 |
* @generated
|
|
57 |
*/
|
|
58 |
private EEnum imagesectionEEnum = null;
|
|
59 |
|
|
60 |
/**
|
11
|
61 |
* <!-- begin-user-doc -->
|
|
62 |
* <!-- end-user-doc -->
|
|
63 |
* @generated
|
|
64 |
*/
|
|
65 |
private EEnum actionEEnum = null;
|
|
66 |
|
|
67 |
/**
|
0
|
68 |
* Creates an instance of the model <b>Package</b>, registered with
|
|
69 |
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
|
|
70 |
* package URI value.
|
|
71 |
* <p>Note: the correct way to create the package is via the static
|
|
72 |
* factory method {@link #init init()}, which also performs
|
|
73 |
* initialization of the package, or returns the registered package,
|
|
74 |
* if one already exists.
|
|
75 |
* <!-- begin-user-doc -->
|
|
76 |
* <!-- end-user-doc -->
|
|
77 |
* @see org.eclipse.emf.ecore.EPackage.Registry
|
|
78 |
* @see com.nokia.s60tools.imaker.internal.model.iContent.IContentPackage#eNS_URI
|
|
79 |
* @see #init()
|
|
80 |
* @generated
|
|
81 |
*/
|
|
82 |
private IContentPackageImpl() {
|
|
83 |
super(eNS_URI, IContentFactory.eINSTANCE);
|
|
84 |
}
|
|
85 |
|
|
86 |
/**
|
|
87 |
* <!-- begin-user-doc -->
|
|
88 |
* <!-- end-user-doc -->
|
|
89 |
* @generated
|
|
90 |
*/
|
|
91 |
private static boolean isInited = false;
|
|
92 |
|
|
93 |
/**
|
|
94 |
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
|
|
95 |
*
|
|
96 |
* <p>This method is used to initialize {@link IContentPackage#eINSTANCE} when that field is accessed.
|
|
97 |
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
|
|
98 |
* <!-- begin-user-doc -->
|
|
99 |
* <!-- end-user-doc -->
|
|
100 |
* @see #eNS_URI
|
|
101 |
* @see #createPackageContents()
|
|
102 |
* @see #initializePackageContents()
|
|
103 |
* @generated
|
|
104 |
*/
|
|
105 |
public static IContentPackage init() {
|
|
106 |
if (isInited) return (IContentPackage)EPackage.Registry.INSTANCE.getEPackage(IContentPackage.eNS_URI);
|
|
107 |
|
|
108 |
// Obtain or create and register package
|
|
109 |
IContentPackageImpl theIContentPackage = (IContentPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof IContentPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new IContentPackageImpl());
|
|
110 |
|
|
111 |
isInited = true;
|
|
112 |
|
|
113 |
// Create package meta-data objects
|
|
114 |
theIContentPackage.createPackageContents();
|
|
115 |
|
|
116 |
// Initialize created meta-data
|
|
117 |
theIContentPackage.initializePackageContents();
|
|
118 |
|
|
119 |
// Mark meta-data to indicate it can't be changed
|
|
120 |
theIContentPackage.freeze();
|
|
121 |
|
|
122 |
|
|
123 |
// Update the registry and return the package
|
|
124 |
EPackage.Registry.INSTANCE.put(IContentPackage.eNS_URI, theIContentPackage);
|
|
125 |
return theIContentPackage;
|
|
126 |
}
|
|
127 |
|
|
128 |
/**
|
|
129 |
* <!-- begin-user-doc -->
|
|
130 |
* <!-- end-user-doc -->
|
|
131 |
* @generated
|
|
132 |
*/
|
|
133 |
public EClass getImageContent() {
|
|
134 |
return imageContentEClass;
|
|
135 |
}
|
|
136 |
|
|
137 |
/**
|
|
138 |
* <!-- begin-user-doc -->
|
|
139 |
* <!-- end-user-doc -->
|
|
140 |
* @generated
|
|
141 |
*/
|
|
142 |
public EReference getImageContent_Entries() {
|
|
143 |
return (EReference)imageContentEClass.getEStructuralFeatures().get(0);
|
|
144 |
}
|
|
145 |
|
|
146 |
/**
|
|
147 |
* <!-- begin-user-doc -->
|
|
148 |
* <!-- end-user-doc -->
|
|
149 |
* @generated
|
|
150 |
*/
|
|
151 |
public EClass getIbyEntry() {
|
|
152 |
return ibyEntryEClass;
|
|
153 |
}
|
|
154 |
|
|
155 |
/**
|
|
156 |
* <!-- begin-user-doc -->
|
|
157 |
* <!-- end-user-doc -->
|
|
158 |
* @generated
|
|
159 |
*/
|
|
160 |
public EAttribute getIbyEntry_File() {
|
|
161 |
return (EAttribute)ibyEntryEClass.getEStructuralFeatures().get(0);
|
|
162 |
}
|
|
163 |
|
|
164 |
/**
|
|
165 |
* <!-- begin-user-doc -->
|
|
166 |
* <!-- end-user-doc -->
|
|
167 |
* @generated
|
|
168 |
*/
|
|
169 |
public EAttribute getIbyEntry_Target() {
|
|
170 |
return (EAttribute)ibyEntryEClass.getEStructuralFeatures().get(1);
|
|
171 |
}
|
|
172 |
|
|
173 |
/**
|
|
174 |
* <!-- begin-user-doc -->
|
|
175 |
* <!-- end-user-doc -->
|
|
176 |
* @generated
|
|
177 |
*/
|
|
178 |
public EAttribute getIbyEntry_Location() {
|
|
179 |
return (EAttribute)ibyEntryEClass.getEStructuralFeatures().get(2);
|
|
180 |
}
|
|
181 |
|
|
182 |
/**
|
|
183 |
* <!-- begin-user-doc -->
|
|
184 |
* <!-- end-user-doc -->
|
|
185 |
* @generated
|
|
186 |
*/
|
11
|
187 |
public EAttribute getIbyEntry_Action() {
|
0
|
188 |
return (EAttribute)ibyEntryEClass.getEStructuralFeatures().get(3);
|
|
189 |
}
|
|
190 |
|
|
191 |
/**
|
|
192 |
* <!-- begin-user-doc -->
|
|
193 |
* <!-- end-user-doc -->
|
|
194 |
* @generated
|
|
195 |
*/
|
|
196 |
public EAttribute getIbyEntry_Enabled() {
|
|
197 |
return (EAttribute)ibyEntryEClass.getEStructuralFeatures().get(4);
|
|
198 |
}
|
|
199 |
|
|
200 |
/**
|
|
201 |
* <!-- begin-user-doc -->
|
|
202 |
* <!-- end-user-doc -->
|
|
203 |
* @generated
|
|
204 |
*/
|
|
205 |
public EAttribute getIbyEntry_StatusMessage() {
|
|
206 |
return (EAttribute)ibyEntryEClass.getEStructuralFeatures().get(5);
|
|
207 |
}
|
|
208 |
|
|
209 |
/**
|
|
210 |
* <!-- begin-user-doc -->
|
|
211 |
* <!-- end-user-doc -->
|
|
212 |
* @generated
|
|
213 |
*/
|
|
214 |
public EEnum getIMAGESECTION() {
|
|
215 |
return imagesectionEEnum;
|
|
216 |
}
|
|
217 |
|
|
218 |
/**
|
|
219 |
* <!-- begin-user-doc -->
|
|
220 |
* <!-- end-user-doc -->
|
|
221 |
* @generated
|
|
222 |
*/
|
11
|
223 |
public EEnum getACTION() {
|
|
224 |
return actionEEnum;
|
|
225 |
}
|
|
226 |
|
|
227 |
/**
|
|
228 |
* <!-- begin-user-doc -->
|
|
229 |
* <!-- end-user-doc -->
|
|
230 |
* @generated
|
|
231 |
*/
|
0
|
232 |
public IContentFactory getIContentFactory() {
|
|
233 |
return (IContentFactory)getEFactoryInstance();
|
|
234 |
}
|
|
235 |
|
|
236 |
/**
|
|
237 |
* <!-- begin-user-doc -->
|
|
238 |
* <!-- end-user-doc -->
|
|
239 |
* @generated
|
|
240 |
*/
|
|
241 |
private boolean isCreated = false;
|
|
242 |
|
|
243 |
/**
|
|
244 |
* Creates the meta-model objects for the package. This method is
|
|
245 |
* guarded to have no affect on any invocation but its first.
|
|
246 |
* <!-- begin-user-doc -->
|
|
247 |
* <!-- end-user-doc -->
|
|
248 |
* @generated
|
|
249 |
*/
|
|
250 |
public void createPackageContents() {
|
|
251 |
if (isCreated) return;
|
|
252 |
isCreated = true;
|
|
253 |
|
|
254 |
// Create classes and their features
|
|
255 |
imageContentEClass = createEClass(IMAGE_CONTENT);
|
|
256 |
createEReference(imageContentEClass, IMAGE_CONTENT__ENTRIES);
|
|
257 |
|
|
258 |
ibyEntryEClass = createEClass(IBY_ENTRY);
|
|
259 |
createEAttribute(ibyEntryEClass, IBY_ENTRY__FILE);
|
|
260 |
createEAttribute(ibyEntryEClass, IBY_ENTRY__TARGET);
|
|
261 |
createEAttribute(ibyEntryEClass, IBY_ENTRY__LOCATION);
|
11
|
262 |
createEAttribute(ibyEntryEClass, IBY_ENTRY__ACTION);
|
0
|
263 |
createEAttribute(ibyEntryEClass, IBY_ENTRY__ENABLED);
|
|
264 |
createEAttribute(ibyEntryEClass, IBY_ENTRY__STATUS_MESSAGE);
|
|
265 |
|
|
266 |
// Create enums
|
|
267 |
imagesectionEEnum = createEEnum(IMAGESECTION);
|
11
|
268 |
actionEEnum = createEEnum(ACTION);
|
0
|
269 |
}
|
|
270 |
|
|
271 |
/**
|
|
272 |
* <!-- begin-user-doc -->
|
|
273 |
* <!-- end-user-doc -->
|
|
274 |
* @generated
|
|
275 |
*/
|
|
276 |
private boolean isInitialized = false;
|
|
277 |
|
|
278 |
/**
|
|
279 |
* Complete the initialization of the package and its meta-model. This
|
|
280 |
* method is guarded to have no affect on any invocation but its first.
|
|
281 |
* <!-- begin-user-doc -->
|
|
282 |
* <!-- end-user-doc -->
|
|
283 |
* @generated
|
|
284 |
*/
|
|
285 |
public void initializePackageContents() {
|
|
286 |
if (isInitialized) return;
|
|
287 |
isInitialized = true;
|
|
288 |
|
|
289 |
// Initialize package
|
|
290 |
setName(eNAME);
|
|
291 |
setNsPrefix(eNS_PREFIX);
|
|
292 |
setNsURI(eNS_URI);
|
|
293 |
|
|
294 |
// Create type parameters
|
|
295 |
|
|
296 |
// Set bounds for type parameters
|
|
297 |
|
|
298 |
// Add supertypes to classes
|
|
299 |
|
|
300 |
// Initialize classes and features; add operations and parameters
|
|
301 |
initEClass(imageContentEClass, ImageContent.class, "ImageContent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
302 |
initEReference(getImageContent_Entries(), this.getIbyEntry(), null, "entries", null, 0, -1, ImageContent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
303 |
|
|
304 |
initEClass(ibyEntryEClass, IbyEntry.class, "IbyEntry", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
|
305 |
initEAttribute(getIbyEntry_File(), ecorePackage.getEString(), "file", null, 0, 1, IbyEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
306 |
initEAttribute(getIbyEntry_Target(), ecorePackage.getEString(), "target", null, 0, 1, IbyEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
307 |
initEAttribute(getIbyEntry_Location(), this.getIMAGESECTION(), "location", null, 0, 1, IbyEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
11
|
308 |
initEAttribute(getIbyEntry_Action(), this.getACTION(), "action", null, 0, 1, IbyEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
0
|
309 |
initEAttribute(getIbyEntry_Enabled(), ecorePackage.getEBoolean(), "enabled", null, 0, 1, IbyEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
310 |
initEAttribute(getIbyEntry_StatusMessage(), ecorePackage.getEString(), "statusMessage", null, 0, 1, IbyEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
|
311 |
|
|
312 |
// Initialize enums and add enum literals
|
|
313 |
initEEnum(imagesectionEEnum, com.nokia.s60tools.imaker.internal.model.iContent.IMAGESECTION.class, "IMAGESECTION");
|
|
314 |
addEEnumLiteral(imagesectionEEnum, com.nokia.s60tools.imaker.internal.model.iContent.IMAGESECTION.CORE);
|
|
315 |
addEEnumLiteral(imagesectionEEnum, com.nokia.s60tools.imaker.internal.model.iContent.IMAGESECTION.ROFS2);
|
|
316 |
addEEnumLiteral(imagesectionEEnum, com.nokia.s60tools.imaker.internal.model.iContent.IMAGESECTION.ROFS3);
|
11
|
317 |
addEEnumLiteral(imagesectionEEnum, com.nokia.s60tools.imaker.internal.model.iContent.IMAGESECTION.ANY);
|
|
318 |
|
|
319 |
initEEnum(actionEEnum, com.nokia.s60tools.imaker.internal.model.iContent.ACTION.class, "ACTION");
|
|
320 |
addEEnumLiteral(actionEEnum, com.nokia.s60tools.imaker.internal.model.iContent.ACTION.UDEB);
|
|
321 |
addEEnumLiteral(actionEEnum, com.nokia.s60tools.imaker.internal.model.iContent.ACTION.REMOVE);
|
|
322 |
addEEnumLiteral(actionEEnum, com.nokia.s60tools.imaker.internal.model.iContent.ACTION.HIDE);
|
|
323 |
addEEnumLiteral(actionEEnum, com.nokia.s60tools.imaker.internal.model.iContent.ACTION.UDEB_ADD);
|
|
324 |
addEEnumLiteral(actionEEnum, com.nokia.s60tools.imaker.internal.model.iContent.ACTION.UREL);
|
|
325 |
addEEnumLiteral(actionEEnum, com.nokia.s60tools.imaker.internal.model.iContent.ACTION.UREL_ADD);
|
|
326 |
addEEnumLiteral(actionEEnum, com.nokia.s60tools.imaker.internal.model.iContent.ACTION.REPLACE);
|
|
327 |
addEEnumLiteral(actionEEnum, com.nokia.s60tools.imaker.internal.model.iContent.ACTION.REPLACE_ADD);
|
0
|
328 |
|
|
329 |
// Create resource
|
|
330 |
createResource(eNS_URI);
|
|
331 |
}
|
|
332 |
|
|
333 |
} //IContentPackageImpl
|