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