aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/util
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kris7topher@gmail.com>2019-04-15 16:23:19 +0200
committerLibravatar Kristóf Marussy <kris7topher@gmail.com>2019-04-15 16:23:19 +0200
commit2531cfb60d747c261a20201415728beb0e24ab9b (patch)
tree0d7a242c674d735879e8c017bda7212e7ad02df2 /Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/util
parentMake diversity checking work with optimization (diff)
downloadVIATRA-Generator-2531cfb60d747c261a20201415728beb0e24ab9b.tar.gz
VIATRA-Generator-2531cfb60d747c261a20201415728beb0e24ab9b.tar.zst
VIATRA-Generator-2531cfb60d747c261a20201415728beb0e24ab9b.zip
Satellite constellation case study WIP
Diffstat (limited to 'Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/util')
-rw-r--r--Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/util/FunctionalarchitectureAdapterFactory.java272
-rw-r--r--Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/util/FunctionalarchitectureSwitch.java289
2 files changed, 561 insertions, 0 deletions
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/util/FunctionalarchitectureAdapterFactory.java b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/util/FunctionalarchitectureAdapterFactory.java
new file mode 100644
index 00000000..ed0d9819
--- /dev/null
+++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/util/FunctionalarchitectureAdapterFactory.java
@@ -0,0 +1,272 @@
1/**
2 */
3package functionalarchitecture.util;
4
5import functionalarchitecture.FAMTerminator;
6import functionalarchitecture.Function;
7import functionalarchitecture.FunctionalArchitectureModel;
8import functionalarchitecture.FunctionalData;
9import functionalarchitecture.FunctionalElement;
10import functionalarchitecture.FunctionalInput;
11import functionalarchitecture.FunctionalOutput;
12import functionalarchitecture.FunctionalarchitecturePackage;
13import functionalarchitecture.InformationLink;
14
15import org.eclipse.emf.common.notify.Adapter;
16import org.eclipse.emf.common.notify.Notifier;
17
18import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
19
20import org.eclipse.emf.ecore.EObject;
21
22/**
23 * <!-- begin-user-doc -->
24 * The <b>Adapter Factory</b> for the model.
25 * It provides an adapter <code>createXXX</code> method for each class of the model.
26 * <!-- end-user-doc -->
27 * @see functionalarchitecture.FunctionalarchitecturePackage
28 * @generated
29 */
30public class FunctionalarchitectureAdapterFactory extends AdapterFactoryImpl {
31 /**
32 * The cached model package.
33 * <!-- begin-user-doc -->
34 * <!-- end-user-doc -->
35 * @generated
36 */
37 protected static FunctionalarchitecturePackage modelPackage;
38
39 /**
40 * Creates an instance of the adapter factory.
41 * <!-- begin-user-doc -->
42 * <!-- end-user-doc -->
43 * @generated
44 */
45 public FunctionalarchitectureAdapterFactory() {
46 if (modelPackage == null) {
47 modelPackage = FunctionalarchitecturePackage.eINSTANCE;
48 }
49 }
50
51 /**
52 * Returns whether this factory is applicable for the type of the object.
53 * <!-- begin-user-doc -->
54 * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
55 * <!-- end-user-doc -->
56 * @return whether this factory is applicable for the type of the object.
57 * @generated
58 */
59 @Override
60 public boolean isFactoryForType(Object object) {
61 if (object == modelPackage) {
62 return true;
63 }
64 if (object instanceof EObject) {
65 return ((EObject)object).eClass().getEPackage() == modelPackage;
66 }
67 return false;
68 }
69
70 /**
71 * The switch that delegates to the <code>createXXX</code> methods.
72 * <!-- begin-user-doc -->
73 * <!-- end-user-doc -->
74 * @generated
75 */
76 protected FunctionalarchitectureSwitch<Adapter> modelSwitch =
77 new FunctionalarchitectureSwitch<Adapter>() {
78 @Override
79 public Adapter caseFunctionalElement(FunctionalElement object) {
80 return createFunctionalElementAdapter();
81 }
82 @Override
83 public Adapter caseFunctionalArchitectureModel(FunctionalArchitectureModel object) {
84 return createFunctionalArchitectureModelAdapter();
85 }
86 @Override
87 public Adapter caseFunction(Function object) {
88 return createFunctionAdapter();
89 }
90 @Override
91 public Adapter caseFAMTerminator(FAMTerminator object) {
92 return createFAMTerminatorAdapter();
93 }
94 @Override
95 public Adapter caseInformationLink(InformationLink object) {
96 return createInformationLinkAdapter();
97 }
98 @Override
99 public Adapter caseFunctionalInterface(functionalarchitecture.FunctionalInterface object) {
100 return createFunctionalInterfaceAdapter();
101 }
102 @Override
103 public Adapter caseFunctionalInput(FunctionalInput object) {
104 return createFunctionalInputAdapter();
105 }
106 @Override
107 public Adapter caseFunctionalOutput(FunctionalOutput object) {
108 return createFunctionalOutputAdapter();
109 }
110 @Override
111 public Adapter caseFunctionalData(FunctionalData object) {
112 return createFunctionalDataAdapter();
113 }
114 @Override
115 public Adapter defaultCase(EObject object) {
116 return createEObjectAdapter();
117 }
118 };
119
120 /**
121 * Creates an adapter for the <code>target</code>.
122 * <!-- begin-user-doc -->
123 * <!-- end-user-doc -->
124 * @param target the object to adapt.
125 * @return the adapter for the <code>target</code>.
126 * @generated
127 */
128 @Override
129 public Adapter createAdapter(Notifier target) {
130 return modelSwitch.doSwitch((EObject)target);
131 }
132
133
134 /**
135 * Creates a new adapter for an object of class '{@link functionalarchitecture.FunctionalElement <em>Functional Element</em>}'.
136 * <!-- begin-user-doc -->
137 * This default implementation returns null so that we can easily ignore cases;
138 * it's useful to ignore a case when inheritance will catch all the cases anyway.
139 * <!-- end-user-doc -->
140 * @return the new adapter.
141 * @see functionalarchitecture.FunctionalElement
142 * @generated
143 */
144 public Adapter createFunctionalElementAdapter() {
145 return null;
146 }
147
148 /**
149 * Creates a new adapter for an object of class '{@link functionalarchitecture.FunctionalArchitectureModel <em>Functional Architecture Model</em>}'.
150 * <!-- begin-user-doc -->
151 * This default implementation returns null so that we can easily ignore cases;
152 * it's useful to ignore a case when inheritance will catch all the cases anyway.
153 * <!-- end-user-doc -->
154 * @return the new adapter.
155 * @see functionalarchitecture.FunctionalArchitectureModel
156 * @generated
157 */
158 public Adapter createFunctionalArchitectureModelAdapter() {
159 return null;
160 }
161
162 /**
163 * Creates a new adapter for an object of class '{@link functionalarchitecture.Function <em>Function</em>}'.
164 * <!-- begin-user-doc -->
165 * This default implementation returns null so that we can easily ignore cases;
166 * it's useful to ignore a case when inheritance will catch all the cases anyway.
167 * <!-- end-user-doc -->
168 * @return the new adapter.
169 * @see functionalarchitecture.Function
170 * @generated
171 */
172 public Adapter createFunctionAdapter() {
173 return null;
174 }
175
176 /**
177 * Creates a new adapter for an object of class '{@link functionalarchitecture.FAMTerminator <em>FAM Terminator</em>}'.
178 * <!-- begin-user-doc -->
179 * This default implementation returns null so that we can easily ignore cases;
180 * it's useful to ignore a case when inheritance will catch all the cases anyway.
181 * <!-- end-user-doc -->
182 * @return the new adapter.
183 * @see functionalarchitecture.FAMTerminator
184 * @generated
185 */
186 public Adapter createFAMTerminatorAdapter() {
187 return null;
188 }
189
190 /**
191 * Creates a new adapter for an object of class '{@link functionalarchitecture.InformationLink <em>Information Link</em>}'.
192 * <!-- begin-user-doc -->
193 * This default implementation returns null so that we can easily ignore cases;
194 * it's useful to ignore a case when inheritance will catch all the cases anyway.
195 * <!-- end-user-doc -->
196 * @return the new adapter.
197 * @see functionalarchitecture.InformationLink
198 * @generated
199 */
200 public Adapter createInformationLinkAdapter() {
201 return null;
202 }
203
204 /**
205 * Creates a new adapter for an object of class '{@link functionalarchitecture.FunctionalInterface <em>Functional Interface</em>}'.
206 * <!-- begin-user-doc -->
207 * This default implementation returns null so that we can easily ignore cases;
208 * it's useful to ignore a case when inheritance will catch all the cases anyway.
209 * <!-- end-user-doc -->
210 * @return the new adapter.
211 * @see functionalarchitecture.FunctionalInterface
212 * @generated
213 */
214 public Adapter createFunctionalInterfaceAdapter() {
215 return null;
216 }
217
218 /**
219 * Creates a new adapter for an object of class '{@link functionalarchitecture.FunctionalInput <em>Functional Input</em>}'.
220 * <!-- begin-user-doc -->
221 * This default implementation returns null so that we can easily ignore cases;
222 * it's useful to ignore a case when inheritance will catch all the cases anyway.
223 * <!-- end-user-doc -->
224 * @return the new adapter.
225 * @see functionalarchitecture.FunctionalInput
226 * @generated
227 */
228 public Adapter createFunctionalInputAdapter() {
229 return null;
230 }
231
232 /**
233 * Creates a new adapter for an object of class '{@link functionalarchitecture.FunctionalOutput <em>Functional Output</em>}'.
234 * <!-- begin-user-doc -->
235 * This default implementation returns null so that we can easily ignore cases;
236 * it's useful to ignore a case when inheritance will catch all the cases anyway.
237 * <!-- end-user-doc -->
238 * @return the new adapter.
239 * @see functionalarchitecture.FunctionalOutput
240 * @generated
241 */
242 public Adapter createFunctionalOutputAdapter() {
243 return null;
244 }
245
246 /**
247 * Creates a new adapter for an object of class '{@link functionalarchitecture.FunctionalData <em>Functional Data</em>}'.
248 * <!-- begin-user-doc -->
249 * This default implementation returns null so that we can easily ignore cases;
250 * it's useful to ignore a case when inheritance will catch all the cases anyway.
251 * <!-- end-user-doc -->
252 * @return the new adapter.
253 * @see functionalarchitecture.FunctionalData
254 * @generated
255 */
256 public Adapter createFunctionalDataAdapter() {
257 return null;
258 }
259
260 /**
261 * Creates a new adapter for the default case.
262 * <!-- begin-user-doc -->
263 * This default implementation returns null.
264 * <!-- end-user-doc -->
265 * @return the new adapter.
266 * @generated
267 */
268 public Adapter createEObjectAdapter() {
269 return null;
270 }
271
272} //FunctionalarchitectureAdapterFactory
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/util/FunctionalarchitectureSwitch.java b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/util/FunctionalarchitectureSwitch.java
new file mode 100644
index 00000000..c765346e
--- /dev/null
+++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/util/FunctionalarchitectureSwitch.java
@@ -0,0 +1,289 @@
1/**
2 */
3package functionalarchitecture.util;
4
5import functionalarchitecture.FAMTerminator;
6import functionalarchitecture.Function;
7import functionalarchitecture.FunctionalArchitectureModel;
8import functionalarchitecture.FunctionalData;
9import functionalarchitecture.FunctionalElement;
10import functionalarchitecture.FunctionalInput;
11import functionalarchitecture.FunctionalOutput;
12import functionalarchitecture.FunctionalarchitecturePackage;
13import functionalarchitecture.InformationLink;
14
15import org.eclipse.emf.ecore.EObject;
16import org.eclipse.emf.ecore.EPackage;
17
18import org.eclipse.emf.ecore.util.Switch;
19
20/**
21 * <!-- begin-user-doc -->
22 * The <b>Switch</b> for the model's inheritance hierarchy.
23 * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
24 * to invoke the <code>caseXXX</code> method for each class of the model,
25 * starting with the actual class of the object
26 * and proceeding up the inheritance hierarchy
27 * until a non-null result is returned,
28 * which is the result of the switch.
29 * <!-- end-user-doc -->
30 * @see functionalarchitecture.FunctionalarchitecturePackage
31 * @generated
32 */
33public class FunctionalarchitectureSwitch<T> extends Switch<T> {
34 /**
35 * The cached model package
36 * <!-- begin-user-doc -->
37 * <!-- end-user-doc -->
38 * @generated
39 */
40 protected static FunctionalarchitecturePackage modelPackage;
41
42 /**
43 * Creates an instance of the switch.
44 * <!-- begin-user-doc -->
45 * <!-- end-user-doc -->
46 * @generated
47 */
48 public FunctionalarchitectureSwitch() {
49 if (modelPackage == null) {
50 modelPackage = FunctionalarchitecturePackage.eINSTANCE;
51 }
52 }
53
54 /**
55 * Checks whether this is a switch for the given package.
56 * <!-- begin-user-doc -->
57 * <!-- end-user-doc -->
58 * @param ePackage the package in question.
59 * @return whether this is a switch for the given package.
60 * @generated
61 */
62 @Override
63 protected boolean isSwitchFor(EPackage ePackage) {
64 return ePackage == modelPackage;
65 }
66
67 /**
68 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
69 * <!-- begin-user-doc -->
70 * <!-- end-user-doc -->
71 * @return the first non-null result returned by a <code>caseXXX</code> call.
72 * @generated
73 */
74 @Override
75 protected T doSwitch(int classifierID, EObject theEObject) {
76 switch (classifierID) {
77 case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT: {
78 FunctionalElement functionalElement = (FunctionalElement)theEObject;
79 T result = caseFunctionalElement(functionalElement);
80 if (result == null) result = defaultCase(theEObject);
81 return result;
82 }
83 case FunctionalarchitecturePackage.FUNCTIONAL_ARCHITECTURE_MODEL: {
84 FunctionalArchitectureModel functionalArchitectureModel = (FunctionalArchitectureModel)theEObject;
85 T result = caseFunctionalArchitectureModel(functionalArchitectureModel);
86 if (result == null) result = defaultCase(theEObject);
87 return result;
88 }
89 case FunctionalarchitecturePackage.FUNCTION: {
90 Function function = (Function)theEObject;
91 T result = caseFunction(function);
92 if (result == null) result = caseFunctionalElement(function);
93 if (result == null) result = defaultCase(theEObject);
94 return result;
95 }
96 case FunctionalarchitecturePackage.FAM_TERMINATOR: {
97 FAMTerminator famTerminator = (FAMTerminator)theEObject;
98 T result = caseFAMTerminator(famTerminator);
99 if (result == null) result = defaultCase(theEObject);
100 return result;
101 }
102 case FunctionalarchitecturePackage.INFORMATION_LINK: {
103 InformationLink informationLink = (InformationLink)theEObject;
104 T result = caseInformationLink(informationLink);
105 if (result == null) result = defaultCase(theEObject);
106 return result;
107 }
108 case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE: {
109 functionalarchitecture.FunctionalInterface functionalInterface = (functionalarchitecture.FunctionalInterface)theEObject;
110 T result = caseFunctionalInterface(functionalInterface);
111 if (result == null) result = defaultCase(theEObject);
112 return result;
113 }
114 case FunctionalarchitecturePackage.FUNCTIONAL_INPUT: {
115 FunctionalInput functionalInput = (FunctionalInput)theEObject;
116 T result = caseFunctionalInput(functionalInput);
117 if (result == null) result = caseFunctionalData(functionalInput);
118 if (result == null) result = defaultCase(theEObject);
119 return result;
120 }
121 case FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT: {
122 FunctionalOutput functionalOutput = (FunctionalOutput)theEObject;
123 T result = caseFunctionalOutput(functionalOutput);
124 if (result == null) result = caseFunctionalData(functionalOutput);
125 if (result == null) result = defaultCase(theEObject);
126 return result;
127 }
128 case FunctionalarchitecturePackage.FUNCTIONAL_DATA: {
129 FunctionalData functionalData = (FunctionalData)theEObject;
130 T result = caseFunctionalData(functionalData);
131 if (result == null) result = defaultCase(theEObject);
132 return result;
133 }
134 default: return defaultCase(theEObject);
135 }
136 }
137
138 /**
139 * Returns the result of interpreting the object as an instance of '<em>Functional Element</em>'.
140 * <!-- begin-user-doc -->
141 * This implementation returns null;
142 * returning a non-null result will terminate the switch.
143 * <!-- end-user-doc -->
144 * @param object the target of the switch.
145 * @return the result of interpreting the object as an instance of '<em>Functional Element</em>'.
146 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
147 * @generated
148 */
149 public T caseFunctionalElement(FunctionalElement object) {
150 return null;
151 }
152
153 /**
154 * Returns the result of interpreting the object as an instance of '<em>Functional Architecture Model</em>'.
155 * <!-- begin-user-doc -->
156 * This implementation returns null;
157 * returning a non-null result will terminate the switch.
158 * <!-- end-user-doc -->
159 * @param object the target of the switch.
160 * @return the result of interpreting the object as an instance of '<em>Functional Architecture Model</em>'.
161 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
162 * @generated
163 */
164 public T caseFunctionalArchitectureModel(FunctionalArchitectureModel object) {
165 return null;
166 }
167
168 /**
169 * Returns the result of interpreting the object as an instance of '<em>Function</em>'.
170 * <!-- begin-user-doc -->
171 * This implementation returns null;
172 * returning a non-null result will terminate the switch.
173 * <!-- end-user-doc -->
174 * @param object the target of the switch.
175 * @return the result of interpreting the object as an instance of '<em>Function</em>'.
176 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
177 * @generated
178 */
179 public T caseFunction(Function object) {
180 return null;
181 }
182
183 /**
184 * Returns the result of interpreting the object as an instance of '<em>FAM Terminator</em>'.
185 * <!-- begin-user-doc -->
186 * This implementation returns null;
187 * returning a non-null result will terminate the switch.
188 * <!-- end-user-doc -->
189 * @param object the target of the switch.
190 * @return the result of interpreting the object as an instance of '<em>FAM Terminator</em>'.
191 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
192 * @generated
193 */
194 public T caseFAMTerminator(FAMTerminator object) {
195 return null;
196 }
197
198 /**
199 * Returns the result of interpreting the object as an instance of '<em>Information Link</em>'.
200 * <!-- begin-user-doc -->
201 * This implementation returns null;
202 * returning a non-null result will terminate the switch.
203 * <!-- end-user-doc -->
204 * @param object the target of the switch.
205 * @return the result of interpreting the object as an instance of '<em>Information Link</em>'.
206 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
207 * @generated
208 */
209 public T caseInformationLink(InformationLink object) {
210 return null;
211 }
212
213 /**
214 * Returns the result of interpreting the object as an instance of '<em>Functional Interface</em>'.
215 * <!-- begin-user-doc -->
216 * This implementation returns null;
217 * returning a non-null result will terminate the switch.
218 * <!-- end-user-doc -->
219 * @param object the target of the switch.
220 * @return the result of interpreting the object as an instance of '<em>Functional Interface</em>'.
221 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
222 * @generated
223 */
224 public T caseFunctionalInterface(functionalarchitecture.FunctionalInterface object) {
225 return null;
226 }
227
228 /**
229 * Returns the result of interpreting the object as an instance of '<em>Functional Input</em>'.
230 * <!-- begin-user-doc -->
231 * This implementation returns null;
232 * returning a non-null result will terminate the switch.
233 * <!-- end-user-doc -->
234 * @param object the target of the switch.
235 * @return the result of interpreting the object as an instance of '<em>Functional Input</em>'.
236 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
237 * @generated
238 */
239 public T caseFunctionalInput(FunctionalInput object) {
240 return null;
241 }
242
243 /**
244 * Returns the result of interpreting the object as an instance of '<em>Functional Output</em>'.
245 * <!-- begin-user-doc -->
246 * This implementation returns null;
247 * returning a non-null result will terminate the switch.
248 * <!-- end-user-doc -->
249 * @param object the target of the switch.
250 * @return the result of interpreting the object as an instance of '<em>Functional Output</em>'.
251 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
252 * @generated
253 */
254 public T caseFunctionalOutput(FunctionalOutput object) {
255 return null;
256 }
257
258 /**
259 * Returns the result of interpreting the object as an instance of '<em>Functional Data</em>'.
260 * <!-- begin-user-doc -->
261 * This implementation returns null;
262 * returning a non-null result will terminate the switch.
263 * <!-- end-user-doc -->
264 * @param object the target of the switch.
265 * @return the result of interpreting the object as an instance of '<em>Functional Data</em>'.
266 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
267 * @generated
268 */
269 public T caseFunctionalData(FunctionalData object) {
270 return null;
271 }
272
273 /**
274 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
275 * <!-- begin-user-doc -->
276 * This implementation returns null;
277 * returning a non-null result will terminate the switch, but this is the last case anyway.
278 * <!-- end-user-doc -->
279 * @param object the target of the switch.
280 * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
281 * @see #doSwitch(org.eclipse.emf.ecore.EObject)
282 * @generated
283 */
284 @Override
285 public T defaultCase(EObject object) {
286 return null;
287 }
288
289} //FunctionalarchitectureSwitch