aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl')
-rw-r--r--Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FAMTerminatorImpl.java198
-rw-r--r--Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionImpl.java240
-rw-r--r--Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalArchitectureModelImpl.java153
-rw-r--r--Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalDataImpl.java270
-rw-r--r--Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalElementImpl.java318
-rw-r--r--Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalInputImpl.java166
-rw-r--r--Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalInterfaceImpl.java245
-rw-r--r--Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalOutputImpl.java166
-rw-r--r--Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalarchitectureFactoryImpl.java228
-rw-r--r--Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalarchitecturePackageImpl.java575
-rw-r--r--Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/InformationLinkImpl.java289
11 files changed, 2848 insertions, 0 deletions
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FAMTerminatorImpl.java b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FAMTerminatorImpl.java
new file mode 100644
index 00000000..1b5eb362
--- /dev/null
+++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FAMTerminatorImpl.java
@@ -0,0 +1,198 @@
1/**
2 */
3package functionalarchitecture.impl;
4
5import functionalarchitecture.FAMTerminator;
6import functionalarchitecture.FunctionalData;
7import functionalarchitecture.FunctionalarchitecturePackage;
8
9import org.eclipse.emf.common.notify.Notification;
10import org.eclipse.emf.common.notify.NotificationChain;
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.EcoreUtil;
19
20/**
21 * <!-- begin-user-doc -->
22 * An implementation of the model object '<em><b>FAM Terminator</b></em>'.
23 * <!-- end-user-doc -->
24 * <p>
25 * The following features are implemented:
26 * </p>
27 * <ul>
28 * <li>{@link functionalarchitecture.impl.FAMTerminatorImpl#getData <em>Data</em>}</li>
29 * </ul>
30 *
31 * @generated
32 */
33public class FAMTerminatorImpl extends MinimalEObjectImpl.Container implements FAMTerminator {
34 /**
35 * <!-- begin-user-doc -->
36 * <!-- end-user-doc -->
37 * @generated
38 */
39 protected FAMTerminatorImpl() {
40 super();
41 }
42
43 /**
44 * <!-- begin-user-doc -->
45 * <!-- end-user-doc -->
46 * @generated
47 */
48 @Override
49 protected EClass eStaticClass() {
50 return FunctionalarchitecturePackage.Literals.FAM_TERMINATOR;
51 }
52
53 /**
54 * <!-- begin-user-doc -->
55 * <!-- end-user-doc -->
56 * @generated
57 */
58 @Override
59 public FunctionalData getData() {
60 if (eContainerFeatureID() != FunctionalarchitecturePackage.FAM_TERMINATOR__DATA) return null;
61 return (FunctionalData)eInternalContainer();
62 }
63
64 /**
65 * <!-- begin-user-doc -->
66 * <!-- end-user-doc -->
67 * @generated
68 */
69 public NotificationChain basicSetData(FunctionalData newData, NotificationChain msgs) {
70 msgs = eBasicSetContainer((InternalEObject)newData, FunctionalarchitecturePackage.FAM_TERMINATOR__DATA, msgs);
71 return msgs;
72 }
73
74 /**
75 * <!-- begin-user-doc -->
76 * <!-- end-user-doc -->
77 * @generated
78 */
79 @Override
80 public void setData(FunctionalData newData) {
81 if (newData != eInternalContainer() || (eContainerFeatureID() != FunctionalarchitecturePackage.FAM_TERMINATOR__DATA && newData != null)) {
82 if (EcoreUtil.isAncestor(this, newData))
83 throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
84 NotificationChain msgs = null;
85 if (eInternalContainer() != null)
86 msgs = eBasicRemoveFromContainer(msgs);
87 if (newData != null)
88 msgs = ((InternalEObject)newData).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR, FunctionalData.class, msgs);
89 msgs = basicSetData(newData, msgs);
90 if (msgs != null) msgs.dispatch();
91 }
92 else if (eNotificationRequired())
93 eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FAM_TERMINATOR__DATA, newData, newData));
94 }
95
96 /**
97 * <!-- begin-user-doc -->
98 * <!-- end-user-doc -->
99 * @generated
100 */
101 @Override
102 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
103 switch (featureID) {
104 case FunctionalarchitecturePackage.FAM_TERMINATOR__DATA:
105 if (eInternalContainer() != null)
106 msgs = eBasicRemoveFromContainer(msgs);
107 return basicSetData((FunctionalData)otherEnd, msgs);
108 }
109 return super.eInverseAdd(otherEnd, featureID, msgs);
110 }
111
112 /**
113 * <!-- begin-user-doc -->
114 * <!-- end-user-doc -->
115 * @generated
116 */
117 @Override
118 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
119 switch (featureID) {
120 case FunctionalarchitecturePackage.FAM_TERMINATOR__DATA:
121 return basicSetData(null, msgs);
122 }
123 return super.eInverseRemove(otherEnd, featureID, msgs);
124 }
125
126 /**
127 * <!-- begin-user-doc -->
128 * <!-- end-user-doc -->
129 * @generated
130 */
131 @Override
132 public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
133 switch (eContainerFeatureID()) {
134 case FunctionalarchitecturePackage.FAM_TERMINATOR__DATA:
135 return eInternalContainer().eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR, FunctionalData.class, msgs);
136 }
137 return super.eBasicRemoveFromContainerFeature(msgs);
138 }
139
140 /**
141 * <!-- begin-user-doc -->
142 * <!-- end-user-doc -->
143 * @generated
144 */
145 @Override
146 public Object eGet(int featureID, boolean resolve, boolean coreType) {
147 switch (featureID) {
148 case FunctionalarchitecturePackage.FAM_TERMINATOR__DATA:
149 return getData();
150 }
151 return super.eGet(featureID, resolve, coreType);
152 }
153
154 /**
155 * <!-- begin-user-doc -->
156 * <!-- end-user-doc -->
157 * @generated
158 */
159 @Override
160 public void eSet(int featureID, Object newValue) {
161 switch (featureID) {
162 case FunctionalarchitecturePackage.FAM_TERMINATOR__DATA:
163 setData((FunctionalData)newValue);
164 return;
165 }
166 super.eSet(featureID, newValue);
167 }
168
169 /**
170 * <!-- begin-user-doc -->
171 * <!-- end-user-doc -->
172 * @generated
173 */
174 @Override
175 public void eUnset(int featureID) {
176 switch (featureID) {
177 case FunctionalarchitecturePackage.FAM_TERMINATOR__DATA:
178 setData((FunctionalData)null);
179 return;
180 }
181 super.eUnset(featureID);
182 }
183
184 /**
185 * <!-- begin-user-doc -->
186 * <!-- end-user-doc -->
187 * @generated
188 */
189 @Override
190 public boolean eIsSet(int featureID) {
191 switch (featureID) {
192 case FunctionalarchitecturePackage.FAM_TERMINATOR__DATA:
193 return getData() != null;
194 }
195 return super.eIsSet(featureID);
196 }
197
198} //FAMTerminatorImpl
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionImpl.java b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionImpl.java
new file mode 100644
index 00000000..cc41bd6f
--- /dev/null
+++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionImpl.java
@@ -0,0 +1,240 @@
1/**
2 */
3package functionalarchitecture.impl;
4
5import functionalarchitecture.Function;
6import functionalarchitecture.FunctionType;
7import functionalarchitecture.FunctionalElement;
8import functionalarchitecture.FunctionalarchitecturePackage;
9
10import java.util.Collection;
11
12import org.eclipse.emf.common.notify.Notification;
13import org.eclipse.emf.common.notify.NotificationChain;
14
15import org.eclipse.emf.common.util.EList;
16
17import org.eclipse.emf.ecore.EClass;
18import org.eclipse.emf.ecore.InternalEObject;
19
20import org.eclipse.emf.ecore.impl.ENotificationImpl;
21
22import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
23import org.eclipse.emf.ecore.util.InternalEList;
24
25/**
26 * <!-- begin-user-doc -->
27 * An implementation of the model object '<em><b>Function</b></em>'.
28 * <!-- end-user-doc -->
29 * <p>
30 * The following features are implemented:
31 * </p>
32 * <ul>
33 * <li>{@link functionalarchitecture.impl.FunctionImpl#getSubElements <em>Sub Elements</em>}</li>
34 * <li>{@link functionalarchitecture.impl.FunctionImpl#getType <em>Type</em>}</li>
35 * </ul>
36 *
37 * @generated
38 */
39public class FunctionImpl extends FunctionalElementImpl implements Function {
40 /**
41 * The cached value of the '{@link #getSubElements() <em>Sub Elements</em>}' containment reference list.
42 * <!-- begin-user-doc -->
43 * <!-- end-user-doc -->
44 * @see #getSubElements()
45 * @generated
46 * @ordered
47 */
48 protected EList<FunctionalElement> subElements;
49
50 /**
51 * The default value of the '{@link #getType() <em>Type</em>}' attribute.
52 * <!-- begin-user-doc -->
53 * <!-- end-user-doc -->
54 * @see #getType()
55 * @generated
56 * @ordered
57 */
58 protected static final FunctionType TYPE_EDEFAULT = FunctionType.ROOT;
59
60 /**
61 * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
62 * <!-- begin-user-doc -->
63 * <!-- end-user-doc -->
64 * @see #getType()
65 * @generated
66 * @ordered
67 */
68 protected FunctionType type = TYPE_EDEFAULT;
69
70 /**
71 * <!-- begin-user-doc -->
72 * <!-- end-user-doc -->
73 * @generated
74 */
75 protected FunctionImpl() {
76 super();
77 }
78
79 /**
80 * <!-- begin-user-doc -->
81 * <!-- end-user-doc -->
82 * @generated
83 */
84 @Override
85 protected EClass eStaticClass() {
86 return FunctionalarchitecturePackage.Literals.FUNCTION;
87 }
88
89 /**
90 * <!-- begin-user-doc -->
91 * <!-- end-user-doc -->
92 * @generated
93 */
94 @Override
95 public EList<FunctionalElement> getSubElements() {
96 if (subElements == null) {
97 subElements = new EObjectContainmentWithInverseEList<FunctionalElement>(FunctionalElement.class, this, FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT);
98 }
99 return subElements;
100 }
101
102 /**
103 * <!-- begin-user-doc -->
104 * <!-- end-user-doc -->
105 * @generated
106 */
107 @Override
108 public FunctionType getType() {
109 return type;
110 }
111
112 /**
113 * <!-- begin-user-doc -->
114 * <!-- end-user-doc -->
115 * @generated
116 */
117 @Override
118 public void setType(FunctionType newType) {
119 FunctionType oldType = type;
120 type = newType == null ? TYPE_EDEFAULT : newType;
121 if (eNotificationRequired())
122 eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTION__TYPE, oldType, type));
123 }
124
125 /**
126 * <!-- begin-user-doc -->
127 * <!-- end-user-doc -->
128 * @generated
129 */
130 @SuppressWarnings("unchecked")
131 @Override
132 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
133 switch (featureID) {
134 case FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS:
135 return ((InternalEList<InternalEObject>)(InternalEList<?>)getSubElements()).basicAdd(otherEnd, msgs);
136 }
137 return super.eInverseAdd(otherEnd, featureID, msgs);
138 }
139
140 /**
141 * <!-- begin-user-doc -->
142 * <!-- end-user-doc -->
143 * @generated
144 */
145 @Override
146 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
147 switch (featureID) {
148 case FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS:
149 return ((InternalEList<?>)getSubElements()).basicRemove(otherEnd, msgs);
150 }
151 return super.eInverseRemove(otherEnd, featureID, msgs);
152 }
153
154 /**
155 * <!-- begin-user-doc -->
156 * <!-- end-user-doc -->
157 * @generated
158 */
159 @Override
160 public Object eGet(int featureID, boolean resolve, boolean coreType) {
161 switch (featureID) {
162 case FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS:
163 return getSubElements();
164 case FunctionalarchitecturePackage.FUNCTION__TYPE:
165 return getType();
166 }
167 return super.eGet(featureID, resolve, coreType);
168 }
169
170 /**
171 * <!-- begin-user-doc -->
172 * <!-- end-user-doc -->
173 * @generated
174 */
175 @SuppressWarnings("unchecked")
176 @Override
177 public void eSet(int featureID, Object newValue) {
178 switch (featureID) {
179 case FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS:
180 getSubElements().clear();
181 getSubElements().addAll((Collection<? extends FunctionalElement>)newValue);
182 return;
183 case FunctionalarchitecturePackage.FUNCTION__TYPE:
184 setType((FunctionType)newValue);
185 return;
186 }
187 super.eSet(featureID, newValue);
188 }
189
190 /**
191 * <!-- begin-user-doc -->
192 * <!-- end-user-doc -->
193 * @generated
194 */
195 @Override
196 public void eUnset(int featureID) {
197 switch (featureID) {
198 case FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS:
199 getSubElements().clear();
200 return;
201 case FunctionalarchitecturePackage.FUNCTION__TYPE:
202 setType(TYPE_EDEFAULT);
203 return;
204 }
205 super.eUnset(featureID);
206 }
207
208 /**
209 * <!-- begin-user-doc -->
210 * <!-- end-user-doc -->
211 * @generated
212 */
213 @Override
214 public boolean eIsSet(int featureID) {
215 switch (featureID) {
216 case FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS:
217 return subElements != null && !subElements.isEmpty();
218 case FunctionalarchitecturePackage.FUNCTION__TYPE:
219 return type != TYPE_EDEFAULT;
220 }
221 return super.eIsSet(featureID);
222 }
223
224 /**
225 * <!-- begin-user-doc -->
226 * <!-- end-user-doc -->
227 * @generated
228 */
229 @Override
230 public String toString() {
231 if (eIsProxy()) return super.toString();
232
233 StringBuilder result = new StringBuilder(super.toString());
234 result.append(" (type: ");
235 result.append(type);
236 result.append(')');
237 return result.toString();
238 }
239
240} //FunctionImpl
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalArchitectureModelImpl.java b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalArchitectureModelImpl.java
new file mode 100644
index 00000000..314b7db5
--- /dev/null
+++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalArchitectureModelImpl.java
@@ -0,0 +1,153 @@
1/**
2 */
3package functionalarchitecture.impl;
4
5import functionalarchitecture.FunctionalArchitectureModel;
6import functionalarchitecture.FunctionalElement;
7import functionalarchitecture.FunctionalarchitecturePackage;
8
9import java.util.Collection;
10
11import org.eclipse.emf.common.notify.NotificationChain;
12
13import org.eclipse.emf.common.util.EList;
14
15import org.eclipse.emf.ecore.EClass;
16import org.eclipse.emf.ecore.InternalEObject;
17
18import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
19
20import org.eclipse.emf.ecore.util.EObjectContainmentEList;
21import org.eclipse.emf.ecore.util.InternalEList;
22
23/**
24 * <!-- begin-user-doc -->
25 * An implementation of the model object '<em><b>Functional Architecture Model</b></em>'.
26 * <!-- end-user-doc -->
27 * <p>
28 * The following features are implemented:
29 * </p>
30 * <ul>
31 * <li>{@link functionalarchitecture.impl.FunctionalArchitectureModelImpl#getRootElements <em>Root Elements</em>}</li>
32 * </ul>
33 *
34 * @generated
35 */
36public class FunctionalArchitectureModelImpl extends MinimalEObjectImpl.Container implements FunctionalArchitectureModel {
37 /**
38 * The cached value of the '{@link #getRootElements() <em>Root Elements</em>}' containment reference list.
39 * <!-- begin-user-doc -->
40 * <!-- end-user-doc -->
41 * @see #getRootElements()
42 * @generated
43 * @ordered
44 */
45 protected EList<FunctionalElement> rootElements;
46
47 /**
48 * <!-- begin-user-doc -->
49 * <!-- end-user-doc -->
50 * @generated
51 */
52 protected FunctionalArchitectureModelImpl() {
53 super();
54 }
55
56 /**
57 * <!-- begin-user-doc -->
58 * <!-- end-user-doc -->
59 * @generated
60 */
61 @Override
62 protected EClass eStaticClass() {
63 return FunctionalarchitecturePackage.Literals.FUNCTIONAL_ARCHITECTURE_MODEL;
64 }
65
66 /**
67 * <!-- begin-user-doc -->
68 * <!-- end-user-doc -->
69 * @generated
70 */
71 @Override
72 public EList<FunctionalElement> getRootElements() {
73 if (rootElements == null) {
74 rootElements = new EObjectContainmentEList<FunctionalElement>(FunctionalElement.class, this, FunctionalarchitecturePackage.FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS);
75 }
76 return rootElements;
77 }
78
79 /**
80 * <!-- begin-user-doc -->
81 * <!-- end-user-doc -->
82 * @generated
83 */
84 @Override
85 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
86 switch (featureID) {
87 case FunctionalarchitecturePackage.FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS:
88 return ((InternalEList<?>)getRootElements()).basicRemove(otherEnd, msgs);
89 }
90 return super.eInverseRemove(otherEnd, featureID, msgs);
91 }
92
93 /**
94 * <!-- begin-user-doc -->
95 * <!-- end-user-doc -->
96 * @generated
97 */
98 @Override
99 public Object eGet(int featureID, boolean resolve, boolean coreType) {
100 switch (featureID) {
101 case FunctionalarchitecturePackage.FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS:
102 return getRootElements();
103 }
104 return super.eGet(featureID, resolve, coreType);
105 }
106
107 /**
108 * <!-- begin-user-doc -->
109 * <!-- end-user-doc -->
110 * @generated
111 */
112 @SuppressWarnings("unchecked")
113 @Override
114 public void eSet(int featureID, Object newValue) {
115 switch (featureID) {
116 case FunctionalarchitecturePackage.FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS:
117 getRootElements().clear();
118 getRootElements().addAll((Collection<? extends FunctionalElement>)newValue);
119 return;
120 }
121 super.eSet(featureID, newValue);
122 }
123
124 /**
125 * <!-- begin-user-doc -->
126 * <!-- end-user-doc -->
127 * @generated
128 */
129 @Override
130 public void eUnset(int featureID) {
131 switch (featureID) {
132 case FunctionalarchitecturePackage.FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS:
133 getRootElements().clear();
134 return;
135 }
136 super.eUnset(featureID);
137 }
138
139 /**
140 * <!-- begin-user-doc -->
141 * <!-- end-user-doc -->
142 * @generated
143 */
144 @Override
145 public boolean eIsSet(int featureID) {
146 switch (featureID) {
147 case FunctionalarchitecturePackage.FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS:
148 return rootElements != null && !rootElements.isEmpty();
149 }
150 return super.eIsSet(featureID);
151 }
152
153} //FunctionalArchitectureModelImpl
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalDataImpl.java b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalDataImpl.java
new file mode 100644
index 00000000..50028019
--- /dev/null
+++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalDataImpl.java
@@ -0,0 +1,270 @@
1/**
2 */
3package functionalarchitecture.impl;
4
5import functionalarchitecture.FAMTerminator;
6import functionalarchitecture.FunctionalData;
7import functionalarchitecture.FunctionalarchitecturePackage;
8
9import org.eclipse.emf.common.notify.Notification;
10import org.eclipse.emf.common.notify.NotificationChain;
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.EcoreUtil;
19
20/**
21 * <!-- begin-user-doc -->
22 * An implementation of the model object '<em><b>Functional Data</b></em>'.
23 * <!-- end-user-doc -->
24 * <p>
25 * The following features are implemented:
26 * </p>
27 * <ul>
28 * <li>{@link functionalarchitecture.impl.FunctionalDataImpl#getTerminator <em>Terminator</em>}</li>
29 * <li>{@link functionalarchitecture.impl.FunctionalDataImpl#getInterface <em>Interface</em>}</li>
30 * </ul>
31 *
32 * @generated
33 */
34public abstract class FunctionalDataImpl extends MinimalEObjectImpl.Container implements FunctionalData {
35 /**
36 * The cached value of the '{@link #getTerminator() <em>Terminator</em>}' containment reference.
37 * <!-- begin-user-doc -->
38 * <!-- end-user-doc -->
39 * @see #getTerminator()
40 * @generated
41 * @ordered
42 */
43 protected FAMTerminator terminator;
44
45 /**
46 * <!-- begin-user-doc -->
47 * <!-- end-user-doc -->
48 * @generated
49 */
50 protected FunctionalDataImpl() {
51 super();
52 }
53
54 /**
55 * <!-- begin-user-doc -->
56 * <!-- end-user-doc -->
57 * @generated
58 */
59 @Override
60 protected EClass eStaticClass() {
61 return FunctionalarchitecturePackage.Literals.FUNCTIONAL_DATA;
62 }
63
64 /**
65 * <!-- begin-user-doc -->
66 * <!-- end-user-doc -->
67 * @generated
68 */
69 @Override
70 public FAMTerminator getTerminator() {
71 return terminator;
72 }
73
74 /**
75 * <!-- begin-user-doc -->
76 * <!-- end-user-doc -->
77 * @generated
78 */
79 public NotificationChain basicSetTerminator(FAMTerminator newTerminator, NotificationChain msgs) {
80 FAMTerminator oldTerminator = terminator;
81 terminator = newTerminator;
82 if (eNotificationRequired()) {
83 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR, oldTerminator, newTerminator);
84 if (msgs == null) msgs = notification; else msgs.add(notification);
85 }
86 return msgs;
87 }
88
89 /**
90 * <!-- begin-user-doc -->
91 * <!-- end-user-doc -->
92 * @generated
93 */
94 @Override
95 public void setTerminator(FAMTerminator newTerminator) {
96 if (newTerminator != terminator) {
97 NotificationChain msgs = null;
98 if (terminator != null)
99 msgs = ((InternalEObject)terminator).eInverseRemove(this, FunctionalarchitecturePackage.FAM_TERMINATOR__DATA, FAMTerminator.class, msgs);
100 if (newTerminator != null)
101 msgs = ((InternalEObject)newTerminator).eInverseAdd(this, FunctionalarchitecturePackage.FAM_TERMINATOR__DATA, FAMTerminator.class, msgs);
102 msgs = basicSetTerminator(newTerminator, msgs);
103 if (msgs != null) msgs.dispatch();
104 }
105 else if (eNotificationRequired())
106 eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR, newTerminator, newTerminator));
107 }
108
109 /**
110 * <!-- begin-user-doc -->
111 * <!-- end-user-doc -->
112 * @generated
113 */
114 @Override
115 public functionalarchitecture.FunctionalInterface getInterface() {
116 if (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE) return null;
117 return (functionalarchitecture.FunctionalInterface)eInternalContainer();
118 }
119
120 /**
121 * <!-- begin-user-doc -->
122 * <!-- end-user-doc -->
123 * @generated
124 */
125 public NotificationChain basicSetInterface(functionalarchitecture.FunctionalInterface newInterface, NotificationChain msgs) {
126 msgs = eBasicSetContainer((InternalEObject)newInterface, FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE, msgs);
127 return msgs;
128 }
129
130 /**
131 * <!-- begin-user-doc -->
132 * <!-- end-user-doc -->
133 * @generated
134 */
135 @Override
136 public void setInterface(functionalarchitecture.FunctionalInterface newInterface) {
137 if (newInterface != eInternalContainer() || (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE && newInterface != null)) {
138 if (EcoreUtil.isAncestor(this, newInterface))
139 throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
140 NotificationChain msgs = null;
141 if (eInternalContainer() != null)
142 msgs = eBasicRemoveFromContainer(msgs);
143 if (newInterface != null)
144 msgs = ((InternalEObject)newInterface).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA, functionalarchitecture.FunctionalInterface.class, msgs);
145 msgs = basicSetInterface(newInterface, msgs);
146 if (msgs != null) msgs.dispatch();
147 }
148 else if (eNotificationRequired())
149 eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE, newInterface, newInterface));
150 }
151
152 /**
153 * <!-- begin-user-doc -->
154 * <!-- end-user-doc -->
155 * @generated
156 */
157 @Override
158 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
159 switch (featureID) {
160 case FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR:
161 if (terminator != null)
162 msgs = ((InternalEObject)terminator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR, null, msgs);
163 return basicSetTerminator((FAMTerminator)otherEnd, msgs);
164 case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE:
165 if (eInternalContainer() != null)
166 msgs = eBasicRemoveFromContainer(msgs);
167 return basicSetInterface((functionalarchitecture.FunctionalInterface)otherEnd, msgs);
168 }
169 return super.eInverseAdd(otherEnd, featureID, msgs);
170 }
171
172 /**
173 * <!-- begin-user-doc -->
174 * <!-- end-user-doc -->
175 * @generated
176 */
177 @Override
178 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
179 switch (featureID) {
180 case FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR:
181 return basicSetTerminator(null, msgs);
182 case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE:
183 return basicSetInterface(null, msgs);
184 }
185 return super.eInverseRemove(otherEnd, featureID, msgs);
186 }
187
188 /**
189 * <!-- begin-user-doc -->
190 * <!-- end-user-doc -->
191 * @generated
192 */
193 @Override
194 public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
195 switch (eContainerFeatureID()) {
196 case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE:
197 return eInternalContainer().eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA, functionalarchitecture.FunctionalInterface.class, msgs);
198 }
199 return super.eBasicRemoveFromContainerFeature(msgs);
200 }
201
202 /**
203 * <!-- begin-user-doc -->
204 * <!-- end-user-doc -->
205 * @generated
206 */
207 @Override
208 public Object eGet(int featureID, boolean resolve, boolean coreType) {
209 switch (featureID) {
210 case FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR:
211 return getTerminator();
212 case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE:
213 return getInterface();
214 }
215 return super.eGet(featureID, resolve, coreType);
216 }
217
218 /**
219 * <!-- begin-user-doc -->
220 * <!-- end-user-doc -->
221 * @generated
222 */
223 @Override
224 public void eSet(int featureID, Object newValue) {
225 switch (featureID) {
226 case FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR:
227 setTerminator((FAMTerminator)newValue);
228 return;
229 case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE:
230 setInterface((functionalarchitecture.FunctionalInterface)newValue);
231 return;
232 }
233 super.eSet(featureID, newValue);
234 }
235
236 /**
237 * <!-- begin-user-doc -->
238 * <!-- end-user-doc -->
239 * @generated
240 */
241 @Override
242 public void eUnset(int featureID) {
243 switch (featureID) {
244 case FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR:
245 setTerminator((FAMTerminator)null);
246 return;
247 case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE:
248 setInterface((functionalarchitecture.FunctionalInterface)null);
249 return;
250 }
251 super.eUnset(featureID);
252 }
253
254 /**
255 * <!-- begin-user-doc -->
256 * <!-- end-user-doc -->
257 * @generated
258 */
259 @Override
260 public boolean eIsSet(int featureID) {
261 switch (featureID) {
262 case FunctionalarchitecturePackage.FUNCTIONAL_DATA__TERMINATOR:
263 return terminator != null;
264 case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE:
265 return getInterface() != null;
266 }
267 return super.eIsSet(featureID);
268 }
269
270} //FunctionalDataImpl
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalElementImpl.java b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalElementImpl.java
new file mode 100644
index 00000000..2690bcbd
--- /dev/null
+++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalElementImpl.java
@@ -0,0 +1,318 @@
1/**
2 */
3package functionalarchitecture.impl;
4
5import functionalarchitecture.Function;
6import functionalarchitecture.FunctionalArchitectureModel;
7import functionalarchitecture.FunctionalElement;
8import functionalarchitecture.FunctionalarchitecturePackage;
9
10import org.eclipse.emf.common.notify.Notification;
11import org.eclipse.emf.common.notify.NotificationChain;
12
13import org.eclipse.emf.ecore.EClass;
14import org.eclipse.emf.ecore.InternalEObject;
15
16import org.eclipse.emf.ecore.impl.ENotificationImpl;
17import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
18
19import org.eclipse.emf.ecore.util.EcoreUtil;
20
21/**
22 * <!-- begin-user-doc -->
23 * An implementation of the model object '<em><b>Functional Element</b></em>'.
24 * <!-- end-user-doc -->
25 * <p>
26 * The following features are implemented:
27 * </p>
28 * <ul>
29 * <li>{@link functionalarchitecture.impl.FunctionalElementImpl#getInterface <em>Interface</em>}</li>
30 * <li>{@link functionalarchitecture.impl.FunctionalElementImpl#getModel <em>Model</em>}</li>
31 * <li>{@link functionalarchitecture.impl.FunctionalElementImpl#getParent <em>Parent</em>}</li>
32 * </ul>
33 *
34 * @generated
35 */
36public abstract class FunctionalElementImpl extends MinimalEObjectImpl.Container implements FunctionalElement {
37 /**
38 * The cached value of the '{@link #getInterface() <em>Interface</em>}' containment reference.
39 * <!-- begin-user-doc -->
40 * <!-- end-user-doc -->
41 * @see #getInterface()
42 * @generated
43 * @ordered
44 */
45 protected functionalarchitecture.FunctionalInterface interface_;
46
47 /**
48 * <!-- begin-user-doc -->
49 * <!-- end-user-doc -->
50 * @generated
51 */
52 protected FunctionalElementImpl() {
53 super();
54 }
55
56 /**
57 * <!-- begin-user-doc -->
58 * <!-- end-user-doc -->
59 * @generated
60 */
61 @Override
62 protected EClass eStaticClass() {
63 return FunctionalarchitecturePackage.Literals.FUNCTIONAL_ELEMENT;
64 }
65
66 /**
67 * <!-- begin-user-doc -->
68 * <!-- end-user-doc -->
69 * @generated
70 */
71 @Override
72 public functionalarchitecture.FunctionalInterface getInterface() {
73 return interface_;
74 }
75
76 /**
77 * <!-- begin-user-doc -->
78 * <!-- end-user-doc -->
79 * @generated
80 */
81 public NotificationChain basicSetInterface(functionalarchitecture.FunctionalInterface newInterface, NotificationChain msgs) {
82 functionalarchitecture.FunctionalInterface oldInterface = interface_;
83 interface_ = newInterface;
84 if (eNotificationRequired()) {
85 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, oldInterface, newInterface);
86 if (msgs == null) msgs = notification; else msgs.add(notification);
87 }
88 return msgs;
89 }
90
91 /**
92 * <!-- begin-user-doc -->
93 * <!-- end-user-doc -->
94 * @generated
95 */
96 @Override
97 public void setInterface(functionalarchitecture.FunctionalInterface newInterface) {
98 if (newInterface != interface_) {
99 NotificationChain msgs = null;
100 if (interface_ != null)
101 msgs = ((InternalEObject)interface_).eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT, functionalarchitecture.FunctionalInterface.class, msgs);
102 if (newInterface != null)
103 msgs = ((InternalEObject)newInterface).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT, functionalarchitecture.FunctionalInterface.class, msgs);
104 msgs = basicSetInterface(newInterface, msgs);
105 if (msgs != null) msgs.dispatch();
106 }
107 else if (eNotificationRequired())
108 eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, newInterface, newInterface));
109 }
110
111 /**
112 * <!-- begin-user-doc -->
113 * <!-- end-user-doc -->
114 * @generated
115 */
116 @Override
117 public FunctionalArchitectureModel getModel() {
118 FunctionalArchitectureModel model = basicGetModel();
119 return model != null && model.eIsProxy() ? (FunctionalArchitectureModel)eResolveProxy((InternalEObject)model) : model;
120 }
121
122 /**
123 * <!-- begin-user-doc -->
124 * <!-- end-user-doc -->
125 * @generated
126 */
127 public FunctionalArchitectureModel basicGetModel() {
128 // TODO: implement this method to return the 'Model' reference
129 // -> do not perform proxy resolution
130 // Ensure that you remove @generated or mark it @generated NOT
131 throw new UnsupportedOperationException();
132 }
133
134 /**
135 * <!-- begin-user-doc -->
136 * <!-- end-user-doc -->
137 * @generated
138 */
139 @Override
140 public void setModel(FunctionalArchitectureModel newModel) {
141 // TODO: implement this method to set the 'Model' reference
142 // Ensure that you remove @generated or mark it @generated NOT
143 throw new UnsupportedOperationException();
144 }
145
146 /**
147 * <!-- begin-user-doc -->
148 * <!-- end-user-doc -->
149 * @generated
150 */
151 @Override
152 public Function getParent() {
153 if (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT) return null;
154 return (Function)eInternalContainer();
155 }
156
157 /**
158 * <!-- begin-user-doc -->
159 * <!-- end-user-doc -->
160 * @generated
161 */
162 public NotificationChain basicSetParent(Function newParent, NotificationChain msgs) {
163 msgs = eBasicSetContainer((InternalEObject)newParent, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT, msgs);
164 return msgs;
165 }
166
167 /**
168 * <!-- begin-user-doc -->
169 * <!-- end-user-doc -->
170 * @generated
171 */
172 @Override
173 public void setParent(Function newParent) {
174 if (newParent != eInternalContainer() || (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT && newParent != null)) {
175 if (EcoreUtil.isAncestor(this, newParent))
176 throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
177 NotificationChain msgs = null;
178 if (eInternalContainer() != null)
179 msgs = eBasicRemoveFromContainer(msgs);
180 if (newParent != null)
181 msgs = ((InternalEObject)newParent).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS, Function.class, msgs);
182 msgs = basicSetParent(newParent, msgs);
183 if (msgs != null) msgs.dispatch();
184 }
185 else if (eNotificationRequired())
186 eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT, newParent, newParent));
187 }
188
189 /**
190 * <!-- begin-user-doc -->
191 * <!-- end-user-doc -->
192 * @generated
193 */
194 @Override
195 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
196 switch (featureID) {
197 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE:
198 if (interface_ != null)
199 msgs = ((InternalEObject)interface_).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, null, msgs);
200 return basicSetInterface((functionalarchitecture.FunctionalInterface)otherEnd, msgs);
201 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT:
202 if (eInternalContainer() != null)
203 msgs = eBasicRemoveFromContainer(msgs);
204 return basicSetParent((Function)otherEnd, msgs);
205 }
206 return super.eInverseAdd(otherEnd, featureID, msgs);
207 }
208
209 /**
210 * <!-- begin-user-doc -->
211 * <!-- end-user-doc -->
212 * @generated
213 */
214 @Override
215 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
216 switch (featureID) {
217 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE:
218 return basicSetInterface(null, msgs);
219 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT:
220 return basicSetParent(null, msgs);
221 }
222 return super.eInverseRemove(otherEnd, featureID, msgs);
223 }
224
225 /**
226 * <!-- begin-user-doc -->
227 * <!-- end-user-doc -->
228 * @generated
229 */
230 @Override
231 public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
232 switch (eContainerFeatureID()) {
233 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT:
234 return eInternalContainer().eInverseRemove(this, FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS, Function.class, msgs);
235 }
236 return super.eBasicRemoveFromContainerFeature(msgs);
237 }
238
239 /**
240 * <!-- begin-user-doc -->
241 * <!-- end-user-doc -->
242 * @generated
243 */
244 @Override
245 public Object eGet(int featureID, boolean resolve, boolean coreType) {
246 switch (featureID) {
247 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE:
248 return getInterface();
249 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__MODEL:
250 if (resolve) return getModel();
251 return basicGetModel();
252 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT:
253 return getParent();
254 }
255 return super.eGet(featureID, resolve, coreType);
256 }
257
258 /**
259 * <!-- begin-user-doc -->
260 * <!-- end-user-doc -->
261 * @generated
262 */
263 @Override
264 public void eSet(int featureID, Object newValue) {
265 switch (featureID) {
266 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE:
267 setInterface((functionalarchitecture.FunctionalInterface)newValue);
268 return;
269 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__MODEL:
270 setModel((FunctionalArchitectureModel)newValue);
271 return;
272 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT:
273 setParent((Function)newValue);
274 return;
275 }
276 super.eSet(featureID, newValue);
277 }
278
279 /**
280 * <!-- begin-user-doc -->
281 * <!-- end-user-doc -->
282 * @generated
283 */
284 @Override
285 public void eUnset(int featureID) {
286 switch (featureID) {
287 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE:
288 setInterface((functionalarchitecture.FunctionalInterface)null);
289 return;
290 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__MODEL:
291 setModel((FunctionalArchitectureModel)null);
292 return;
293 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT:
294 setParent((Function)null);
295 return;
296 }
297 super.eUnset(featureID);
298 }
299
300 /**
301 * <!-- begin-user-doc -->
302 * <!-- end-user-doc -->
303 * @generated
304 */
305 @Override
306 public boolean eIsSet(int featureID) {
307 switch (featureID) {
308 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE:
309 return interface_ != null;
310 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__MODEL:
311 return basicGetModel() != null;
312 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT:
313 return getParent() != null;
314 }
315 return super.eIsSet(featureID);
316 }
317
318} //FunctionalElementImpl
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalInputImpl.java b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalInputImpl.java
new file mode 100644
index 00000000..01aac03a
--- /dev/null
+++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalInputImpl.java
@@ -0,0 +1,166 @@
1/**
2 */
3package functionalarchitecture.impl;
4
5import functionalarchitecture.FunctionalInput;
6import functionalarchitecture.FunctionalarchitecturePackage;
7import functionalarchitecture.InformationLink;
8
9import java.util.Collection;
10
11import org.eclipse.emf.common.notify.NotificationChain;
12
13import org.eclipse.emf.common.util.EList;
14
15import org.eclipse.emf.ecore.EClass;
16import org.eclipse.emf.ecore.InternalEObject;
17
18import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
19import org.eclipse.emf.ecore.util.InternalEList;
20
21/**
22 * <!-- begin-user-doc -->
23 * An implementation of the model object '<em><b>Functional Input</b></em>'.
24 * <!-- end-user-doc -->
25 * <p>
26 * The following features are implemented:
27 * </p>
28 * <ul>
29 * <li>{@link functionalarchitecture.impl.FunctionalInputImpl#getIncomingLinks <em>Incoming Links</em>}</li>
30 * </ul>
31 *
32 * @generated
33 */
34public class FunctionalInputImpl extends FunctionalDataImpl implements FunctionalInput {
35 /**
36 * The cached value of the '{@link #getIncomingLinks() <em>Incoming Links</em>}' reference list.
37 * <!-- begin-user-doc -->
38 * <!-- end-user-doc -->
39 * @see #getIncomingLinks()
40 * @generated
41 * @ordered
42 */
43 protected EList<InformationLink> incomingLinks;
44
45 /**
46 * <!-- begin-user-doc -->
47 * <!-- end-user-doc -->
48 * @generated
49 */
50 protected FunctionalInputImpl() {
51 super();
52 }
53
54 /**
55 * <!-- begin-user-doc -->
56 * <!-- end-user-doc -->
57 * @generated
58 */
59 @Override
60 protected EClass eStaticClass() {
61 return FunctionalarchitecturePackage.Literals.FUNCTIONAL_INPUT;
62 }
63
64 /**
65 * <!-- begin-user-doc -->
66 * <!-- end-user-doc -->
67 * @generated
68 */
69 @Override
70 public EList<InformationLink> getIncomingLinks() {
71 if (incomingLinks == null) {
72 incomingLinks = new EObjectWithInverseResolvingEList<InformationLink>(InformationLink.class, this, FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS, FunctionalarchitecturePackage.INFORMATION_LINK__TO);
73 }
74 return incomingLinks;
75 }
76
77 /**
78 * <!-- begin-user-doc -->
79 * <!-- end-user-doc -->
80 * @generated
81 */
82 @SuppressWarnings("unchecked")
83 @Override
84 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
85 switch (featureID) {
86 case FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS:
87 return ((InternalEList<InternalEObject>)(InternalEList<?>)getIncomingLinks()).basicAdd(otherEnd, msgs);
88 }
89 return super.eInverseAdd(otherEnd, featureID, msgs);
90 }
91
92 /**
93 * <!-- begin-user-doc -->
94 * <!-- end-user-doc -->
95 * @generated
96 */
97 @Override
98 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
99 switch (featureID) {
100 case FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS:
101 return ((InternalEList<?>)getIncomingLinks()).basicRemove(otherEnd, msgs);
102 }
103 return super.eInverseRemove(otherEnd, featureID, msgs);
104 }
105
106 /**
107 * <!-- begin-user-doc -->
108 * <!-- end-user-doc -->
109 * @generated
110 */
111 @Override
112 public Object eGet(int featureID, boolean resolve, boolean coreType) {
113 switch (featureID) {
114 case FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS:
115 return getIncomingLinks();
116 }
117 return super.eGet(featureID, resolve, coreType);
118 }
119
120 /**
121 * <!-- begin-user-doc -->
122 * <!-- end-user-doc -->
123 * @generated
124 */
125 @SuppressWarnings("unchecked")
126 @Override
127 public void eSet(int featureID, Object newValue) {
128 switch (featureID) {
129 case FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS:
130 getIncomingLinks().clear();
131 getIncomingLinks().addAll((Collection<? extends InformationLink>)newValue);
132 return;
133 }
134 super.eSet(featureID, newValue);
135 }
136
137 /**
138 * <!-- begin-user-doc -->
139 * <!-- end-user-doc -->
140 * @generated
141 */
142 @Override
143 public void eUnset(int featureID) {
144 switch (featureID) {
145 case FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS:
146 getIncomingLinks().clear();
147 return;
148 }
149 super.eUnset(featureID);
150 }
151
152 /**
153 * <!-- begin-user-doc -->
154 * <!-- end-user-doc -->
155 * @generated
156 */
157 @Override
158 public boolean eIsSet(int featureID) {
159 switch (featureID) {
160 case FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS:
161 return incomingLinks != null && !incomingLinks.isEmpty();
162 }
163 return super.eIsSet(featureID);
164 }
165
166} //FunctionalInputImpl
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalInterfaceImpl.java b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalInterfaceImpl.java
new file mode 100644
index 00000000..fe7f4e75
--- /dev/null
+++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalInterfaceImpl.java
@@ -0,0 +1,245 @@
1/**
2 */
3package functionalarchitecture.impl;
4
5import functionalarchitecture.FunctionalData;
6import functionalarchitecture.FunctionalElement;
7import functionalarchitecture.FunctionalarchitecturePackage;
8
9import java.util.Collection;
10
11import org.eclipse.emf.common.notify.Notification;
12import org.eclipse.emf.common.notify.NotificationChain;
13
14import org.eclipse.emf.common.util.EList;
15
16import org.eclipse.emf.ecore.EClass;
17import org.eclipse.emf.ecore.InternalEObject;
18
19import org.eclipse.emf.ecore.impl.ENotificationImpl;
20import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
21
22import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
23import org.eclipse.emf.ecore.util.EcoreUtil;
24import org.eclipse.emf.ecore.util.InternalEList;
25
26/**
27 * <!-- begin-user-doc -->
28 * An implementation of the model object '<em><b>Functional Interface</b></em>'.
29 * <!-- end-user-doc -->
30 * <p>
31 * The following features are implemented:
32 * </p>
33 * <ul>
34 * <li>{@link functionalarchitecture.impl.FunctionalInterfaceImpl#getData <em>Data</em>}</li>
35 * <li>{@link functionalarchitecture.impl.FunctionalInterfaceImpl#getElement <em>Element</em>}</li>
36 * </ul>
37 *
38 * @generated
39 */
40public class FunctionalInterfaceImpl extends MinimalEObjectImpl.Container implements functionalarchitecture.FunctionalInterface {
41 /**
42 * The cached value of the '{@link #getData() <em>Data</em>}' containment reference list.
43 * <!-- begin-user-doc -->
44 * <!-- end-user-doc -->
45 * @see #getData()
46 * @generated
47 * @ordered
48 */
49 protected EList<FunctionalData> data;
50
51 /**
52 * <!-- begin-user-doc -->
53 * <!-- end-user-doc -->
54 * @generated
55 */
56 protected FunctionalInterfaceImpl() {
57 super();
58 }
59
60 /**
61 * <!-- begin-user-doc -->
62 * <!-- end-user-doc -->
63 * @generated
64 */
65 @Override
66 protected EClass eStaticClass() {
67 return FunctionalarchitecturePackage.Literals.FUNCTIONAL_INTERFACE;
68 }
69
70 /**
71 * <!-- begin-user-doc -->
72 * <!-- end-user-doc -->
73 * @generated
74 */
75 @Override
76 public EList<FunctionalData> getData() {
77 if (data == null) {
78 data = new EObjectContainmentWithInverseEList<FunctionalData>(FunctionalData.class, this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA, FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE);
79 }
80 return data;
81 }
82
83 /**
84 * <!-- begin-user-doc -->
85 * <!-- end-user-doc -->
86 * @generated
87 */
88 @Override
89 public FunctionalElement getElement() {
90 if (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT) return null;
91 return (FunctionalElement)eInternalContainer();
92 }
93
94 /**
95 * <!-- begin-user-doc -->
96 * <!-- end-user-doc -->
97 * @generated
98 */
99 public NotificationChain basicSetElement(FunctionalElement newElement, NotificationChain msgs) {
100 msgs = eBasicSetContainer((InternalEObject)newElement, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT, msgs);
101 return msgs;
102 }
103
104 /**
105 * <!-- begin-user-doc -->
106 * <!-- end-user-doc -->
107 * @generated
108 */
109 @Override
110 public void setElement(FunctionalElement newElement) {
111 if (newElement != eInternalContainer() || (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT && newElement != null)) {
112 if (EcoreUtil.isAncestor(this, newElement))
113 throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
114 NotificationChain msgs = null;
115 if (eInternalContainer() != null)
116 msgs = eBasicRemoveFromContainer(msgs);
117 if (newElement != null)
118 msgs = ((InternalEObject)newElement).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, FunctionalElement.class, msgs);
119 msgs = basicSetElement(newElement, msgs);
120 if (msgs != null) msgs.dispatch();
121 }
122 else if (eNotificationRequired())
123 eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT, newElement, newElement));
124 }
125
126 /**
127 * <!-- begin-user-doc -->
128 * <!-- end-user-doc -->
129 * @generated
130 */
131 @SuppressWarnings("unchecked")
132 @Override
133 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
134 switch (featureID) {
135 case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA:
136 return ((InternalEList<InternalEObject>)(InternalEList<?>)getData()).basicAdd(otherEnd, msgs);
137 case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT:
138 if (eInternalContainer() != null)
139 msgs = eBasicRemoveFromContainer(msgs);
140 return basicSetElement((FunctionalElement)otherEnd, msgs);
141 }
142 return super.eInverseAdd(otherEnd, featureID, msgs);
143 }
144
145 /**
146 * <!-- begin-user-doc -->
147 * <!-- end-user-doc -->
148 * @generated
149 */
150 @Override
151 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
152 switch (featureID) {
153 case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA:
154 return ((InternalEList<?>)getData()).basicRemove(otherEnd, msgs);
155 case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT:
156 return basicSetElement(null, msgs);
157 }
158 return super.eInverseRemove(otherEnd, featureID, msgs);
159 }
160
161 /**
162 * <!-- begin-user-doc -->
163 * <!-- end-user-doc -->
164 * @generated
165 */
166 @Override
167 public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
168 switch (eContainerFeatureID()) {
169 case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT:
170 return eInternalContainer().eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, FunctionalElement.class, msgs);
171 }
172 return super.eBasicRemoveFromContainerFeature(msgs);
173 }
174
175 /**
176 * <!-- begin-user-doc -->
177 * <!-- end-user-doc -->
178 * @generated
179 */
180 @Override
181 public Object eGet(int featureID, boolean resolve, boolean coreType) {
182 switch (featureID) {
183 case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA:
184 return getData();
185 case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT:
186 return getElement();
187 }
188 return super.eGet(featureID, resolve, coreType);
189 }
190
191 /**
192 * <!-- begin-user-doc -->
193 * <!-- end-user-doc -->
194 * @generated
195 */
196 @SuppressWarnings("unchecked")
197 @Override
198 public void eSet(int featureID, Object newValue) {
199 switch (featureID) {
200 case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA:
201 getData().clear();
202 getData().addAll((Collection<? extends FunctionalData>)newValue);
203 return;
204 case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT:
205 setElement((FunctionalElement)newValue);
206 return;
207 }
208 super.eSet(featureID, newValue);
209 }
210
211 /**
212 * <!-- begin-user-doc -->
213 * <!-- end-user-doc -->
214 * @generated
215 */
216 @Override
217 public void eUnset(int featureID) {
218 switch (featureID) {
219 case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA:
220 getData().clear();
221 return;
222 case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT:
223 setElement((FunctionalElement)null);
224 return;
225 }
226 super.eUnset(featureID);
227 }
228
229 /**
230 * <!-- begin-user-doc -->
231 * <!-- end-user-doc -->
232 * @generated
233 */
234 @Override
235 public boolean eIsSet(int featureID) {
236 switch (featureID) {
237 case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA:
238 return data != null && !data.isEmpty();
239 case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT:
240 return getElement() != null;
241 }
242 return super.eIsSet(featureID);
243 }
244
245} //FunctionalInterfaceImpl
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalOutputImpl.java b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalOutputImpl.java
new file mode 100644
index 00000000..064dd99c
--- /dev/null
+++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalOutputImpl.java
@@ -0,0 +1,166 @@
1/**
2 */
3package functionalarchitecture.impl;
4
5import functionalarchitecture.FunctionalOutput;
6import functionalarchitecture.FunctionalarchitecturePackage;
7import functionalarchitecture.InformationLink;
8
9import java.util.Collection;
10
11import org.eclipse.emf.common.notify.NotificationChain;
12
13import org.eclipse.emf.common.util.EList;
14
15import org.eclipse.emf.ecore.EClass;
16import org.eclipse.emf.ecore.InternalEObject;
17
18import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
19import org.eclipse.emf.ecore.util.InternalEList;
20
21/**
22 * <!-- begin-user-doc -->
23 * An implementation of the model object '<em><b>Functional Output</b></em>'.
24 * <!-- end-user-doc -->
25 * <p>
26 * The following features are implemented:
27 * </p>
28 * <ul>
29 * <li>{@link functionalarchitecture.impl.FunctionalOutputImpl#getOutgoingLinks <em>Outgoing Links</em>}</li>
30 * </ul>
31 *
32 * @generated
33 */
34public class FunctionalOutputImpl extends FunctionalDataImpl implements FunctionalOutput {
35 /**
36 * The cached value of the '{@link #getOutgoingLinks() <em>Outgoing Links</em>}' containment reference list.
37 * <!-- begin-user-doc -->
38 * <!-- end-user-doc -->
39 * @see #getOutgoingLinks()
40 * @generated
41 * @ordered
42 */
43 protected EList<InformationLink> outgoingLinks;
44
45 /**
46 * <!-- begin-user-doc -->
47 * <!-- end-user-doc -->
48 * @generated
49 */
50 protected FunctionalOutputImpl() {
51 super();
52 }
53
54 /**
55 * <!-- begin-user-doc -->
56 * <!-- end-user-doc -->
57 * @generated
58 */
59 @Override
60 protected EClass eStaticClass() {
61 return FunctionalarchitecturePackage.Literals.FUNCTIONAL_OUTPUT;
62 }
63
64 /**
65 * <!-- begin-user-doc -->
66 * <!-- end-user-doc -->
67 * @generated
68 */
69 @Override
70 public EList<InformationLink> getOutgoingLinks() {
71 if (outgoingLinks == null) {
72 outgoingLinks = new EObjectContainmentWithInverseEList<InformationLink>(InformationLink.class, this, FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS, FunctionalarchitecturePackage.INFORMATION_LINK__FROM);
73 }
74 return outgoingLinks;
75 }
76
77 /**
78 * <!-- begin-user-doc -->
79 * <!-- end-user-doc -->
80 * @generated
81 */
82 @SuppressWarnings("unchecked")
83 @Override
84 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
85 switch (featureID) {
86 case FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS:
87 return ((InternalEList<InternalEObject>)(InternalEList<?>)getOutgoingLinks()).basicAdd(otherEnd, msgs);
88 }
89 return super.eInverseAdd(otherEnd, featureID, msgs);
90 }
91
92 /**
93 * <!-- begin-user-doc -->
94 * <!-- end-user-doc -->
95 * @generated
96 */
97 @Override
98 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
99 switch (featureID) {
100 case FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS:
101 return ((InternalEList<?>)getOutgoingLinks()).basicRemove(otherEnd, msgs);
102 }
103 return super.eInverseRemove(otherEnd, featureID, msgs);
104 }
105
106 /**
107 * <!-- begin-user-doc -->
108 * <!-- end-user-doc -->
109 * @generated
110 */
111 @Override
112 public Object eGet(int featureID, boolean resolve, boolean coreType) {
113 switch (featureID) {
114 case FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS:
115 return getOutgoingLinks();
116 }
117 return super.eGet(featureID, resolve, coreType);
118 }
119
120 /**
121 * <!-- begin-user-doc -->
122 * <!-- end-user-doc -->
123 * @generated
124 */
125 @SuppressWarnings("unchecked")
126 @Override
127 public void eSet(int featureID, Object newValue) {
128 switch (featureID) {
129 case FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS:
130 getOutgoingLinks().clear();
131 getOutgoingLinks().addAll((Collection<? extends InformationLink>)newValue);
132 return;
133 }
134 super.eSet(featureID, newValue);
135 }
136
137 /**
138 * <!-- begin-user-doc -->
139 * <!-- end-user-doc -->
140 * @generated
141 */
142 @Override
143 public void eUnset(int featureID) {
144 switch (featureID) {
145 case FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS:
146 getOutgoingLinks().clear();
147 return;
148 }
149 super.eUnset(featureID);
150 }
151
152 /**
153 * <!-- begin-user-doc -->
154 * <!-- end-user-doc -->
155 * @generated
156 */
157 @Override
158 public boolean eIsSet(int featureID) {
159 switch (featureID) {
160 case FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS:
161 return outgoingLinks != null && !outgoingLinks.isEmpty();
162 }
163 return super.eIsSet(featureID);
164 }
165
166} //FunctionalOutputImpl
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalarchitectureFactoryImpl.java b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalarchitectureFactoryImpl.java
new file mode 100644
index 00000000..814aa62e
--- /dev/null
+++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalarchitectureFactoryImpl.java
@@ -0,0 +1,228 @@
1/**
2 */
3package functionalarchitecture.impl;
4
5import functionalarchitecture.FAMTerminator;
6import functionalarchitecture.Function;
7import functionalarchitecture.FunctionType;
8import functionalarchitecture.FunctionalArchitectureModel;
9import functionalarchitecture.FunctionalInput;
10import functionalarchitecture.FunctionalOutput;
11import functionalarchitecture.FunctionalarchitectureFactory;
12import functionalarchitecture.FunctionalarchitecturePackage;
13import functionalarchitecture.InformationLink;
14
15import org.eclipse.emf.ecore.EClass;
16import org.eclipse.emf.ecore.EDataType;
17import org.eclipse.emf.ecore.EObject;
18import org.eclipse.emf.ecore.EPackage;
19
20import org.eclipse.emf.ecore.impl.EFactoryImpl;
21
22import org.eclipse.emf.ecore.plugin.EcorePlugin;
23
24/**
25 * <!-- begin-user-doc -->
26 * An implementation of the model <b>Factory</b>.
27 * <!-- end-user-doc -->
28 * @generated
29 */
30public class FunctionalarchitectureFactoryImpl extends EFactoryImpl implements FunctionalarchitectureFactory {
31 /**
32 * Creates the default factory implementation.
33 * <!-- begin-user-doc -->
34 * <!-- end-user-doc -->
35 * @generated
36 */
37 public static FunctionalarchitectureFactory init() {
38 try {
39 FunctionalarchitectureFactory theFunctionalarchitectureFactory = (FunctionalarchitectureFactory)EPackage.Registry.INSTANCE.getEFactory(FunctionalarchitecturePackage.eNS_URI);
40 if (theFunctionalarchitectureFactory != null) {
41 return theFunctionalarchitectureFactory;
42 }
43 }
44 catch (Exception exception) {
45 EcorePlugin.INSTANCE.log(exception);
46 }
47 return new FunctionalarchitectureFactoryImpl();
48 }
49
50 /**
51 * Creates an instance of the factory.
52 * <!-- begin-user-doc -->
53 * <!-- end-user-doc -->
54 * @generated
55 */
56 public FunctionalarchitectureFactoryImpl() {
57 super();
58 }
59
60 /**
61 * <!-- begin-user-doc -->
62 * <!-- end-user-doc -->
63 * @generated
64 */
65 @Override
66 public EObject create(EClass eClass) {
67 switch (eClass.getClassifierID()) {
68 case FunctionalarchitecturePackage.FUNCTIONAL_ARCHITECTURE_MODEL: return createFunctionalArchitectureModel();
69 case FunctionalarchitecturePackage.FUNCTION: return createFunction();
70 case FunctionalarchitecturePackage.FAM_TERMINATOR: return createFAMTerminator();
71 case FunctionalarchitecturePackage.INFORMATION_LINK: return createInformationLink();
72 case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE: return createFunctionalInterface();
73 case FunctionalarchitecturePackage.FUNCTIONAL_INPUT: return createFunctionalInput();
74 case FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT: return createFunctionalOutput();
75 default:
76 throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
77 }
78 }
79
80 /**
81 * <!-- begin-user-doc -->
82 * <!-- end-user-doc -->
83 * @generated
84 */
85 @Override
86 public Object createFromString(EDataType eDataType, String initialValue) {
87 switch (eDataType.getClassifierID()) {
88 case FunctionalarchitecturePackage.FUNCTION_TYPE:
89 return createFunctionTypeFromString(eDataType, initialValue);
90 default:
91 throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
92 }
93 }
94
95 /**
96 * <!-- begin-user-doc -->
97 * <!-- end-user-doc -->
98 * @generated
99 */
100 @Override
101 public String convertToString(EDataType eDataType, Object instanceValue) {
102 switch (eDataType.getClassifierID()) {
103 case FunctionalarchitecturePackage.FUNCTION_TYPE:
104 return convertFunctionTypeToString(eDataType, instanceValue);
105 default:
106 throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
107 }
108 }
109
110 /**
111 * <!-- begin-user-doc -->
112 * <!-- end-user-doc -->
113 * @generated
114 */
115 @Override
116 public FunctionalArchitectureModel createFunctionalArchitectureModel() {
117 FunctionalArchitectureModelImpl functionalArchitectureModel = new FunctionalArchitectureModelImpl();
118 return functionalArchitectureModel;
119 }
120
121 /**
122 * <!-- begin-user-doc -->
123 * <!-- end-user-doc -->
124 * @generated
125 */
126 @Override
127 public Function createFunction() {
128 FunctionImpl function = new FunctionImpl();
129 return function;
130 }
131
132 /**
133 * <!-- begin-user-doc -->
134 * <!-- end-user-doc -->
135 * @generated
136 */
137 @Override
138 public FAMTerminator createFAMTerminator() {
139 FAMTerminatorImpl famTerminator = new FAMTerminatorImpl();
140 return famTerminator;
141 }
142
143 /**
144 * <!-- begin-user-doc -->
145 * <!-- end-user-doc -->
146 * @generated
147 */
148 @Override
149 public InformationLink createInformationLink() {
150 InformationLinkImpl informationLink = new InformationLinkImpl();
151 return informationLink;
152 }
153
154 /**
155 * <!-- begin-user-doc -->
156 * <!-- end-user-doc -->
157 * @generated
158 */
159 @Override
160 public functionalarchitecture.FunctionalInterface createFunctionalInterface() {
161 FunctionalInterfaceImpl functionalInterface = new FunctionalInterfaceImpl();
162 return functionalInterface;
163 }
164
165 /**
166 * <!-- begin-user-doc -->
167 * <!-- end-user-doc -->
168 * @generated
169 */
170 @Override
171 public FunctionalInput createFunctionalInput() {
172 FunctionalInputImpl functionalInput = new FunctionalInputImpl();
173 return functionalInput;
174 }
175
176 /**
177 * <!-- begin-user-doc -->
178 * <!-- end-user-doc -->
179 * @generated
180 */
181 @Override
182 public FunctionalOutput createFunctionalOutput() {
183 FunctionalOutputImpl functionalOutput = new FunctionalOutputImpl();
184 return functionalOutput;
185 }
186
187 /**
188 * <!-- begin-user-doc -->
189 * <!-- end-user-doc -->
190 * @generated
191 */
192 public FunctionType createFunctionTypeFromString(EDataType eDataType, String initialValue) {
193 FunctionType result = FunctionType.get(initialValue);
194 if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
195 return result;
196 }
197
198 /**
199 * <!-- begin-user-doc -->
200 * <!-- end-user-doc -->
201 * @generated
202 */
203 public String convertFunctionTypeToString(EDataType eDataType, Object instanceValue) {
204 return instanceValue == null ? null : instanceValue.toString();
205 }
206
207 /**
208 * <!-- begin-user-doc -->
209 * <!-- end-user-doc -->
210 * @generated
211 */
212 @Override
213 public FunctionalarchitecturePackage getFunctionalarchitecturePackage() {
214 return (FunctionalarchitecturePackage)getEPackage();
215 }
216
217 /**
218 * <!-- begin-user-doc -->
219 * <!-- end-user-doc -->
220 * @deprecated
221 * @generated
222 */
223 @Deprecated
224 public static FunctionalarchitecturePackage getPackage() {
225 return FunctionalarchitecturePackage.eINSTANCE;
226 }
227
228} //FunctionalarchitectureFactoryImpl
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalarchitecturePackageImpl.java b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalarchitecturePackageImpl.java
new file mode 100644
index 00000000..ccb5fade
--- /dev/null
+++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/FunctionalarchitecturePackageImpl.java
@@ -0,0 +1,575 @@
1/**
2 */
3package functionalarchitecture.impl;
4
5import functionalarchitecture.FAMTerminator;
6import functionalarchitecture.Function;
7import functionalarchitecture.FunctionType;
8import functionalarchitecture.FunctionalArchitectureModel;
9import functionalarchitecture.FunctionalData;
10import functionalarchitecture.FunctionalElement;
11import functionalarchitecture.FunctionalInput;
12import functionalarchitecture.FunctionalOutput;
13import functionalarchitecture.FunctionalarchitectureFactory;
14import functionalarchitecture.FunctionalarchitecturePackage;
15import functionalarchitecture.InformationLink;
16
17import org.eclipse.emf.ecore.EAttribute;
18import org.eclipse.emf.ecore.EClass;
19import org.eclipse.emf.ecore.EEnum;
20import org.eclipse.emf.ecore.EPackage;
21import org.eclipse.emf.ecore.EReference;
22
23import org.eclipse.emf.ecore.impl.EPackageImpl;
24
25/**
26 * <!-- begin-user-doc -->
27 * An implementation of the model <b>Package</b>.
28 * <!-- end-user-doc -->
29 * @generated
30 */
31public class FunctionalarchitecturePackageImpl extends EPackageImpl implements FunctionalarchitecturePackage {
32 /**
33 * <!-- begin-user-doc -->
34 * <!-- end-user-doc -->
35 * @generated
36 */
37 private EClass functionalElementEClass = null;
38
39 /**
40 * <!-- begin-user-doc -->
41 * <!-- end-user-doc -->
42 * @generated
43 */
44 private EClass functionalArchitectureModelEClass = null;
45
46 /**
47 * <!-- begin-user-doc -->
48 * <!-- end-user-doc -->
49 * @generated
50 */
51 private EClass functionEClass = null;
52
53 /**
54 * <!-- begin-user-doc -->
55 * <!-- end-user-doc -->
56 * @generated
57 */
58 private EClass famTerminatorEClass = null;
59
60 /**
61 * <!-- begin-user-doc -->
62 * <!-- end-user-doc -->
63 * @generated
64 */
65 private EClass informationLinkEClass = null;
66
67 /**
68 * <!-- begin-user-doc -->
69 * <!-- end-user-doc -->
70 * @generated
71 */
72 private EClass functionalInterfaceEClass = null;
73
74 /**
75 * <!-- begin-user-doc -->
76 * <!-- end-user-doc -->
77 * @generated
78 */
79 private EClass functionalInputEClass = null;
80
81 /**
82 * <!-- begin-user-doc -->
83 * <!-- end-user-doc -->
84 * @generated
85 */
86 private EClass functionalOutputEClass = null;
87
88 /**
89 * <!-- begin-user-doc -->
90 * <!-- end-user-doc -->
91 * @generated
92 */
93 private EClass functionalDataEClass = null;
94
95 /**
96 * <!-- begin-user-doc -->
97 * <!-- end-user-doc -->
98 * @generated
99 */
100 private EEnum functionTypeEEnum = null;
101
102 /**
103 * Creates an instance of the model <b>Package</b>, registered with
104 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
105 * package URI value.
106 * <p>Note: the correct way to create the package is via the static
107 * factory method {@link #init init()}, which also performs
108 * initialization of the package, or returns the registered package,
109 * if one already exists.
110 * <!-- begin-user-doc -->
111 * <!-- end-user-doc -->
112 * @see org.eclipse.emf.ecore.EPackage.Registry
113 * @see functionalarchitecture.FunctionalarchitecturePackage#eNS_URI
114 * @see #init()
115 * @generated
116 */
117 private FunctionalarchitecturePackageImpl() {
118 super(eNS_URI, FunctionalarchitectureFactory.eINSTANCE);
119 }
120
121 /**
122 * <!-- begin-user-doc -->
123 * <!-- end-user-doc -->
124 * @generated
125 */
126 private static boolean isInited = false;
127
128 /**
129 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
130 *
131 * <p>This method is used to initialize {@link FunctionalarchitecturePackage#eINSTANCE} when that field is accessed.
132 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
133 * <!-- begin-user-doc -->
134 * <!-- end-user-doc -->
135 * @see #eNS_URI
136 * @see #createPackageContents()
137 * @see #initializePackageContents()
138 * @generated
139 */
140 public static FunctionalarchitecturePackage init() {
141 if (isInited) return (FunctionalarchitecturePackage)EPackage.Registry.INSTANCE.getEPackage(FunctionalarchitecturePackage.eNS_URI);
142
143 // Obtain or create and register package
144 Object registeredFunctionalarchitecturePackage = EPackage.Registry.INSTANCE.get(eNS_URI);
145 FunctionalarchitecturePackageImpl theFunctionalarchitecturePackage = registeredFunctionalarchitecturePackage instanceof FunctionalarchitecturePackageImpl ? (FunctionalarchitecturePackageImpl)registeredFunctionalarchitecturePackage : new FunctionalarchitecturePackageImpl();
146
147 isInited = true;
148
149 // Create package meta-data objects
150 theFunctionalarchitecturePackage.createPackageContents();
151
152 // Initialize created meta-data
153 theFunctionalarchitecturePackage.initializePackageContents();
154
155 // Mark meta-data to indicate it can't be changed
156 theFunctionalarchitecturePackage.freeze();
157
158 // Update the registry and return the package
159 EPackage.Registry.INSTANCE.put(FunctionalarchitecturePackage.eNS_URI, theFunctionalarchitecturePackage);
160 return theFunctionalarchitecturePackage;
161 }
162
163 /**
164 * <!-- begin-user-doc -->
165 * <!-- end-user-doc -->
166 * @generated
167 */
168 @Override
169 public EClass getFunctionalElement() {
170 return functionalElementEClass;
171 }
172
173 /**
174 * <!-- begin-user-doc -->
175 * <!-- end-user-doc -->
176 * @generated
177 */
178 @Override
179 public EReference getFunctionalElement_Interface() {
180 return (EReference)functionalElementEClass.getEStructuralFeatures().get(0);
181 }
182
183 /**
184 * <!-- begin-user-doc -->
185 * <!-- end-user-doc -->
186 * @generated
187 */
188 @Override
189 public EReference getFunctionalElement_Model() {
190 return (EReference)functionalElementEClass.getEStructuralFeatures().get(1);
191 }
192
193 /**
194 * <!-- begin-user-doc -->
195 * <!-- end-user-doc -->
196 * @generated
197 */
198 @Override
199 public EReference getFunctionalElement_Parent() {
200 return (EReference)functionalElementEClass.getEStructuralFeatures().get(2);
201 }
202
203 /**
204 * <!-- begin-user-doc -->
205 * <!-- end-user-doc -->
206 * @generated
207 */
208 @Override
209 public EClass getFunctionalArchitectureModel() {
210 return functionalArchitectureModelEClass;
211 }
212
213 /**
214 * <!-- begin-user-doc -->
215 * <!-- end-user-doc -->
216 * @generated
217 */
218 @Override
219 public EReference getFunctionalArchitectureModel_RootElements() {
220 return (EReference)functionalArchitectureModelEClass.getEStructuralFeatures().get(0);
221 }
222
223 /**
224 * <!-- begin-user-doc -->
225 * <!-- end-user-doc -->
226 * @generated
227 */
228 @Override
229 public EClass getFunction() {
230 return functionEClass;
231 }
232
233 /**
234 * <!-- begin-user-doc -->
235 * <!-- end-user-doc -->
236 * @generated
237 */
238 @Override
239 public EReference getFunction_SubElements() {
240 return (EReference)functionEClass.getEStructuralFeatures().get(0);
241 }
242
243 /**
244 * <!-- begin-user-doc -->
245 * <!-- end-user-doc -->
246 * @generated
247 */
248 @Override
249 public EAttribute getFunction_Type() {
250 return (EAttribute)functionEClass.getEStructuralFeatures().get(1);
251 }
252
253 /**
254 * <!-- begin-user-doc -->
255 * <!-- end-user-doc -->
256 * @generated
257 */
258 @Override
259 public EClass getFAMTerminator() {
260 return famTerminatorEClass;
261 }
262
263 /**
264 * <!-- begin-user-doc -->
265 * <!-- end-user-doc -->
266 * @generated
267 */
268 @Override
269 public EReference getFAMTerminator_Data() {
270 return (EReference)famTerminatorEClass.getEStructuralFeatures().get(0);
271 }
272
273 /**
274 * <!-- begin-user-doc -->
275 * <!-- end-user-doc -->
276 * @generated
277 */
278 @Override
279 public EClass getInformationLink() {
280 return informationLinkEClass;
281 }
282
283 /**
284 * <!-- begin-user-doc -->
285 * <!-- end-user-doc -->
286 * @generated
287 */
288 @Override
289 public EReference getInformationLink_From() {
290 return (EReference)informationLinkEClass.getEStructuralFeatures().get(0);
291 }
292
293 /**
294 * <!-- begin-user-doc -->
295 * <!-- end-user-doc -->
296 * @generated
297 */
298 @Override
299 public EReference getInformationLink_To() {
300 return (EReference)informationLinkEClass.getEStructuralFeatures().get(1);
301 }
302
303 /**
304 * <!-- begin-user-doc -->
305 * <!-- end-user-doc -->
306 * @generated
307 */
308 @Override
309 public EClass getFunctionalInterface() {
310 return functionalInterfaceEClass;
311 }
312
313 /**
314 * <!-- begin-user-doc -->
315 * <!-- end-user-doc -->
316 * @generated
317 */
318 @Override
319 public EReference getFunctionalInterface_Data() {
320 return (EReference)functionalInterfaceEClass.getEStructuralFeatures().get(0);
321 }
322
323 /**
324 * <!-- begin-user-doc -->
325 * <!-- end-user-doc -->
326 * @generated
327 */
328 @Override
329 public EReference getFunctionalInterface_Element() {
330 return (EReference)functionalInterfaceEClass.getEStructuralFeatures().get(1);
331 }
332
333 /**
334 * <!-- begin-user-doc -->
335 * <!-- end-user-doc -->
336 * @generated
337 */
338 @Override
339 public EClass getFunctionalInput() {
340 return functionalInputEClass;
341 }
342
343 /**
344 * <!-- begin-user-doc -->
345 * <!-- end-user-doc -->
346 * @generated
347 */
348 @Override
349 public EReference getFunctionalInput_IncomingLinks() {
350 return (EReference)functionalInputEClass.getEStructuralFeatures().get(0);
351 }
352
353 /**
354 * <!-- begin-user-doc -->
355 * <!-- end-user-doc -->
356 * @generated
357 */
358 @Override
359 public EClass getFunctionalOutput() {
360 return functionalOutputEClass;
361 }
362
363 /**
364 * <!-- begin-user-doc -->
365 * <!-- end-user-doc -->
366 * @generated
367 */
368 @Override
369 public EReference getFunctionalOutput_OutgoingLinks() {
370 return (EReference)functionalOutputEClass.getEStructuralFeatures().get(0);
371 }
372
373 /**
374 * <!-- begin-user-doc -->
375 * <!-- end-user-doc -->
376 * @generated
377 */
378 @Override
379 public EClass getFunctionalData() {
380 return functionalDataEClass;
381 }
382
383 /**
384 * <!-- begin-user-doc -->
385 * <!-- end-user-doc -->
386 * @generated
387 */
388 @Override
389 public EReference getFunctionalData_Terminator() {
390 return (EReference)functionalDataEClass.getEStructuralFeatures().get(0);
391 }
392
393 /**
394 * <!-- begin-user-doc -->
395 * <!-- end-user-doc -->
396 * @generated
397 */
398 @Override
399 public EReference getFunctionalData_Interface() {
400 return (EReference)functionalDataEClass.getEStructuralFeatures().get(1);
401 }
402
403 /**
404 * <!-- begin-user-doc -->
405 * <!-- end-user-doc -->
406 * @generated
407 */
408 @Override
409 public EEnum getFunctionType() {
410 return functionTypeEEnum;
411 }
412
413 /**
414 * <!-- begin-user-doc -->
415 * <!-- end-user-doc -->
416 * @generated
417 */
418 @Override
419 public FunctionalarchitectureFactory getFunctionalarchitectureFactory() {
420 return (FunctionalarchitectureFactory)getEFactoryInstance();
421 }
422
423 /**
424 * <!-- begin-user-doc -->
425 * <!-- end-user-doc -->
426 * @generated
427 */
428 private boolean isCreated = false;
429
430 /**
431 * Creates the meta-model objects for the package. This method is
432 * guarded to have no affect on any invocation but its first.
433 * <!-- begin-user-doc -->
434 * <!-- end-user-doc -->
435 * @generated
436 */
437 public void createPackageContents() {
438 if (isCreated) return;
439 isCreated = true;
440
441 // Create classes and their features
442 functionalElementEClass = createEClass(FUNCTIONAL_ELEMENT);
443 createEReference(functionalElementEClass, FUNCTIONAL_ELEMENT__INTERFACE);
444 createEReference(functionalElementEClass, FUNCTIONAL_ELEMENT__MODEL);
445 createEReference(functionalElementEClass, FUNCTIONAL_ELEMENT__PARENT);
446
447 functionalArchitectureModelEClass = createEClass(FUNCTIONAL_ARCHITECTURE_MODEL);
448 createEReference(functionalArchitectureModelEClass, FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS);
449
450 functionEClass = createEClass(FUNCTION);
451 createEReference(functionEClass, FUNCTION__SUB_ELEMENTS);
452 createEAttribute(functionEClass, FUNCTION__TYPE);
453
454 famTerminatorEClass = createEClass(FAM_TERMINATOR);
455 createEReference(famTerminatorEClass, FAM_TERMINATOR__DATA);
456
457 informationLinkEClass = createEClass(INFORMATION_LINK);
458 createEReference(informationLinkEClass, INFORMATION_LINK__FROM);
459 createEReference(informationLinkEClass, INFORMATION_LINK__TO);
460
461 functionalInterfaceEClass = createEClass(FUNCTIONAL_INTERFACE);
462 createEReference(functionalInterfaceEClass, FUNCTIONAL_INTERFACE__DATA);
463 createEReference(functionalInterfaceEClass, FUNCTIONAL_INTERFACE__ELEMENT);
464
465 functionalInputEClass = createEClass(FUNCTIONAL_INPUT);
466 createEReference(functionalInputEClass, FUNCTIONAL_INPUT__INCOMING_LINKS);
467
468 functionalOutputEClass = createEClass(FUNCTIONAL_OUTPUT);
469 createEReference(functionalOutputEClass, FUNCTIONAL_OUTPUT__OUTGOING_LINKS);
470
471 functionalDataEClass = createEClass(FUNCTIONAL_DATA);
472 createEReference(functionalDataEClass, FUNCTIONAL_DATA__TERMINATOR);
473 createEReference(functionalDataEClass, FUNCTIONAL_DATA__INTERFACE);
474
475 // Create enums
476 functionTypeEEnum = createEEnum(FUNCTION_TYPE);
477 }
478
479 /**
480 * <!-- begin-user-doc -->
481 * <!-- end-user-doc -->
482 * @generated
483 */
484 private boolean isInitialized = false;
485
486 /**
487 * Complete the initialization of the package and its meta-model. This
488 * method is guarded to have no affect on any invocation but its first.
489 * <!-- begin-user-doc -->
490 * <!-- end-user-doc -->
491 * @generated
492 */
493 public void initializePackageContents() {
494 if (isInitialized) return;
495 isInitialized = true;
496
497 // Initialize package
498 setName(eNAME);
499 setNsPrefix(eNS_PREFIX);
500 setNsURI(eNS_URI);
501
502 // Create type parameters
503
504 // Set bounds for type parameters
505
506 // Add supertypes to classes
507 functionEClass.getESuperTypes().add(this.getFunctionalElement());
508 functionalInputEClass.getESuperTypes().add(this.getFunctionalData());
509 functionalOutputEClass.getESuperTypes().add(this.getFunctionalData());
510
511 // Initialize classes, features, and operations; add parameters
512 initEClass(functionalElementEClass, FunctionalElement.class, "FunctionalElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
513 initEReference(getFunctionalElement_Interface(), this.getFunctionalInterface(), this.getFunctionalInterface_Element(), "interface", null, 0, 1, FunctionalElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
514 initEReference(getFunctionalElement_Model(), this.getFunctionalArchitectureModel(), null, "model", null, 1, 1, FunctionalElement.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
515 initEReference(getFunctionalElement_Parent(), this.getFunction(), this.getFunction_SubElements(), "parent", null, 0, 1, FunctionalElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
516
517 initEClass(functionalArchitectureModelEClass, FunctionalArchitectureModel.class, "FunctionalArchitectureModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
518 initEReference(getFunctionalArchitectureModel_RootElements(), this.getFunctionalElement(), null, "rootElements", null, 0, -1, FunctionalArchitectureModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
519
520 initEClass(functionEClass, Function.class, "Function", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
521 initEReference(getFunction_SubElements(), this.getFunctionalElement(), this.getFunctionalElement_Parent(), "subElements", null, 0, -1, Function.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
522 initEAttribute(getFunction_Type(), this.getFunctionType(), "type", null, 1, 1, Function.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
523
524 initEClass(famTerminatorEClass, FAMTerminator.class, "FAMTerminator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
525 initEReference(getFAMTerminator_Data(), this.getFunctionalData(), this.getFunctionalData_Terminator(), "data", null, 0, 1, FAMTerminator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
526
527 initEClass(informationLinkEClass, InformationLink.class, "InformationLink", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
528 initEReference(getInformationLink_From(), this.getFunctionalOutput(), this.getFunctionalOutput_OutgoingLinks(), "from", null, 0, 1, InformationLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
529 initEReference(getInformationLink_To(), this.getFunctionalInput(), this.getFunctionalInput_IncomingLinks(), "to", null, 1, 1, InformationLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
530
531 initEClass(functionalInterfaceEClass, functionalarchitecture.FunctionalInterface.class, "FunctionalInterface", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
532 initEReference(getFunctionalInterface_Data(), this.getFunctionalData(), this.getFunctionalData_Interface(), "data", null, 0, -1, functionalarchitecture.FunctionalInterface.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
533 initEReference(getFunctionalInterface_Element(), this.getFunctionalElement(), this.getFunctionalElement_Interface(), "element", null, 0, 1, functionalarchitecture.FunctionalInterface.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
534
535 initEClass(functionalInputEClass, FunctionalInput.class, "FunctionalInput", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
536 initEReference(getFunctionalInput_IncomingLinks(), this.getInformationLink(), this.getInformationLink_To(), "IncomingLinks", null, 0, -1, FunctionalInput.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
537
538 initEClass(functionalOutputEClass, FunctionalOutput.class, "FunctionalOutput", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
539 initEReference(getFunctionalOutput_OutgoingLinks(), this.getInformationLink(), this.getInformationLink_From(), "outgoingLinks", null, 0, -1, FunctionalOutput.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
540
541 initEClass(functionalDataEClass, FunctionalData.class, "FunctionalData", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
542 initEReference(getFunctionalData_Terminator(), this.getFAMTerminator(), this.getFAMTerminator_Data(), "terminator", null, 0, 1, FunctionalData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
543 initEReference(getFunctionalData_Interface(), this.getFunctionalInterface(), this.getFunctionalInterface_Data(), "interface", null, 0, 1, FunctionalData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
544
545 // Initialize enums and add enum literals
546 initEEnum(functionTypeEEnum, FunctionType.class, "FunctionType");
547 addEEnumLiteral(functionTypeEEnum, FunctionType.ROOT);
548 addEEnumLiteral(functionTypeEEnum, FunctionType.INTERMEDIATE);
549 addEEnumLiteral(functionTypeEEnum, FunctionType.LEAF);
550
551 // Create resource
552 createResource(eNS_URI);
553
554 // Create annotations
555 // org.eclipse.viatra.query.querybasedfeature
556 createOrgAnnotations();
557 }
558
559 /**
560 * Initializes the annotations for <b>org.eclipse.viatra.query.querybasedfeature</b>.
561 * <!-- begin-user-doc -->
562 * <!-- end-user-doc -->
563 * @generated
564 */
565 protected void createOrgAnnotations() {
566 String source = "org.eclipse.viatra.query.querybasedfeature";
567 addAnnotation
568 (getFunctionalElement_Model(),
569 source,
570 new String[] {
571 "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.fam.model"
572 });
573 }
574
575} //FunctionalarchitecturePackageImpl
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/InformationLinkImpl.java b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/InformationLinkImpl.java
new file mode 100644
index 00000000..bf5d5db8
--- /dev/null
+++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/impl/InformationLinkImpl.java
@@ -0,0 +1,289 @@
1/**
2 */
3package functionalarchitecture.impl;
4
5import functionalarchitecture.FunctionalInput;
6import functionalarchitecture.FunctionalOutput;
7import functionalarchitecture.FunctionalarchitecturePackage;
8import functionalarchitecture.InformationLink;
9
10import org.eclipse.emf.common.notify.Notification;
11import org.eclipse.emf.common.notify.NotificationChain;
12
13import org.eclipse.emf.ecore.EClass;
14import org.eclipse.emf.ecore.InternalEObject;
15
16import org.eclipse.emf.ecore.impl.ENotificationImpl;
17import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
18
19import org.eclipse.emf.ecore.util.EcoreUtil;
20
21/**
22 * <!-- begin-user-doc -->
23 * An implementation of the model object '<em><b>Information Link</b></em>'.
24 * <!-- end-user-doc -->
25 * <p>
26 * The following features are implemented:
27 * </p>
28 * <ul>
29 * <li>{@link functionalarchitecture.impl.InformationLinkImpl#getFrom <em>From</em>}</li>
30 * <li>{@link functionalarchitecture.impl.InformationLinkImpl#getTo <em>To</em>}</li>
31 * </ul>
32 *
33 * @generated
34 */
35public class InformationLinkImpl extends MinimalEObjectImpl.Container implements InformationLink {
36 /**
37 * The cached value of the '{@link #getTo() <em>To</em>}' reference.
38 * <!-- begin-user-doc -->
39 * <!-- end-user-doc -->
40 * @see #getTo()
41 * @generated
42 * @ordered
43 */
44 protected FunctionalInput to;
45
46 /**
47 * <!-- begin-user-doc -->
48 * <!-- end-user-doc -->
49 * @generated
50 */
51 protected InformationLinkImpl() {
52 super();
53 }
54
55 /**
56 * <!-- begin-user-doc -->
57 * <!-- end-user-doc -->
58 * @generated
59 */
60 @Override
61 protected EClass eStaticClass() {
62 return FunctionalarchitecturePackage.Literals.INFORMATION_LINK;
63 }
64
65 /**
66 * <!-- begin-user-doc -->
67 * <!-- end-user-doc -->
68 * @generated
69 */
70 @Override
71 public FunctionalOutput getFrom() {
72 if (eContainerFeatureID() != FunctionalarchitecturePackage.INFORMATION_LINK__FROM) return null;
73 return (FunctionalOutput)eInternalContainer();
74 }
75
76 /**
77 * <!-- begin-user-doc -->
78 * <!-- end-user-doc -->
79 * @generated
80 */
81 public NotificationChain basicSetFrom(FunctionalOutput newFrom, NotificationChain msgs) {
82 msgs = eBasicSetContainer((InternalEObject)newFrom, FunctionalarchitecturePackage.INFORMATION_LINK__FROM, msgs);
83 return msgs;
84 }
85
86 /**
87 * <!-- begin-user-doc -->
88 * <!-- end-user-doc -->
89 * @generated
90 */
91 @Override
92 public void setFrom(FunctionalOutput newFrom) {
93 if (newFrom != eInternalContainer() || (eContainerFeatureID() != FunctionalarchitecturePackage.INFORMATION_LINK__FROM && newFrom != null)) {
94 if (EcoreUtil.isAncestor(this, newFrom))
95 throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
96 NotificationChain msgs = null;
97 if (eInternalContainer() != null)
98 msgs = eBasicRemoveFromContainer(msgs);
99 if (newFrom != null)
100 msgs = ((InternalEObject)newFrom).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS, FunctionalOutput.class, msgs);
101 msgs = basicSetFrom(newFrom, msgs);
102 if (msgs != null) msgs.dispatch();
103 }
104 else if (eNotificationRequired())
105 eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.INFORMATION_LINK__FROM, newFrom, newFrom));
106 }
107
108 /**
109 * <!-- begin-user-doc -->
110 * <!-- end-user-doc -->
111 * @generated
112 */
113 @Override
114 public FunctionalInput getTo() {
115 if (to != null && to.eIsProxy()) {
116 InternalEObject oldTo = (InternalEObject)to;
117 to = (FunctionalInput)eResolveProxy(oldTo);
118 if (to != oldTo) {
119 if (eNotificationRequired())
120 eNotify(new ENotificationImpl(this, Notification.RESOLVE, FunctionalarchitecturePackage.INFORMATION_LINK__TO, oldTo, to));
121 }
122 }
123 return to;
124 }
125
126 /**
127 * <!-- begin-user-doc -->
128 * <!-- end-user-doc -->
129 * @generated
130 */
131 public FunctionalInput basicGetTo() {
132 return to;
133 }
134
135 /**
136 * <!-- begin-user-doc -->
137 * <!-- end-user-doc -->
138 * @generated
139 */
140 public NotificationChain basicSetTo(FunctionalInput newTo, NotificationChain msgs) {
141 FunctionalInput oldTo = to;
142 to = newTo;
143 if (eNotificationRequired()) {
144 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.INFORMATION_LINK__TO, oldTo, newTo);
145 if (msgs == null) msgs = notification; else msgs.add(notification);
146 }
147 return msgs;
148 }
149
150 /**
151 * <!-- begin-user-doc -->
152 * <!-- end-user-doc -->
153 * @generated
154 */
155 @Override
156 public void setTo(FunctionalInput newTo) {
157 if (newTo != to) {
158 NotificationChain msgs = null;
159 if (to != null)
160 msgs = ((InternalEObject)to).eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS, FunctionalInput.class, msgs);
161 if (newTo != null)
162 msgs = ((InternalEObject)newTo).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS, FunctionalInput.class, msgs);
163 msgs = basicSetTo(newTo, msgs);
164 if (msgs != null) msgs.dispatch();
165 }
166 else if (eNotificationRequired())
167 eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.INFORMATION_LINK__TO, newTo, newTo));
168 }
169
170 /**
171 * <!-- begin-user-doc -->
172 * <!-- end-user-doc -->
173 * @generated
174 */
175 @Override
176 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
177 switch (featureID) {
178 case FunctionalarchitecturePackage.INFORMATION_LINK__FROM:
179 if (eInternalContainer() != null)
180 msgs = eBasicRemoveFromContainer(msgs);
181 return basicSetFrom((FunctionalOutput)otherEnd, msgs);
182 case FunctionalarchitecturePackage.INFORMATION_LINK__TO:
183 if (to != null)
184 msgs = ((InternalEObject)to).eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS, FunctionalInput.class, msgs);
185 return basicSetTo((FunctionalInput)otherEnd, msgs);
186 }
187 return super.eInverseAdd(otherEnd, featureID, msgs);
188 }
189
190 /**
191 * <!-- begin-user-doc -->
192 * <!-- end-user-doc -->
193 * @generated
194 */
195 @Override
196 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
197 switch (featureID) {
198 case FunctionalarchitecturePackage.INFORMATION_LINK__FROM:
199 return basicSetFrom(null, msgs);
200 case FunctionalarchitecturePackage.INFORMATION_LINK__TO:
201 return basicSetTo(null, msgs);
202 }
203 return super.eInverseRemove(otherEnd, featureID, msgs);
204 }
205
206 /**
207 * <!-- begin-user-doc -->
208 * <!-- end-user-doc -->
209 * @generated
210 */
211 @Override
212 public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
213 switch (eContainerFeatureID()) {
214 case FunctionalarchitecturePackage.INFORMATION_LINK__FROM:
215 return eInternalContainer().eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS, FunctionalOutput.class, msgs);
216 }
217 return super.eBasicRemoveFromContainerFeature(msgs);
218 }
219
220 /**
221 * <!-- begin-user-doc -->
222 * <!-- end-user-doc -->
223 * @generated
224 */
225 @Override
226 public Object eGet(int featureID, boolean resolve, boolean coreType) {
227 switch (featureID) {
228 case FunctionalarchitecturePackage.INFORMATION_LINK__FROM:
229 return getFrom();
230 case FunctionalarchitecturePackage.INFORMATION_LINK__TO:
231 if (resolve) return getTo();
232 return basicGetTo();
233 }
234 return super.eGet(featureID, resolve, coreType);
235 }
236
237 /**
238 * <!-- begin-user-doc -->
239 * <!-- end-user-doc -->
240 * @generated
241 */
242 @Override
243 public void eSet(int featureID, Object newValue) {
244 switch (featureID) {
245 case FunctionalarchitecturePackage.INFORMATION_LINK__FROM:
246 setFrom((FunctionalOutput)newValue);
247 return;
248 case FunctionalarchitecturePackage.INFORMATION_LINK__TO:
249 setTo((FunctionalInput)newValue);
250 return;
251 }
252 super.eSet(featureID, newValue);
253 }
254
255 /**
256 * <!-- begin-user-doc -->
257 * <!-- end-user-doc -->
258 * @generated
259 */
260 @Override
261 public void eUnset(int featureID) {
262 switch (featureID) {
263 case FunctionalarchitecturePackage.INFORMATION_LINK__FROM:
264 setFrom((FunctionalOutput)null);
265 return;
266 case FunctionalarchitecturePackage.INFORMATION_LINK__TO:
267 setTo((FunctionalInput)null);
268 return;
269 }
270 super.eUnset(featureID);
271 }
272
273 /**
274 * <!-- begin-user-doc -->
275 * <!-- end-user-doc -->
276 * @generated
277 */
278 @Override
279 public boolean eIsSet(int featureID) {
280 switch (featureID) {
281 case FunctionalarchitecturePackage.INFORMATION_LINK__FROM:
282 return getFrom() != null;
283 case FunctionalarchitecturePackage.INFORMATION_LINK__TO:
284 return to != null;
285 }
286 return super.eIsSet(featureID);
287 }
288
289} //InformationLinkImpl