aboutsummaryrefslogtreecommitdiffstats
path: root/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork
diff options
context:
space:
mode:
Diffstat (limited to 'Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork')
-rw-r--r--Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/Person.java62
-rw-r--r--Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/SocialNetwork.java62
-rw-r--r--Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/SocialnetworkFactory.java51
-rw-r--r--Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/SocialnetworkPackage.java293
-rw-r--r--Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/PersonImpl.java208
-rw-r--r--Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/SocialNetworkImpl.java228
-rw-r--r--Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/SocialnetworkFactoryImpl.java111
-rw-r--r--Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/SocialnetworkPackageImpl.java267
-rw-r--r--Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/util/SocialnetworkAdapterFactory.java138
-rw-r--r--Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/util/SocialnetworkSwitch.java134
10 files changed, 1554 insertions, 0 deletions
diff --git a/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/Person.java b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/Person.java
new file mode 100644
index 00000000..b1e0a041
--- /dev/null
+++ b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/Person.java
@@ -0,0 +1,62 @@
1/**
2 */
3package socialnetwork;
4
5import org.eclipse.emf.common.util.EList;
6
7import org.eclipse.emf.ecore.EObject;
8
9/**
10 * <!-- begin-user-doc -->
11 * A representation of the model object '<em><b>Person</b></em>'.
12 * <!-- end-user-doc -->
13 *
14 * <p>
15 * The following features are supported:
16 * </p>
17 * <ul>
18 * <li>{@link socialnetwork.Person#getFriends <em>Friends</em>}</li>
19 * <li>{@link socialnetwork.Person#getName <em>Name</em>}</li>
20 * </ul>
21 *
22 * @see socialnetwork.SocialnetworkPackage#getPerson()
23 * @model
24 * @generated
25 */
26public interface Person extends EObject {
27 /**
28 * Returns the value of the '<em><b>Friends</b></em>' reference list.
29 * The list contents are of type {@link socialnetwork.Person}.
30 * <!-- begin-user-doc -->
31 * <!-- end-user-doc -->
32 * @return the value of the '<em>Friends</em>' reference list.
33 * @see socialnetwork.SocialnetworkPackage#getPerson_Friends()
34 * @model
35 * @generated
36 */
37 EList<Person> getFriends();
38
39 /**
40 * Returns the value of the '<em><b>Name</b></em>' attribute.
41 * The default value is <code>"Name"</code>.
42 * <!-- begin-user-doc -->
43 * <!-- end-user-doc -->
44 * @return the value of the '<em>Name</em>' attribute.
45 * @see #setName(String)
46 * @see socialnetwork.SocialnetworkPackage#getPerson_Name()
47 * @model default="Name"
48 * @generated
49 */
50 String getName();
51
52 /**
53 * Sets the value of the '{@link socialnetwork.Person#getName <em>Name</em>}' attribute.
54 * <!-- begin-user-doc -->
55 * <!-- end-user-doc -->
56 * @param value the new value of the '<em>Name</em>' attribute.
57 * @see #getName()
58 * @generated
59 */
60 void setName(String value);
61
62} // Person
diff --git a/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/SocialNetwork.java b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/SocialNetwork.java
new file mode 100644
index 00000000..4653f6dd
--- /dev/null
+++ b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/SocialNetwork.java
@@ -0,0 +1,62 @@
1/**
2 */
3package socialnetwork;
4
5import org.eclipse.emf.common.util.EList;
6
7import org.eclipse.emf.ecore.EObject;
8
9/**
10 * <!-- begin-user-doc -->
11 * A representation of the model object '<em><b>Social Network</b></em>'.
12 * <!-- end-user-doc -->
13 *
14 * <p>
15 * The following features are supported:
16 * </p>
17 * <ul>
18 * <li>{@link socialnetwork.SocialNetwork#getName <em>Name</em>}</li>
19 * <li>{@link socialnetwork.SocialNetwork#getPersons <em>Persons</em>}</li>
20 * </ul>
21 *
22 * @see socialnetwork.SocialnetworkPackage#getSocialNetwork()
23 * @model
24 * @generated
25 */
26public interface SocialNetwork extends EObject {
27 /**
28 * Returns the value of the '<em><b>Name</b></em>' attribute.
29 * The default value is <code>"SocialNetwork"</code>.
30 * <!-- begin-user-doc -->
31 * <!-- end-user-doc -->
32 * @return the value of the '<em>Name</em>' attribute.
33 * @see #setName(String)
34 * @see socialnetwork.SocialnetworkPackage#getSocialNetwork_Name()
35 * @model default="SocialNetwork"
36 * @generated
37 */
38 String getName();
39
40 /**
41 * Sets the value of the '{@link socialnetwork.SocialNetwork#getName <em>Name</em>}' attribute.
42 * <!-- begin-user-doc -->
43 * <!-- end-user-doc -->
44 * @param value the new value of the '<em>Name</em>' attribute.
45 * @see #getName()
46 * @generated
47 */
48 void setName(String value);
49
50 /**
51 * Returns the value of the '<em><b>Persons</b></em>' containment reference list.
52 * The list contents are of type {@link socialnetwork.Person}.
53 * <!-- begin-user-doc -->
54 * <!-- end-user-doc -->
55 * @return the value of the '<em>Persons</em>' containment reference list.
56 * @see socialnetwork.SocialnetworkPackage#getSocialNetwork_Persons()
57 * @model containment="true"
58 * @generated
59 */
60 EList<Person> getPersons();
61
62} // SocialNetwork
diff --git a/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/SocialnetworkFactory.java b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/SocialnetworkFactory.java
new file mode 100644
index 00000000..cf7a4250
--- /dev/null
+++ b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/SocialnetworkFactory.java
@@ -0,0 +1,51 @@
1/**
2 */
3package socialnetwork;
4
5import org.eclipse.emf.ecore.EFactory;
6
7/**
8 * <!-- begin-user-doc -->
9 * The <b>Factory</b> for the model.
10 * It provides a create method for each non-abstract class of the model.
11 * <!-- end-user-doc -->
12 * @see socialnetwork.SocialnetworkPackage
13 * @generated
14 */
15public interface SocialnetworkFactory extends EFactory {
16 /**
17 * The singleton instance of the factory.
18 * <!-- begin-user-doc -->
19 * <!-- end-user-doc -->
20 * @generated
21 */
22 SocialnetworkFactory eINSTANCE = socialnetwork.impl.SocialnetworkFactoryImpl.init();
23
24 /**
25 * Returns a new object of class '<em>Social Network</em>'.
26 * <!-- begin-user-doc -->
27 * <!-- end-user-doc -->
28 * @return a new object of class '<em>Social Network</em>'.
29 * @generated
30 */
31 SocialNetwork createSocialNetwork();
32
33 /**
34 * Returns a new object of class '<em>Person</em>'.
35 * <!-- begin-user-doc -->
36 * <!-- end-user-doc -->
37 * @return a new object of class '<em>Person</em>'.
38 * @generated
39 */
40 Person createPerson();
41
42 /**
43 * Returns the package supported by this factory.
44 * <!-- begin-user-doc -->
45 * <!-- end-user-doc -->
46 * @return the package supported by this factory.
47 * @generated
48 */
49 SocialnetworkPackage getSocialnetworkPackage();
50
51} //SocialnetworkFactory
diff --git a/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/SocialnetworkPackage.java b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/SocialnetworkPackage.java
new file mode 100644
index 00000000..f215f469
--- /dev/null
+++ b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/SocialnetworkPackage.java
@@ -0,0 +1,293 @@
1/**
2 */
3package socialnetwork;
4
5import org.eclipse.emf.ecore.EAttribute;
6import org.eclipse.emf.ecore.EClass;
7import org.eclipse.emf.ecore.EPackage;
8import org.eclipse.emf.ecore.EReference;
9
10/**
11 * <!-- begin-user-doc -->
12 * The <b>Package</b> for the model.
13 * It contains accessors for the meta objects to represent
14 * <ul>
15 * <li>each class,</li>
16 * <li>each feature of each class,</li>
17 * <li>each operation of each class,</li>
18 * <li>each enum,</li>
19 * <li>and each data type</li>
20 * </ul>
21 * <!-- end-user-doc -->
22 * @see socialnetwork.SocialnetworkFactory
23 * @model kind="package"
24 * annotation="http://www.eclipse.org/emf/2002/Ecore"
25 * @generated
26 */
27public interface SocialnetworkPackage extends EPackage {
28 /**
29 * The package name.
30 * <!-- begin-user-doc -->
31 * <!-- end-user-doc -->
32 * @generated
33 */
34 String eNAME = "socialnetwork";
35
36 /**
37 * The package namespace URI.
38 * <!-- begin-user-doc -->
39 * <!-- end-user-doc -->
40 * @generated
41 */
42 String eNS_URI = "http://ecse.mcgill.ca/socialnetwork";
43
44 /**
45 * The package namespace name.
46 * <!-- begin-user-doc -->
47 * <!-- end-user-doc -->
48 * @generated
49 */
50 String eNS_PREFIX = "socialnetwork";
51
52 /**
53 * The singleton instance of the package.
54 * <!-- begin-user-doc -->
55 * <!-- end-user-doc -->
56 * @generated
57 */
58 SocialnetworkPackage eINSTANCE = socialnetwork.impl.SocialnetworkPackageImpl.init();
59
60 /**
61 * The meta object id for the '{@link socialnetwork.impl.SocialNetworkImpl <em>Social Network</em>}' class.
62 * <!-- begin-user-doc -->
63 * <!-- end-user-doc -->
64 * @see socialnetwork.impl.SocialNetworkImpl
65 * @see socialnetwork.impl.SocialnetworkPackageImpl#getSocialNetwork()
66 * @generated
67 */
68 int SOCIAL_NETWORK = 0;
69
70 /**
71 * The feature id for the '<em><b>Name</b></em>' attribute.
72 * <!-- begin-user-doc -->
73 * <!-- end-user-doc -->
74 * @generated
75 * @ordered
76 */
77 int SOCIAL_NETWORK__NAME = 0;
78
79 /**
80 * The feature id for the '<em><b>Persons</b></em>' containment reference list.
81 * <!-- begin-user-doc -->
82 * <!-- end-user-doc -->
83 * @generated
84 * @ordered
85 */
86 int SOCIAL_NETWORK__PERSONS = 1;
87
88 /**
89 * The number of structural features of the '<em>Social Network</em>' class.
90 * <!-- begin-user-doc -->
91 * <!-- end-user-doc -->
92 * @generated
93 * @ordered
94 */
95 int SOCIAL_NETWORK_FEATURE_COUNT = 2;
96
97 /**
98 * The number of operations of the '<em>Social Network</em>' class.
99 * <!-- begin-user-doc -->
100 * <!-- end-user-doc -->
101 * @generated
102 * @ordered
103 */
104 int SOCIAL_NETWORK_OPERATION_COUNT = 0;
105
106 /**
107 * The meta object id for the '{@link socialnetwork.impl.PersonImpl <em>Person</em>}' class.
108 * <!-- begin-user-doc -->
109 * <!-- end-user-doc -->
110 * @see socialnetwork.impl.PersonImpl
111 * @see socialnetwork.impl.SocialnetworkPackageImpl#getPerson()
112 * @generated
113 */
114 int PERSON = 1;
115
116 /**
117 * The feature id for the '<em><b>Friends</b></em>' reference list.
118 * <!-- begin-user-doc -->
119 * <!-- end-user-doc -->
120 * @generated
121 * @ordered
122 */
123 int PERSON__FRIENDS = 0;
124
125 /**
126 * The feature id for the '<em><b>Name</b></em>' attribute.
127 * <!-- begin-user-doc -->
128 * <!-- end-user-doc -->
129 * @generated
130 * @ordered
131 */
132 int PERSON__NAME = 1;
133
134 /**
135 * The number of structural features of the '<em>Person</em>' class.
136 * <!-- begin-user-doc -->
137 * <!-- end-user-doc -->
138 * @generated
139 * @ordered
140 */
141 int PERSON_FEATURE_COUNT = 2;
142
143 /**
144 * The number of operations of the '<em>Person</em>' class.
145 * <!-- begin-user-doc -->
146 * <!-- end-user-doc -->
147 * @generated
148 * @ordered
149 */
150 int PERSON_OPERATION_COUNT = 0;
151
152 /**
153 * Returns the meta object for class '{@link socialnetwork.SocialNetwork <em>Social Network</em>}'.
154 * <!-- begin-user-doc -->
155 * <!-- end-user-doc -->
156 * @return the meta object for class '<em>Social Network</em>'.
157 * @see socialnetwork.SocialNetwork
158 * @generated
159 */
160 EClass getSocialNetwork();
161
162 /**
163 * Returns the meta object for the attribute '{@link socialnetwork.SocialNetwork#getName <em>Name</em>}'.
164 * <!-- begin-user-doc -->
165 * <!-- end-user-doc -->
166 * @return the meta object for the attribute '<em>Name</em>'.
167 * @see socialnetwork.SocialNetwork#getName()
168 * @see #getSocialNetwork()
169 * @generated
170 */
171 EAttribute getSocialNetwork_Name();
172
173 /**
174 * Returns the meta object for the containment reference list '{@link socialnetwork.SocialNetwork#getPersons <em>Persons</em>}'.
175 * <!-- begin-user-doc -->
176 * <!-- end-user-doc -->
177 * @return the meta object for the containment reference list '<em>Persons</em>'.
178 * @see socialnetwork.SocialNetwork#getPersons()
179 * @see #getSocialNetwork()
180 * @generated
181 */
182 EReference getSocialNetwork_Persons();
183
184 /**
185 * Returns the meta object for class '{@link socialnetwork.Person <em>Person</em>}'.
186 * <!-- begin-user-doc -->
187 * <!-- end-user-doc -->
188 * @return the meta object for class '<em>Person</em>'.
189 * @see socialnetwork.Person
190 * @generated
191 */
192 EClass getPerson();
193
194 /**
195 * Returns the meta object for the reference list '{@link socialnetwork.Person#getFriends <em>Friends</em>}'.
196 * <!-- begin-user-doc -->
197 * <!-- end-user-doc -->
198 * @return the meta object for the reference list '<em>Friends</em>'.
199 * @see socialnetwork.Person#getFriends()
200 * @see #getPerson()
201 * @generated
202 */
203 EReference getPerson_Friends();
204
205 /**
206 * Returns the meta object for the attribute '{@link socialnetwork.Person#getName <em>Name</em>}'.
207 * <!-- begin-user-doc -->
208 * <!-- end-user-doc -->
209 * @return the meta object for the attribute '<em>Name</em>'.
210 * @see socialnetwork.Person#getName()
211 * @see #getPerson()
212 * @generated
213 */
214 EAttribute getPerson_Name();
215
216 /**
217 * Returns the factory that creates the instances of the model.
218 * <!-- begin-user-doc -->
219 * <!-- end-user-doc -->
220 * @return the factory that creates the instances of the model.
221 * @generated
222 */
223 SocialnetworkFactory getSocialnetworkFactory();
224
225 /**
226 * <!-- begin-user-doc -->
227 * Defines literals for the meta objects that represent
228 * <ul>
229 * <li>each class,</li>
230 * <li>each feature of each class,</li>
231 * <li>each operation of each class,</li>
232 * <li>each enum,</li>
233 * <li>and each data type</li>
234 * </ul>
235 * <!-- end-user-doc -->
236 * @generated
237 */
238 interface Literals {
239 /**
240 * The meta object literal for the '{@link socialnetwork.impl.SocialNetworkImpl <em>Social Network</em>}' class.
241 * <!-- begin-user-doc -->
242 * <!-- end-user-doc -->
243 * @see socialnetwork.impl.SocialNetworkImpl
244 * @see socialnetwork.impl.SocialnetworkPackageImpl#getSocialNetwork()
245 * @generated
246 */
247 EClass SOCIAL_NETWORK = eINSTANCE.getSocialNetwork();
248
249 /**
250 * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
251 * <!-- begin-user-doc -->
252 * <!-- end-user-doc -->
253 * @generated
254 */
255 EAttribute SOCIAL_NETWORK__NAME = eINSTANCE.getSocialNetwork_Name();
256
257 /**
258 * The meta object literal for the '<em><b>Persons</b></em>' containment reference list feature.
259 * <!-- begin-user-doc -->
260 * <!-- end-user-doc -->
261 * @generated
262 */
263 EReference SOCIAL_NETWORK__PERSONS = eINSTANCE.getSocialNetwork_Persons();
264
265 /**
266 * The meta object literal for the '{@link socialnetwork.impl.PersonImpl <em>Person</em>}' class.
267 * <!-- begin-user-doc -->
268 * <!-- end-user-doc -->
269 * @see socialnetwork.impl.PersonImpl
270 * @see socialnetwork.impl.SocialnetworkPackageImpl#getPerson()
271 * @generated
272 */
273 EClass PERSON = eINSTANCE.getPerson();
274
275 /**
276 * The meta object literal for the '<em><b>Friends</b></em>' reference list feature.
277 * <!-- begin-user-doc -->
278 * <!-- end-user-doc -->
279 * @generated
280 */
281 EReference PERSON__FRIENDS = eINSTANCE.getPerson_Friends();
282
283 /**
284 * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
285 * <!-- begin-user-doc -->
286 * <!-- end-user-doc -->
287 * @generated
288 */
289 EAttribute PERSON__NAME = eINSTANCE.getPerson_Name();
290
291 }
292
293} //SocialnetworkPackage
diff --git a/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/PersonImpl.java b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/PersonImpl.java
new file mode 100644
index 00000000..d8bab731
--- /dev/null
+++ b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/PersonImpl.java
@@ -0,0 +1,208 @@
1/**
2 */
3package socialnetwork.impl;
4
5import java.util.Collection;
6
7import org.eclipse.emf.common.notify.Notification;
8
9import org.eclipse.emf.common.util.EList;
10
11import org.eclipse.emf.ecore.EClass;
12
13import org.eclipse.emf.ecore.impl.ENotificationImpl;
14import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
15
16import org.eclipse.emf.ecore.util.EObjectResolvingEList;
17
18import socialnetwork.Person;
19import socialnetwork.SocialnetworkPackage;
20
21/**
22 * <!-- begin-user-doc -->
23 * An implementation of the model object '<em><b>Person</b></em>'.
24 * <!-- end-user-doc -->
25 * <p>
26 * The following features are implemented:
27 * </p>
28 * <ul>
29 * <li>{@link socialnetwork.impl.PersonImpl#getFriends <em>Friends</em>}</li>
30 * <li>{@link socialnetwork.impl.PersonImpl#getName <em>Name</em>}</li>
31 * </ul>
32 *
33 * @generated
34 */
35public class PersonImpl extends MinimalEObjectImpl.Container implements Person {
36 /**
37 * The cached value of the '{@link #getFriends() <em>Friends</em>}' reference list.
38 * <!-- begin-user-doc -->
39 * <!-- end-user-doc -->
40 * @see #getFriends()
41 * @generated
42 * @ordered
43 */
44 protected EList<Person> friends;
45
46 /**
47 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
48 * <!-- begin-user-doc -->
49 * <!-- end-user-doc -->
50 * @see #getName()
51 * @generated
52 * @ordered
53 */
54 protected static final String NAME_EDEFAULT = "Name";
55
56 /**
57 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
58 * <!-- begin-user-doc -->
59 * <!-- end-user-doc -->
60 * @see #getName()
61 * @generated
62 * @ordered
63 */
64 protected String name = NAME_EDEFAULT;
65
66 /**
67 * <!-- begin-user-doc -->
68 * <!-- end-user-doc -->
69 * @generated
70 */
71 protected PersonImpl() {
72 super();
73 }
74
75 /**
76 * <!-- begin-user-doc -->
77 * <!-- end-user-doc -->
78 * @generated
79 */
80 @Override
81 protected EClass eStaticClass() {
82 return SocialnetworkPackage.Literals.PERSON;
83 }
84
85 /**
86 * <!-- begin-user-doc -->
87 * <!-- end-user-doc -->
88 * @generated
89 */
90 @Override
91 public EList<Person> getFriends() {
92 if (friends == null) {
93 friends = new EObjectResolvingEList<Person>(Person.class, this, SocialnetworkPackage.PERSON__FRIENDS);
94 }
95 return friends;
96 }
97
98 /**
99 * <!-- begin-user-doc -->
100 * <!-- end-user-doc -->
101 * @generated
102 */
103 @Override
104 public String getName() {
105 return name;
106 }
107
108 /**
109 * <!-- begin-user-doc -->
110 * <!-- end-user-doc -->
111 * @generated
112 */
113 @Override
114 public void setName(String newName) {
115 String oldName = name;
116 name = newName;
117 if (eNotificationRequired())
118 eNotify(new ENotificationImpl(this, Notification.SET, SocialnetworkPackage.PERSON__NAME, oldName, name));
119 }
120
121 /**
122 * <!-- begin-user-doc -->
123 * <!-- end-user-doc -->
124 * @generated
125 */
126 @Override
127 public Object eGet(int featureID, boolean resolve, boolean coreType) {
128 switch (featureID) {
129 case SocialnetworkPackage.PERSON__FRIENDS:
130 return getFriends();
131 case SocialnetworkPackage.PERSON__NAME:
132 return getName();
133 }
134 return super.eGet(featureID, resolve, coreType);
135 }
136
137 /**
138 * <!-- begin-user-doc -->
139 * <!-- end-user-doc -->
140 * @generated
141 */
142 @SuppressWarnings("unchecked")
143 @Override
144 public void eSet(int featureID, Object newValue) {
145 switch (featureID) {
146 case SocialnetworkPackage.PERSON__FRIENDS:
147 getFriends().clear();
148 getFriends().addAll((Collection<? extends Person>) newValue);
149 return;
150 case SocialnetworkPackage.PERSON__NAME:
151 setName((String) newValue);
152 return;
153 }
154 super.eSet(featureID, newValue);
155 }
156
157 /**
158 * <!-- begin-user-doc -->
159 * <!-- end-user-doc -->
160 * @generated
161 */
162 @Override
163 public void eUnset(int featureID) {
164 switch (featureID) {
165 case SocialnetworkPackage.PERSON__FRIENDS:
166 getFriends().clear();
167 return;
168 case SocialnetworkPackage.PERSON__NAME:
169 setName(NAME_EDEFAULT);
170 return;
171 }
172 super.eUnset(featureID);
173 }
174
175 /**
176 * <!-- begin-user-doc -->
177 * <!-- end-user-doc -->
178 * @generated
179 */
180 @Override
181 public boolean eIsSet(int featureID) {
182 switch (featureID) {
183 case SocialnetworkPackage.PERSON__FRIENDS:
184 return friends != null && !friends.isEmpty();
185 case SocialnetworkPackage.PERSON__NAME:
186 return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
187 }
188 return super.eIsSet(featureID);
189 }
190
191 /**
192 * <!-- begin-user-doc -->
193 * <!-- end-user-doc -->
194 * @generated
195 */
196 @Override
197 public String toString() {
198 if (eIsProxy())
199 return super.toString();
200
201 StringBuilder result = new StringBuilder(super.toString());
202 result.append(" (name: ");
203 result.append(name);
204 result.append(')');
205 return result.toString();
206 }
207
208} //PersonImpl
diff --git a/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/SocialNetworkImpl.java b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/SocialNetworkImpl.java
new file mode 100644
index 00000000..cb28b749
--- /dev/null
+++ b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/SocialNetworkImpl.java
@@ -0,0 +1,228 @@
1/**
2 */
3package socialnetwork.impl;
4
5import java.util.Collection;
6
7import org.eclipse.emf.common.notify.Notification;
8import org.eclipse.emf.common.notify.NotificationChain;
9
10import org.eclipse.emf.common.util.EList;
11
12import org.eclipse.emf.ecore.EClass;
13import org.eclipse.emf.ecore.InternalEObject;
14
15import org.eclipse.emf.ecore.impl.ENotificationImpl;
16import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
17
18import org.eclipse.emf.ecore.util.EObjectContainmentEList;
19import org.eclipse.emf.ecore.util.InternalEList;
20
21import socialnetwork.Person;
22import socialnetwork.SocialNetwork;
23import socialnetwork.SocialnetworkPackage;
24
25/**
26 * <!-- begin-user-doc -->
27 * An implementation of the model object '<em><b>Social Network</b></em>'.
28 * <!-- end-user-doc -->
29 * <p>
30 * The following features are implemented:
31 * </p>
32 * <ul>
33 * <li>{@link socialnetwork.impl.SocialNetworkImpl#getName <em>Name</em>}</li>
34 * <li>{@link socialnetwork.impl.SocialNetworkImpl#getPersons <em>Persons</em>}</li>
35 * </ul>
36 *
37 * @generated
38 */
39public class SocialNetworkImpl extends MinimalEObjectImpl.Container implements SocialNetwork {
40 /**
41 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
42 * <!-- begin-user-doc -->
43 * <!-- end-user-doc -->
44 * @see #getName()
45 * @generated
46 * @ordered
47 */
48 protected static final String NAME_EDEFAULT = "SocialNetwork";
49
50 /**
51 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
52 * <!-- begin-user-doc -->
53 * <!-- end-user-doc -->
54 * @see #getName()
55 * @generated
56 * @ordered
57 */
58 protected String name = NAME_EDEFAULT;
59
60 /**
61 * The cached value of the '{@link #getPersons() <em>Persons</em>}' containment reference list.
62 * <!-- begin-user-doc -->
63 * <!-- end-user-doc -->
64 * @see #getPersons()
65 * @generated
66 * @ordered
67 */
68 protected EList<Person> persons;
69
70 /**
71 * <!-- begin-user-doc -->
72 * <!-- end-user-doc -->
73 * @generated
74 */
75 protected SocialNetworkImpl() {
76 super();
77 }
78
79 /**
80 * <!-- begin-user-doc -->
81 * <!-- end-user-doc -->
82 * @generated
83 */
84 @Override
85 protected EClass eStaticClass() {
86 return SocialnetworkPackage.Literals.SOCIAL_NETWORK;
87 }
88
89 /**
90 * <!-- begin-user-doc -->
91 * <!-- end-user-doc -->
92 * @generated
93 */
94 @Override
95 public String getName() {
96 return name;
97 }
98
99 /**
100 * <!-- begin-user-doc -->
101 * <!-- end-user-doc -->
102 * @generated
103 */
104 @Override
105 public void setName(String newName) {
106 String oldName = name;
107 name = newName;
108 if (eNotificationRequired())
109 eNotify(new ENotificationImpl(this, Notification.SET, SocialnetworkPackage.SOCIAL_NETWORK__NAME, oldName,
110 name));
111 }
112
113 /**
114 * <!-- begin-user-doc -->
115 * <!-- end-user-doc -->
116 * @generated
117 */
118 @Override
119 public EList<Person> getPersons() {
120 if (persons == null) {
121 persons = new EObjectContainmentEList<Person>(Person.class, this,
122 SocialnetworkPackage.SOCIAL_NETWORK__PERSONS);
123 }
124 return persons;
125 }
126
127 /**
128 * <!-- begin-user-doc -->
129 * <!-- end-user-doc -->
130 * @generated
131 */
132 @Override
133 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
134 switch (featureID) {
135 case SocialnetworkPackage.SOCIAL_NETWORK__PERSONS:
136 return ((InternalEList<?>) getPersons()).basicRemove(otherEnd, msgs);
137 }
138 return super.eInverseRemove(otherEnd, featureID, msgs);
139 }
140
141 /**
142 * <!-- begin-user-doc -->
143 * <!-- end-user-doc -->
144 * @generated
145 */
146 @Override
147 public Object eGet(int featureID, boolean resolve, boolean coreType) {
148 switch (featureID) {
149 case SocialnetworkPackage.SOCIAL_NETWORK__NAME:
150 return getName();
151 case SocialnetworkPackage.SOCIAL_NETWORK__PERSONS:
152 return getPersons();
153 }
154 return super.eGet(featureID, resolve, coreType);
155 }
156
157 /**
158 * <!-- begin-user-doc -->
159 * <!-- end-user-doc -->
160 * @generated
161 */
162 @SuppressWarnings("unchecked")
163 @Override
164 public void eSet(int featureID, Object newValue) {
165 switch (featureID) {
166 case SocialnetworkPackage.SOCIAL_NETWORK__NAME:
167 setName((String) newValue);
168 return;
169 case SocialnetworkPackage.SOCIAL_NETWORK__PERSONS:
170 getPersons().clear();
171 getPersons().addAll((Collection<? extends Person>) newValue);
172 return;
173 }
174 super.eSet(featureID, newValue);
175 }
176
177 /**
178 * <!-- begin-user-doc -->
179 * <!-- end-user-doc -->
180 * @generated
181 */
182 @Override
183 public void eUnset(int featureID) {
184 switch (featureID) {
185 case SocialnetworkPackage.SOCIAL_NETWORK__NAME:
186 setName(NAME_EDEFAULT);
187 return;
188 case SocialnetworkPackage.SOCIAL_NETWORK__PERSONS:
189 getPersons().clear();
190 return;
191 }
192 super.eUnset(featureID);
193 }
194
195 /**
196 * <!-- begin-user-doc -->
197 * <!-- end-user-doc -->
198 * @generated
199 */
200 @Override
201 public boolean eIsSet(int featureID) {
202 switch (featureID) {
203 case SocialnetworkPackage.SOCIAL_NETWORK__NAME:
204 return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
205 case SocialnetworkPackage.SOCIAL_NETWORK__PERSONS:
206 return persons != null && !persons.isEmpty();
207 }
208 return super.eIsSet(featureID);
209 }
210
211 /**
212 * <!-- begin-user-doc -->
213 * <!-- end-user-doc -->
214 * @generated
215 */
216 @Override
217 public String toString() {
218 if (eIsProxy())
219 return super.toString();
220
221 StringBuilder result = new StringBuilder(super.toString());
222 result.append(" (name: ");
223 result.append(name);
224 result.append(')');
225 return result.toString();
226 }
227
228} //SocialNetworkImpl
diff --git a/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/SocialnetworkFactoryImpl.java b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/SocialnetworkFactoryImpl.java
new file mode 100644
index 00000000..87fa3a87
--- /dev/null
+++ b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/SocialnetworkFactoryImpl.java
@@ -0,0 +1,111 @@
1/**
2 */
3package socialnetwork.impl;
4
5import org.eclipse.emf.ecore.EClass;
6import org.eclipse.emf.ecore.EObject;
7import org.eclipse.emf.ecore.EPackage;
8
9import org.eclipse.emf.ecore.impl.EFactoryImpl;
10
11import org.eclipse.emf.ecore.plugin.EcorePlugin;
12
13import socialnetwork.*;
14
15/**
16 * <!-- begin-user-doc -->
17 * An implementation of the model <b>Factory</b>.
18 * <!-- end-user-doc -->
19 * @generated
20 */
21public class SocialnetworkFactoryImpl extends EFactoryImpl implements SocialnetworkFactory {
22 /**
23 * Creates the default factory implementation.
24 * <!-- begin-user-doc -->
25 * <!-- end-user-doc -->
26 * @generated
27 */
28 public static SocialnetworkFactory init() {
29 try {
30 SocialnetworkFactory theSocialnetworkFactory = (SocialnetworkFactory) EPackage.Registry.INSTANCE
31 .getEFactory(SocialnetworkPackage.eNS_URI);
32 if (theSocialnetworkFactory != null) {
33 return theSocialnetworkFactory;
34 }
35 } catch (Exception exception) {
36 EcorePlugin.INSTANCE.log(exception);
37 }
38 return new SocialnetworkFactoryImpl();
39 }
40
41 /**
42 * Creates an instance of the factory.
43 * <!-- begin-user-doc -->
44 * <!-- end-user-doc -->
45 * @generated
46 */
47 public SocialnetworkFactoryImpl() {
48 super();
49 }
50
51 /**
52 * <!-- begin-user-doc -->
53 * <!-- end-user-doc -->
54 * @generated
55 */
56 @Override
57 public EObject create(EClass eClass) {
58 switch (eClass.getClassifierID()) {
59 case SocialnetworkPackage.SOCIAL_NETWORK:
60 return createSocialNetwork();
61 case SocialnetworkPackage.PERSON:
62 return createPerson();
63 default:
64 throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
65 }
66 }
67
68 /**
69 * <!-- begin-user-doc -->
70 * <!-- end-user-doc -->
71 * @generated
72 */
73 @Override
74 public SocialNetwork createSocialNetwork() {
75 SocialNetworkImpl socialNetwork = new SocialNetworkImpl();
76 return socialNetwork;
77 }
78
79 /**
80 * <!-- begin-user-doc -->
81 * <!-- end-user-doc -->
82 * @generated
83 */
84 @Override
85 public Person createPerson() {
86 PersonImpl person = new PersonImpl();
87 return person;
88 }
89
90 /**
91 * <!-- begin-user-doc -->
92 * <!-- end-user-doc -->
93 * @generated
94 */
95 @Override
96 public SocialnetworkPackage getSocialnetworkPackage() {
97 return (SocialnetworkPackage) getEPackage();
98 }
99
100 /**
101 * <!-- begin-user-doc -->
102 * <!-- end-user-doc -->
103 * @deprecated
104 * @generated
105 */
106 @Deprecated
107 public static SocialnetworkPackage getPackage() {
108 return SocialnetworkPackage.eINSTANCE;
109 }
110
111} //SocialnetworkFactoryImpl
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 */
3package socialnetwork.impl;
4
5import org.eclipse.emf.ecore.EAttribute;
6import org.eclipse.emf.ecore.EClass;
7import org.eclipse.emf.ecore.EPackage;
8import org.eclipse.emf.ecore.EReference;
9
10import org.eclipse.emf.ecore.impl.EPackageImpl;
11
12import socialnetwork.Person;
13import socialnetwork.SocialNetwork;
14import socialnetwork.SocialnetworkFactory;
15import socialnetwork.SocialnetworkPackage;
16
17/**
18 * <!-- begin-user-doc -->
19 * An implementation of the model <b>Package</b>.
20 * <!-- end-user-doc -->
21 * @generated
22 */
23public 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
diff --git a/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/util/SocialnetworkAdapterFactory.java b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/util/SocialnetworkAdapterFactory.java
new file mode 100644
index 00000000..0dd30975
--- /dev/null
+++ b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/util/SocialnetworkAdapterFactory.java
@@ -0,0 +1,138 @@
1/**
2 */
3package socialnetwork.util;
4
5import org.eclipse.emf.common.notify.Adapter;
6import org.eclipse.emf.common.notify.Notifier;
7
8import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
9
10import org.eclipse.emf.ecore.EObject;
11
12import socialnetwork.*;
13
14/**
15 * <!-- begin-user-doc -->
16 * The <b>Adapter Factory</b> for the model.
17 * It provides an adapter <code>createXXX</code> method for each class of the model.
18 * <!-- end-user-doc -->
19 * @see socialnetwork.SocialnetworkPackage
20 * @generated
21 */
22public class SocialnetworkAdapterFactory extends AdapterFactoryImpl {
23 /**
24 * The cached model package.
25 * <!-- begin-user-doc -->
26 * <!-- end-user-doc -->
27 * @generated
28 */
29 protected static SocialnetworkPackage modelPackage;
30
31 /**
32 * Creates an instance of the adapter factory.
33 * <!-- begin-user-doc -->
34 * <!-- end-user-doc -->
35 * @generated
36 */
37 public SocialnetworkAdapterFactory() {
38 if (modelPackage == null) {
39 modelPackage = SocialnetworkPackage.eINSTANCE;
40 }
41 }
42
43 /**
44 * Returns whether this factory is applicable for the type of the object.
45 * <!-- begin-user-doc -->
46 * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
47 * <!-- end-user-doc -->
48 * @return whether this factory is applicable for the type of the object.
49 * @generated
50 */
51 @Override
52 public boolean isFactoryForType(Object object) {
53 if (object == modelPackage) {
54 return true;
55 }
56 if (object instanceof EObject) {
57 return ((EObject) object).eClass().getEPackage() == modelPackage;
58 }
59 return false;
60 }
61
62 /**
63 * The switch that delegates to the <code>createXXX</code> methods.
64 * <!-- begin-user-doc -->
65 * <!-- end-user-doc -->
66 * @generated
67 */
68 protected SocialnetworkSwitch<Adapter> modelSwitch = new SocialnetworkSwitch<Adapter>() {
69 @Override
70 public Adapter caseSocialNetwork(SocialNetwork object) {
71 return createSocialNetworkAdapter();
72 }
73
74 @Override
75 public Adapter casePerson(Person object) {
76 return createPersonAdapter();
77 }
78
79 @Override
80 public Adapter defaultCase(EObject object) {
81 return createEObjectAdapter();
82 }
83 };
84
85 /**
86 * Creates an adapter for the <code>target</code>.
87 * <!-- begin-user-doc -->
88 * <!-- end-user-doc -->
89 * @param target the object to adapt.
90 * @return the adapter for the <code>target</code>.
91 * @generated
92 */
93 @Override
94 public Adapter createAdapter(Notifier target) {
95 return modelSwitch.doSwitch((EObject) target);
96 }
97
98 /**
99 * Creates a new adapter for an object of class '{@link socialnetwork.SocialNetwork <em>Social Network</em>}'.
100 * <!-- begin-user-doc -->
101 * This default implementation returns null so that we can easily ignore cases;
102 * it's useful to ignore a case when inheritance will catch all the cases anyway.
103 * <!-- end-user-doc -->
104 * @return the new adapter.
105 * @see socialnetwork.SocialNetwork
106 * @generated
107 */
108 public Adapter createSocialNetworkAdapter() {
109 return null;
110 }
111
112 /**
113 * Creates a new adapter for an object of class '{@link socialnetwork.Person <em>Person</em>}'.
114 * <!-- begin-user-doc -->
115 * This default implementation returns null so that we can easily ignore cases;
116 * it's useful to ignore a case when inheritance will catch all the cases anyway.
117 * <!-- end-user-doc -->
118 * @return the new adapter.
119 * @see socialnetwork.Person
120 * @generated
121 */
122 public Adapter createPersonAdapter() {
123 return null;
124 }
125
126 /**
127 * Creates a new adapter for the default case.
128 * <!-- begin-user-doc -->
129 * This default implementation returns null.
130 * <!-- end-user-doc -->
131 * @return the new adapter.
132 * @generated
133 */
134 public Adapter createEObjectAdapter() {
135 return null;
136 }
137
138} //SocialnetworkAdapterFactory
diff --git a/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/util/SocialnetworkSwitch.java b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/util/SocialnetworkSwitch.java
new file mode 100644
index 00000000..00d7955c
--- /dev/null
+++ b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/util/SocialnetworkSwitch.java
@@ -0,0 +1,134 @@
1/**
2 */
3package socialnetwork.util;
4
5import org.eclipse.emf.ecore.EObject;
6import org.eclipse.emf.ecore.EPackage;
7
8import org.eclipse.emf.ecore.util.Switch;
9
10import socialnetwork.*;
11
12/**
13 * <!-- begin-user-doc -->
14 * The <b>Switch</b> for the model's inheritance hierarchy.
15 * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
16 * to invoke the <code>caseXXX</code> method for each class of the model,
17 * starting with the actual class of the object
18 * and proceeding up the inheritance hierarchy
19 * until a non-null result is returned,
20 * which is the result of the switch.
21 * <!-- end-user-doc -->
22 * @see socialnetwork.SocialnetworkPackage
23 * @generated
24 */
25public class SocialnetworkSwitch<T> extends Switch<T> {
26 /**
27 * The cached model package
28 * <!-- begin-user-doc -->
29 * <!-- end-user-doc -->
30 * @generated
31 */
32 protected static SocialnetworkPackage modelPackage;
33
34 /**
35 * Creates an instance of the switch.
36 * <!-- begin-user-doc -->
37 * <!-- end-user-doc -->
38 * @generated
39 */
40 public SocialnetworkSwitch() {
41 if (modelPackage == null) {
42 modelPackage = SocialnetworkPackage.eINSTANCE;
43 }
44 }
45
46 /**
47 * Checks whether this is a switch for the given package.
48 * <!-- begin-user-doc -->
49 * <!-- end-user-doc -->
50 * @param ePackage the package in question.
51 * @return whether this is a switch for the given package.
52 * @generated
53 */
54 @Override
55 protected boolean isSwitchFor(EPackage ePackage) {
56 return ePackage == modelPackage;
57 }
58
59 /**
60 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
61 * <!-- begin-user-doc -->
62 * <!-- end-user-doc -->
63 * @return the first non-null result returned by a <code>caseXXX</code> call.
64 * @generated
65 */
66 @Override
67 protected T doSwitch(int classifierID, EObject theEObject) {
68 switch (classifierID) {
69 case SocialnetworkPackage.SOCIAL_NETWORK: {
70 SocialNetwork socialNetwork = (SocialNetwork) theEObject;
71 T result = caseSocialNetwork(socialNetwork);
72 if (result == null)
73 result = defaultCase(theEObject);
74 return result;
75 }
76 case SocialnetworkPackage.PERSON: {
77 Person person = (Person) theEObject;
78 T result = casePerson(person);
79 if (result == null)
80 result = defaultCase(theEObject);
81 return result;
82 }
83 default:
84 return defaultCase(theEObject);
85 }
86 }
87
88 /**
89 * Returns the result of interpreting the object as an instance of '<em>Social Network</em>'.
90 * <!-- begin-user-doc -->
91 * This implementation returns null;
92 * returning a non-null result will terminate the switch.
93 * <!-- end-user-doc -->
94 * @param object the target of the switch.
95 * @return the result of interpreting the object as an instance of '<em>Social Network</em>'.
96 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
97 * @generated
98 */
99 public T caseSocialNetwork(SocialNetwork object) {
100 return null;
101 }
102
103 /**
104 * Returns the result of interpreting the object as an instance of '<em>Person</em>'.
105 * <!-- begin-user-doc -->
106 * This implementation returns null;
107 * returning a non-null result will terminate the switch.
108 * <!-- end-user-doc -->
109 * @param object the target of the switch.
110 * @return the result of interpreting the object as an instance of '<em>Person</em>'.
111 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
112 * @generated
113 */
114 public T casePerson(Person object) {
115 return null;
116 }
117
118 /**
119 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
120 * <!-- begin-user-doc -->
121 * This implementation returns null;
122 * returning a non-null result will terminate the switch, but this is the last case anyway.
123 * <!-- end-user-doc -->
124 * @param object the target of the switch.
125 * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
126 * @see #doSwitch(org.eclipse.emf.ecore.EObject)
127 * @generated
128 */
129 @Override
130 public T defaultCase(EObject object) {
131 return null;
132 }
133
134} //SocialnetworkSwitch