Skip to content

Package: VKeyattributedmrPackageImpl$1

VKeyattributedmrPackageImpl$1

nameinstructionbranchcomplexitylinemethod
getEValidator()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
{...}
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

Coverage

1: /**
2: * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Eugen Neufeld - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.spi.keyattributedmr.model.impl;
15:
16: import org.eclipse.emf.ecore.EAttribute;
17: import org.eclipse.emf.ecore.EClass;
18: import org.eclipse.emf.ecore.EPackage;
19: import org.eclipse.emf.ecore.EReference;
20: import org.eclipse.emf.ecore.EValidator;
21: import org.eclipse.emf.ecore.impl.EPackageImpl;
22: import org.eclipse.emf.ecp.view.spi.keyattributedmr.model.VKeyAttributeDomainModelReference;
23: import org.eclipse.emf.ecp.view.spi.keyattributedmr.model.VKeyattributedmrFactory;
24: import org.eclipse.emf.ecp.view.spi.keyattributedmr.model.VKeyattributedmrPackage;
25: import org.eclipse.emf.ecp.view.spi.keyattributedmr.model.util.KeyattributedmrValidator;
26: import org.eclipse.emf.ecp.view.spi.model.VViewPackage;
27:
28: /**
29: * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!--
30: * end-user-doc -->
31: *
32: * @generated
33: */
34: public class VKeyattributedmrPackageImpl extends EPackageImpl implements
35:         VKeyattributedmrPackage {
36:         /**
37:          * <!-- begin-user-doc --> <!-- end-user-doc -->
38:          *
39:          * @generated
40:          */
41:         private EClass keyAttributeDomainModelReferenceEClass = null;
42:
43:         /**
44:          * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry
45:          * EPackage.Registry} by the
46:          * package package URI value.
47:          * <p>
48:          * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also
49:          * performs initialization of the package, or returns the registered package, if one already exists. <!--
50:          * begin-user-doc --> <!-- end-user-doc -->
51:          *
52:          * @see org.eclipse.emf.ecore.EPackage.Registry
53:          * @see org.eclipse.emf.ecp.view.spi.keyattributedmr.model.VKeyattributedmrPackage#eNS_URI
54:          * @see #init()
55:          * @generated
56:          */
57:         private VKeyattributedmrPackageImpl() {
58:                 super(eNS_URI, VKeyattributedmrFactory.eINSTANCE);
59:         }
60:
61:         /**
62:          * <!-- begin-user-doc --> <!-- end-user-doc -->
63:          *
64:          * @generated
65:          */
66:         private static boolean isInited = false;
67:
68:         /**
69:          * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
70:          *
71:          * <p>
72:          * This method is used to initialize {@link VKeyattributedmrPackage#eINSTANCE} when that field is accessed. Clients
73:          * should not invoke it directly. Instead, they should simply access that field to obtain the package. <!--
74:          * begin-user-doc --> <!-- end-user-doc -->
75:          *
76:          * @see #eNS_URI
77:          * @see #createPackageContents()
78:          * @see #initializePackageContents()
79:          * @generated
80:          */
81:         public static VKeyattributedmrPackage init() {
82:                 if (isInited) {
83:                         return (VKeyattributedmrPackage) EPackage.Registry.INSTANCE.getEPackage(VKeyattributedmrPackage.eNS_URI);
84:                 }
85:
86:                 // Obtain or create and register package
87:                 final VKeyattributedmrPackageImpl theKeyattributedmrPackage = (VKeyattributedmrPackageImpl) (EPackage.Registry.INSTANCE
88:                         .get(eNS_URI) instanceof VKeyattributedmrPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI)
89:                                 : new VKeyattributedmrPackageImpl());
90:
91:                 isInited = true;
92:
93:                 // Initialize simple dependencies
94:                 VViewPackage.eINSTANCE.eClass();
95:
96:                 // Create package meta-data objects
97:                 theKeyattributedmrPackage.createPackageContents();
98:
99:                 // Initialize created meta-data
100:                 theKeyattributedmrPackage.initializePackageContents();
101:
102:                 // Register package validator
103:                 EValidator.Registry.INSTANCE.put(theKeyattributedmrPackage,
104:                         new EValidator.Descriptor() {
105:                                 @Override
106:                                 public EValidator getEValidator() {
107:                                         return KeyattributedmrValidator.INSTANCE;
108:                                 }
109:                         });
110:
111:                 // Mark meta-data to indicate it can't be changed
112:                 theKeyattributedmrPackage.freeze();
113:
114:                 // Update the registry and return the package
115:                 EPackage.Registry.INSTANCE.put(VKeyattributedmrPackage.eNS_URI, theKeyattributedmrPackage);
116:                 return theKeyattributedmrPackage;
117:         }
118:
119:         /**
120:          * <!-- begin-user-doc --> <!-- end-user-doc -->
121:          *
122:          * @generated
123:          */
124:         @Override
125:         public EClass getKeyAttributeDomainModelReference() {
126:                 return keyAttributeDomainModelReferenceEClass;
127:         }
128:
129:         /**
130:          * <!-- begin-user-doc -->
131:          * <!-- end-user-doc -->
132:          *
133:          * @generated
134:          */
135:         @Override
136:         public EReference getKeyAttributeDomainModelReference_KeyDMR() {
137:                 return (EReference) keyAttributeDomainModelReferenceEClass.getEStructuralFeatures().get(0);
138:         }
139:
140:         /**
141:          * <!-- begin-user-doc -->
142:          * <!-- end-user-doc -->
143:          *
144:          * @generated
145:          */
146:         @Override
147:         public EAttribute getKeyAttributeDomainModelReference_KeyValue() {
148:                 return (EAttribute) keyAttributeDomainModelReferenceEClass.getEStructuralFeatures().get(1);
149:         }
150:
151:         /**
152:          * <!-- begin-user-doc -->
153:          * <!-- end-user-doc -->
154:          *
155:          * @generated
156:          */
157:         @Override
158:         public EReference getKeyAttributeDomainModelReference_ValueDMR() {
159:                 return (EReference) keyAttributeDomainModelReferenceEClass.getEStructuralFeatures().get(2);
160:         }
161:
162:         /**
163:          * <!-- begin-user-doc --> <!-- end-user-doc -->
164:          *
165:          * @generated
166:          */
167:         @Override
168:         public VKeyattributedmrFactory getKeyattributedmrFactory() {
169:                 return (VKeyattributedmrFactory) getEFactoryInstance();
170:         }
171:
172:         /**
173:          * <!-- begin-user-doc --> <!-- end-user-doc -->
174:          *
175:          * @generated
176:          */
177:         private boolean isCreated = false;
178:
179:         /**
180:          * Creates the meta-model objects for the package. This method is
181:          * guarded to have no affect on any invocation but its first.
182:          * <!-- begin-user-doc -->
183:          * <!-- end-user-doc -->
184:          *
185:          * @generated
186:          */
187:         public void createPackageContents() {
188:                 if (isCreated) {
189:                         return;
190:                 }
191:                 isCreated = true;
192:
193:                 // Create classes and their features
194:                 keyAttributeDomainModelReferenceEClass = createEClass(KEY_ATTRIBUTE_DOMAIN_MODEL_REFERENCE);
195:                 createEReference(keyAttributeDomainModelReferenceEClass, KEY_ATTRIBUTE_DOMAIN_MODEL_REFERENCE__KEY_DMR);
196:                 createEAttribute(keyAttributeDomainModelReferenceEClass, KEY_ATTRIBUTE_DOMAIN_MODEL_REFERENCE__KEY_VALUE);
197:                 createEReference(keyAttributeDomainModelReferenceEClass, KEY_ATTRIBUTE_DOMAIN_MODEL_REFERENCE__VALUE_DMR);
198:         }
199:
200:         /**
201:          * <!-- begin-user-doc --> <!-- end-user-doc -->
202:          *
203:          * @generated
204:          */
205:         private boolean isInitialized = false;
206:
207:         /**
208:          * Complete the initialization of the package and its meta-model. This
209:          * method is guarded to have no affect on any invocation but its first. <!--
210:          * begin-user-doc --> <!-- end-user-doc -->
211:          *
212:          * @generated
213:          */
214:         public void initializePackageContents() {
215:                 if (isInitialized) {
216:                         return;
217:                 }
218:                 isInitialized = true;
219:
220:                 // Initialize package
221:                 setName(eNAME);
222:                 setNsPrefix(eNS_PREFIX);
223:                 setNsURI(eNS_URI);
224:
225:                 // Obtain other dependent packages
226:                 final VViewPackage theViewPackage = (VViewPackage) EPackage.Registry.INSTANCE.getEPackage(VViewPackage.eNS_URI);
227:
228:                 // Create type parameters
229:
230:                 // Set bounds for type parameters
231:
232:                 // Add supertypes to classes
233:                 keyAttributeDomainModelReferenceEClass.getESuperTypes()
234:                         .add(theViewPackage.getFeaturePathDomainModelReference());
235:
236:                 // Initialize classes and features; add operations and parameters
237:                 initEClass(keyAttributeDomainModelReferenceEClass, VKeyAttributeDomainModelReference.class,
238:                         "KeyAttributeDomainModelReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
239:                 initEReference(
240:                         getKeyAttributeDomainModelReference_KeyDMR(),
241:                         theViewPackage.getDomainModelReference(),
242:                         null,
243:                         "keyDMR", null, 1, 1, VKeyAttributeDomainModelReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$
244:                         IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
245:                 initEAttribute(
246:                         getKeyAttributeDomainModelReference_KeyValue(),
247:                         ecorePackage.getEJavaObject(),
248:                         "keyValue", null, 1, 1, VKeyAttributeDomainModelReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$
249:                         !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
250:                 initEReference(
251:                         getKeyAttributeDomainModelReference_ValueDMR(),
252:                         theViewPackage.getDomainModelReference(),
253:                         null,
254:                         "valueDMR", null, 1, 1, VKeyAttributeDomainModelReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$
255:                         IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
256:
257:                 // Create resource
258:                 createResource(eNS_URI);
259:
260:                 // Create annotations
261:                 // http://www.eclipse.org/emf/2002/Ecore
262:                 createEcoreAnnotations();
263:         }
264:
265:         /**
266:          * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>.
267:          * <!-- begin-user-doc -->
268:          * <!-- end-user-doc -->
269:          *
270:          * @generated
271:          */
272:         protected void createEcoreAnnotations() {
273:                 final String source = "http://www.eclipse.org/emf/2002/Ecore"; //$NON-NLS-1$
274:                 addAnnotation(keyAttributeDomainModelReferenceEClass,
275:                         source,
276:                         new String[] { "constraints", "resolveable" //$NON-NLS-1$ //$NON-NLS-2$
277:                         });
278:         }
279:
280: } // VKeyattributedmrPackageImpl