diff options
Diffstat (limited to 'Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/SocialnetworkPackageImpl.java')
-rw-r--r-- | Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/SocialnetworkPackageImpl.java | 267 |
1 files changed, 267 insertions, 0 deletions
diff --git a/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/SocialnetworkPackageImpl.java b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/SocialnetworkPackageImpl.java new file mode 100644 index 00000000..7588df50 --- /dev/null +++ b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/SocialnetworkPackageImpl.java | |||
@@ -0,0 +1,267 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package socialnetwork.impl; | ||
4 | |||
5 | import org.eclipse.emf.ecore.EAttribute; | ||
6 | import org.eclipse.emf.ecore.EClass; | ||
7 | import org.eclipse.emf.ecore.EPackage; | ||
8 | import org.eclipse.emf.ecore.EReference; | ||
9 | |||
10 | import org.eclipse.emf.ecore.impl.EPackageImpl; | ||
11 | |||
12 | import socialnetwork.Person; | ||
13 | import socialnetwork.SocialNetwork; | ||
14 | import socialnetwork.SocialnetworkFactory; | ||
15 | import socialnetwork.SocialnetworkPackage; | ||
16 | |||
17 | /** | ||
18 | * <!-- begin-user-doc --> | ||
19 | * An implementation of the model <b>Package</b>. | ||
20 | * <!-- end-user-doc --> | ||
21 | * @generated | ||
22 | */ | ||
23 | public class SocialnetworkPackageImpl extends EPackageImpl implements SocialnetworkPackage { | ||
24 | /** | ||
25 | * <!-- begin-user-doc --> | ||
26 | * <!-- end-user-doc --> | ||
27 | * @generated | ||
28 | */ | ||
29 | private EClass socialNetworkEClass = null; | ||
30 | |||
31 | /** | ||
32 | * <!-- begin-user-doc --> | ||
33 | * <!-- end-user-doc --> | ||
34 | * @generated | ||
35 | */ | ||
36 | private EClass personEClass = null; | ||
37 | |||
38 | /** | ||
39 | * Creates an instance of the model <b>Package</b>, registered with | ||
40 | * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package | ||
41 | * package URI value. | ||
42 | * <p>Note: the correct way to create the package is via the static | ||
43 | * factory method {@link #init init()}, which also performs | ||
44 | * initialization of the package, or returns the registered package, | ||
45 | * if one already exists. | ||
46 | * <!-- begin-user-doc --> | ||
47 | * <!-- end-user-doc --> | ||
48 | * @see org.eclipse.emf.ecore.EPackage.Registry | ||
49 | * @see socialnetwork.SocialnetworkPackage#eNS_URI | ||
50 | * @see #init() | ||
51 | * @generated | ||
52 | */ | ||
53 | private SocialnetworkPackageImpl() { | ||
54 | super(eNS_URI, SocialnetworkFactory.eINSTANCE); | ||
55 | } | ||
56 | |||
57 | /** | ||
58 | * <!-- begin-user-doc --> | ||
59 | * <!-- end-user-doc --> | ||
60 | * @generated | ||
61 | */ | ||
62 | private static boolean isInited = false; | ||
63 | |||
64 | /** | ||
65 | * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. | ||
66 | * | ||
67 | * <p>This method is used to initialize {@link SocialnetworkPackage#eINSTANCE} when that field is accessed. | ||
68 | * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. | ||
69 | * <!-- begin-user-doc --> | ||
70 | * <!-- end-user-doc --> | ||
71 | * @see #eNS_URI | ||
72 | * @see #createPackageContents() | ||
73 | * @see #initializePackageContents() | ||
74 | * @generated | ||
75 | */ | ||
76 | public static SocialnetworkPackage init() { | ||
77 | if (isInited) | ||
78 | return (SocialnetworkPackage) EPackage.Registry.INSTANCE.getEPackage(SocialnetworkPackage.eNS_URI); | ||
79 | |||
80 | // Obtain or create and register package | ||
81 | Object registeredSocialnetworkPackage = EPackage.Registry.INSTANCE.get(eNS_URI); | ||
82 | SocialnetworkPackageImpl theSocialnetworkPackage = registeredSocialnetworkPackage instanceof SocialnetworkPackageImpl | ||
83 | ? (SocialnetworkPackageImpl) registeredSocialnetworkPackage | ||
84 | : new SocialnetworkPackageImpl(); | ||
85 | |||
86 | isInited = true; | ||
87 | |||
88 | // Create package meta-data objects | ||
89 | theSocialnetworkPackage.createPackageContents(); | ||
90 | |||
91 | // Initialize created meta-data | ||
92 | theSocialnetworkPackage.initializePackageContents(); | ||
93 | |||
94 | // Mark meta-data to indicate it can't be changed | ||
95 | theSocialnetworkPackage.freeze(); | ||
96 | |||
97 | // Update the registry and return the package | ||
98 | EPackage.Registry.INSTANCE.put(SocialnetworkPackage.eNS_URI, theSocialnetworkPackage); | ||
99 | return theSocialnetworkPackage; | ||
100 | } | ||
101 | |||
102 | /** | ||
103 | * <!-- begin-user-doc --> | ||
104 | * <!-- end-user-doc --> | ||
105 | * @generated | ||
106 | */ | ||
107 | @Override | ||
108 | public EClass getSocialNetwork() { | ||
109 | return socialNetworkEClass; | ||
110 | } | ||
111 | |||
112 | /** | ||
113 | * <!-- begin-user-doc --> | ||
114 | * <!-- end-user-doc --> | ||
115 | * @generated | ||
116 | */ | ||
117 | @Override | ||
118 | public EAttribute getSocialNetwork_Name() { | ||
119 | return (EAttribute) socialNetworkEClass.getEStructuralFeatures().get(0); | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * <!-- begin-user-doc --> | ||
124 | * <!-- end-user-doc --> | ||
125 | * @generated | ||
126 | */ | ||
127 | @Override | ||
128 | public EReference getSocialNetwork_Persons() { | ||
129 | return (EReference) socialNetworkEClass.getEStructuralFeatures().get(1); | ||
130 | } | ||
131 | |||
132 | /** | ||
133 | * <!-- begin-user-doc --> | ||
134 | * <!-- end-user-doc --> | ||
135 | * @generated | ||
136 | */ | ||
137 | @Override | ||
138 | public EClass getPerson() { | ||
139 | return personEClass; | ||
140 | } | ||
141 | |||
142 | /** | ||
143 | * <!-- begin-user-doc --> | ||
144 | * <!-- end-user-doc --> | ||
145 | * @generated | ||
146 | */ | ||
147 | @Override | ||
148 | public EReference getPerson_Friends() { | ||
149 | return (EReference) personEClass.getEStructuralFeatures().get(0); | ||
150 | } | ||
151 | |||
152 | /** | ||
153 | * <!-- begin-user-doc --> | ||
154 | * <!-- end-user-doc --> | ||
155 | * @generated | ||
156 | */ | ||
157 | @Override | ||
158 | public EAttribute getPerson_Name() { | ||
159 | return (EAttribute) personEClass.getEStructuralFeatures().get(1); | ||
160 | } | ||
161 | |||
162 | /** | ||
163 | * <!-- begin-user-doc --> | ||
164 | * <!-- end-user-doc --> | ||
165 | * @generated | ||
166 | */ | ||
167 | @Override | ||
168 | public SocialnetworkFactory getSocialnetworkFactory() { | ||
169 | return (SocialnetworkFactory) getEFactoryInstance(); | ||
170 | } | ||
171 | |||
172 | /** | ||
173 | * <!-- begin-user-doc --> | ||
174 | * <!-- end-user-doc --> | ||
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 | * @generated | ||
185 | */ | ||
186 | public void createPackageContents() { | ||
187 | if (isCreated) | ||
188 | return; | ||
189 | isCreated = true; | ||
190 | |||
191 | // Create classes and their features | ||
192 | socialNetworkEClass = createEClass(SOCIAL_NETWORK); | ||
193 | createEAttribute(socialNetworkEClass, SOCIAL_NETWORK__NAME); | ||
194 | createEReference(socialNetworkEClass, SOCIAL_NETWORK__PERSONS); | ||
195 | |||
196 | personEClass = createEClass(PERSON); | ||
197 | createEReference(personEClass, PERSON__FRIENDS); | ||
198 | createEAttribute(personEClass, PERSON__NAME); | ||
199 | } | ||
200 | |||
201 | /** | ||
202 | * <!-- begin-user-doc --> | ||
203 | * <!-- end-user-doc --> | ||
204 | * @generated | ||
205 | */ | ||
206 | private boolean isInitialized = false; | ||
207 | |||
208 | /** | ||
209 | * Complete the initialization of the package and its meta-model. This | ||
210 | * method is guarded to have no affect on any invocation but its first. | ||
211 | * <!-- begin-user-doc --> | ||
212 | * <!-- end-user-doc --> | ||
213 | * @generated | ||
214 | */ | ||
215 | public void initializePackageContents() { | ||
216 | if (isInitialized) | ||
217 | return; | ||
218 | isInitialized = true; | ||
219 | |||
220 | // Initialize package | ||
221 | setName(eNAME); | ||
222 | setNsPrefix(eNS_PREFIX); | ||
223 | setNsURI(eNS_URI); | ||
224 | |||
225 | // Create type parameters | ||
226 | |||
227 | // Set bounds for type parameters | ||
228 | |||
229 | // Add supertypes to classes | ||
230 | |||
231 | // Initialize classes, features, and operations; add parameters | ||
232 | initEClass(socialNetworkEClass, SocialNetwork.class, "SocialNetwork", !IS_ABSTRACT, !IS_INTERFACE, | ||
233 | IS_GENERATED_INSTANCE_CLASS); | ||
234 | initEAttribute(getSocialNetwork_Name(), ecorePackage.getEString(), "name", "SocialNetwork", 0, 1, | ||
235 | SocialNetwork.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, | ||
236 | !IS_DERIVED, IS_ORDERED); | ||
237 | initEReference(getSocialNetwork_Persons(), this.getPerson(), null, "persons", null, 0, -1, SocialNetwork.class, | ||
238 | !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, | ||
239 | IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
240 | |||
241 | initEClass(personEClass, Person.class, "Person", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
242 | initEReference(getPerson_Friends(), this.getPerson(), null, "friends", null, 0, -1, Person.class, !IS_TRANSIENT, | ||
243 | !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, | ||
244 | IS_ORDERED); | ||
245 | initEAttribute(getPerson_Name(), ecorePackage.getEString(), "name", "Name", 0, 1, Person.class, !IS_TRANSIENT, | ||
246 | !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
247 | |||
248 | // Create resource | ||
249 | createResource(eNS_URI); | ||
250 | |||
251 | // Create annotations | ||
252 | // http://www.eclipse.org/emf/2002/Ecore | ||
253 | createEcoreAnnotations(); | ||
254 | } | ||
255 | |||
256 | /** | ||
257 | * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>. | ||
258 | * <!-- begin-user-doc --> | ||
259 | * <!-- end-user-doc --> | ||
260 | * @generated | ||
261 | */ | ||
262 | protected void createEcoreAnnotations() { | ||
263 | String source = "http://www.eclipse.org/emf/2002/Ecore"; | ||
264 | addAnnotation(this, source, new String[] {}); | ||
265 | } | ||
266 | |||
267 | } //SocialnetworkPackageImpl | ||