diff options
author | 2019-05-07 11:53:38 -0400 | |
---|---|---|
committer | 2019-05-07 11:53:38 -0400 | |
commit | 9b83e33c055660f6de218d1b672f67734675f1f6 (patch) | |
tree | 9bd56534fdeb2bad776780a856065739d0d525cd /Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit | |
parent | Trying to implement spacecraft case study (diff) | |
download | VIATRA-Generator-9b83e33c055660f6de218d1b672f67734675f1f6.tar.gz VIATRA-Generator-9b83e33c055660f6de218d1b672f67734675f1f6.tar.zst VIATRA-Generator-9b83e33c055660f6de218d1b672f67734675f1f6.zip |
Try to restructure satellite case study
Diffstat (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit')
32 files changed, 952 insertions, 234 deletions
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/.gitignore index 6f361334..4354da2c 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/.gitignore +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/.gitignore | |||
@@ -23,3 +23,5 @@ | |||
23 | /.SpacecraftOfKind.java._trace | 23 | /.SpacecraftOfKind.java._trace |
24 | /.NoPotentialLinkToGroundStation.java._trace | 24 | /.NoPotentialLinkToGroundStation.java._trace |
25 | /.SmallSat.java._trace | 25 | /.SmallSat.java._trace |
26 | /.CommunicationLinkOfElement.java._trace | ||
27 | /.MultipleCommunicationLinks.java._trace | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CommunicationLinkOfElement.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CommunicationLinkOfElement.java new file mode 100644 index 00000000..1327c6bf --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CommunicationLinkOfElement.java | |||
@@ -0,0 +1,705 @@ | |||
1 | /** | ||
2 | * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; | ||
5 | |||
6 | import java.util.Arrays; | ||
7 | import java.util.Collection; | ||
8 | import java.util.LinkedHashSet; | ||
9 | import java.util.List; | ||
10 | import java.util.Objects; | ||
11 | import java.util.Optional; | ||
12 | import java.util.Set; | ||
13 | import java.util.function.Consumer; | ||
14 | import java.util.stream.Collectors; | ||
15 | import java.util.stream.Stream; | ||
16 | import org.apache.log4j.Logger; | ||
17 | import org.eclipse.emf.ecore.EClass; | ||
18 | import org.eclipse.viatra.query.runtime.api.IPatternMatch; | ||
19 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification; | ||
20 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; | ||
21 | import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; | ||
22 | import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; | ||
23 | import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; | ||
24 | import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; | ||
25 | import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; | ||
26 | import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey; | ||
27 | import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; | ||
28 | import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; | ||
29 | import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; | ||
30 | import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation; | ||
31 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality; | ||
32 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; | ||
33 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; | ||
34 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; | ||
35 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; | ||
36 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; | ||
37 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; | ||
38 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; | ||
39 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; | ||
40 | import satellite.CommunicatingElement; | ||
41 | import satellite.DirectedCommunicationLink; | ||
42 | |||
43 | /** | ||
44 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. | ||
45 | * | ||
46 | * <p>Original source: | ||
47 | * <code><pre> | ||
48 | * {@literal @}QueryBasedFeature(feature = "communicationLink") | ||
49 | * pattern communicationLinkOfElement(Element : CommunicatingElement, Link : DirectedCommunicationLink) { | ||
50 | * CommunicatingElement.commSubsystem.communicationLink(Element, Link); | ||
51 | * } | ||
52 | * </pre></code> | ||
53 | * | ||
54 | * @see Matcher | ||
55 | * @see Match | ||
56 | * | ||
57 | */ | ||
58 | @SuppressWarnings("all") | ||
59 | public final class CommunicationLinkOfElement extends BaseGeneratedEMFQuerySpecification<CommunicationLinkOfElement.Matcher> { | ||
60 | /** | ||
61 | * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLinkOfElement pattern, | ||
62 | * to be used in conjunction with {@link Matcher}. | ||
63 | * | ||
64 | * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. | ||
65 | * Each instance is a (possibly partial) substitution of pattern parameters, | ||
66 | * usable to represent a match of the pattern in the result of a query, | ||
67 | * or to specify the bound (fixed) input parameters when issuing a query. | ||
68 | * | ||
69 | * @see Matcher | ||
70 | * | ||
71 | */ | ||
72 | public static abstract class Match extends BasePatternMatch { | ||
73 | private CommunicatingElement fElement; | ||
74 | |||
75 | private DirectedCommunicationLink fLink; | ||
76 | |||
77 | private static List<String> parameterNames = makeImmutableList("Element", "Link"); | ||
78 | |||
79 | private Match(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { | ||
80 | this.fElement = pElement; | ||
81 | this.fLink = pLink; | ||
82 | } | ||
83 | |||
84 | @Override | ||
85 | public Object get(final String parameterName) { | ||
86 | if ("Element".equals(parameterName)) return this.fElement; | ||
87 | if ("Link".equals(parameterName)) return this.fLink; | ||
88 | return null; | ||
89 | } | ||
90 | |||
91 | public CommunicatingElement getElement() { | ||
92 | return this.fElement; | ||
93 | } | ||
94 | |||
95 | public DirectedCommunicationLink getLink() { | ||
96 | return this.fLink; | ||
97 | } | ||
98 | |||
99 | @Override | ||
100 | public boolean set(final String parameterName, final Object newValue) { | ||
101 | if (!isMutable()) throw new java.lang.UnsupportedOperationException(); | ||
102 | if ("Element".equals(parameterName) ) { | ||
103 | this.fElement = (CommunicatingElement) newValue; | ||
104 | return true; | ||
105 | } | ||
106 | if ("Link".equals(parameterName) ) { | ||
107 | this.fLink = (DirectedCommunicationLink) newValue; | ||
108 | return true; | ||
109 | } | ||
110 | return false; | ||
111 | } | ||
112 | |||
113 | public void setElement(final CommunicatingElement pElement) { | ||
114 | if (!isMutable()) throw new java.lang.UnsupportedOperationException(); | ||
115 | this.fElement = pElement; | ||
116 | } | ||
117 | |||
118 | public void setLink(final DirectedCommunicationLink pLink) { | ||
119 | if (!isMutable()) throw new java.lang.UnsupportedOperationException(); | ||
120 | this.fLink = pLink; | ||
121 | } | ||
122 | |||
123 | @Override | ||
124 | public String patternName() { | ||
125 | return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLinkOfElement"; | ||
126 | } | ||
127 | |||
128 | @Override | ||
129 | public List<String> parameterNames() { | ||
130 | return CommunicationLinkOfElement.Match.parameterNames; | ||
131 | } | ||
132 | |||
133 | @Override | ||
134 | public Object[] toArray() { | ||
135 | return new Object[]{fElement, fLink}; | ||
136 | } | ||
137 | |||
138 | @Override | ||
139 | public CommunicationLinkOfElement.Match toImmutable() { | ||
140 | return isMutable() ? newMatch(fElement, fLink) : this; | ||
141 | } | ||
142 | |||
143 | @Override | ||
144 | public String prettyPrint() { | ||
145 | StringBuilder result = new StringBuilder(); | ||
146 | result.append("\"Element\"=" + prettyPrintValue(fElement) + ", "); | ||
147 | result.append("\"Link\"=" + prettyPrintValue(fLink)); | ||
148 | return result.toString(); | ||
149 | } | ||
150 | |||
151 | @Override | ||
152 | public int hashCode() { | ||
153 | return Objects.hash(fElement, fLink); | ||
154 | } | ||
155 | |||
156 | @Override | ||
157 | public boolean equals(final Object obj) { | ||
158 | if (this == obj) | ||
159 | return true; | ||
160 | if (obj == null) { | ||
161 | return false; | ||
162 | } | ||
163 | if ((obj instanceof CommunicationLinkOfElement.Match)) { | ||
164 | CommunicationLinkOfElement.Match other = (CommunicationLinkOfElement.Match) obj; | ||
165 | return Objects.equals(fElement, other.fElement) && Objects.equals(fLink, other.fLink); | ||
166 | } else { | ||
167 | // this should be infrequent | ||
168 | if (!(obj instanceof IPatternMatch)) { | ||
169 | return false; | ||
170 | } | ||
171 | IPatternMatch otherSig = (IPatternMatch) obj; | ||
172 | return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); | ||
173 | } | ||
174 | } | ||
175 | |||
176 | @Override | ||
177 | public CommunicationLinkOfElement specification() { | ||
178 | return CommunicationLinkOfElement.instance(); | ||
179 | } | ||
180 | |||
181 | /** | ||
182 | * Returns an empty, mutable match. | ||
183 | * Fields of the mutable match can be filled to create a partial match, usable as matcher input. | ||
184 | * | ||
185 | * @return the empty match. | ||
186 | * | ||
187 | */ | ||
188 | public static CommunicationLinkOfElement.Match newEmptyMatch() { | ||
189 | return new Mutable(null, null); | ||
190 | } | ||
191 | |||
192 | /** | ||
193 | * Returns a mutable (partial) match. | ||
194 | * Fields of the mutable match can be filled to create a partial match, usable as matcher input. | ||
195 | * | ||
196 | * @param pElement the fixed value of pattern parameter Element, or null if not bound. | ||
197 | * @param pLink the fixed value of pattern parameter Link, or null if not bound. | ||
198 | * @return the new, mutable (partial) match object. | ||
199 | * | ||
200 | */ | ||
201 | public static CommunicationLinkOfElement.Match newMutableMatch(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { | ||
202 | return new Mutable(pElement, pLink); | ||
203 | } | ||
204 | |||
205 | /** | ||
206 | * Returns a new (partial) match. | ||
207 | * This can be used e.g. to call the matcher with a partial match. | ||
208 | * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. | ||
209 | * @param pElement the fixed value of pattern parameter Element, or null if not bound. | ||
210 | * @param pLink the fixed value of pattern parameter Link, or null if not bound. | ||
211 | * @return the (partial) match object. | ||
212 | * | ||
213 | */ | ||
214 | public static CommunicationLinkOfElement.Match newMatch(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { | ||
215 | return new Immutable(pElement, pLink); | ||
216 | } | ||
217 | |||
218 | private static final class Mutable extends CommunicationLinkOfElement.Match { | ||
219 | Mutable(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { | ||
220 | super(pElement, pLink); | ||
221 | } | ||
222 | |||
223 | @Override | ||
224 | public boolean isMutable() { | ||
225 | return true; | ||
226 | } | ||
227 | } | ||
228 | |||
229 | private static final class Immutable extends CommunicationLinkOfElement.Match { | ||
230 | Immutable(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { | ||
231 | super(pElement, pLink); | ||
232 | } | ||
233 | |||
234 | @Override | ||
235 | public boolean isMutable() { | ||
236 | return false; | ||
237 | } | ||
238 | } | ||
239 | } | ||
240 | |||
241 | /** | ||
242 | * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLinkOfElement pattern, | ||
243 | * providing pattern-specific query methods. | ||
244 | * | ||
245 | * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, | ||
246 | * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}. | ||
247 | * | ||
248 | * <p>Matches of the pattern will be represented as {@link Match}. | ||
249 | * | ||
250 | * <p>Original source: | ||
251 | * <code><pre> | ||
252 | * {@literal @}QueryBasedFeature(feature = "communicationLink") | ||
253 | * pattern communicationLinkOfElement(Element : CommunicatingElement, Link : DirectedCommunicationLink) { | ||
254 | * CommunicatingElement.commSubsystem.communicationLink(Element, Link); | ||
255 | * } | ||
256 | * </pre></code> | ||
257 | * | ||
258 | * @see Match | ||
259 | * @see CommunicationLinkOfElement | ||
260 | * | ||
261 | */ | ||
262 | public static class Matcher extends BaseMatcher<CommunicationLinkOfElement.Match> { | ||
263 | /** | ||
264 | * Initializes the pattern matcher within an existing VIATRA Query engine. | ||
265 | * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. | ||
266 | * | ||
267 | * @param engine the existing VIATRA Query engine in which this matcher will be created. | ||
268 | * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation | ||
269 | * | ||
270 | */ | ||
271 | public static CommunicationLinkOfElement.Matcher on(final ViatraQueryEngine engine) { | ||
272 | // check if matcher already exists | ||
273 | Matcher matcher = engine.getExistingMatcher(querySpecification()); | ||
274 | if (matcher == null) { | ||
275 | matcher = (Matcher)engine.getMatcher(querySpecification()); | ||
276 | } | ||
277 | return matcher; | ||
278 | } | ||
279 | |||
280 | /** | ||
281 | * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation | ||
282 | * @return an initialized matcher | ||
283 | * @noreference This method is for internal matcher initialization by the framework, do not call it manually. | ||
284 | * | ||
285 | */ | ||
286 | public static CommunicationLinkOfElement.Matcher create() { | ||
287 | return new Matcher(); | ||
288 | } | ||
289 | |||
290 | private static final int POSITION_ELEMENT = 0; | ||
291 | |||
292 | private static final int POSITION_LINK = 1; | ||
293 | |||
294 | private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(CommunicationLinkOfElement.Matcher.class); | ||
295 | |||
296 | /** | ||
297 | * Initializes the pattern matcher within an existing VIATRA Query engine. | ||
298 | * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. | ||
299 | * | ||
300 | * @param engine the existing VIATRA Query engine in which this matcher will be created. | ||
301 | * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation | ||
302 | * | ||
303 | */ | ||
304 | private Matcher() { | ||
305 | super(querySpecification()); | ||
306 | } | ||
307 | |||
308 | /** | ||
309 | * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. | ||
310 | * @param pElement the fixed value of pattern parameter Element, or null if not bound. | ||
311 | * @param pLink the fixed value of pattern parameter Link, or null if not bound. | ||
312 | * @return matches represented as a Match object. | ||
313 | * | ||
314 | */ | ||
315 | public Collection<CommunicationLinkOfElement.Match> getAllMatches(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { | ||
316 | return rawStreamAllMatches(new Object[]{pElement, pLink}).collect(Collectors.toSet()); | ||
317 | } | ||
318 | |||
319 | /** | ||
320 | * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. | ||
321 | * </p> | ||
322 | * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed. | ||
323 | * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>. | ||
324 | * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. | ||
325 | * @param pElement the fixed value of pattern parameter Element, or null if not bound. | ||
326 | * @param pLink the fixed value of pattern parameter Link, or null if not bound. | ||
327 | * @return a stream of matches represented as a Match object. | ||
328 | * | ||
329 | */ | ||
330 | public Stream<CommunicationLinkOfElement.Match> streamAllMatches(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { | ||
331 | return rawStreamAllMatches(new Object[]{pElement, pLink}); | ||
332 | } | ||
333 | |||
334 | /** | ||
335 | * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. | ||
336 | * Neither determinism nor randomness of selection is guaranteed. | ||
337 | * @param pElement the fixed value of pattern parameter Element, or null if not bound. | ||
338 | * @param pLink the fixed value of pattern parameter Link, or null if not bound. | ||
339 | * @return a match represented as a Match object, or null if no match is found. | ||
340 | * | ||
341 | */ | ||
342 | public Optional<CommunicationLinkOfElement.Match> getOneArbitraryMatch(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { | ||
343 | return rawGetOneArbitraryMatch(new Object[]{pElement, pLink}); | ||
344 | } | ||
345 | |||
346 | /** | ||
347 | * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, | ||
348 | * under any possible substitution of the unspecified parameters (if any). | ||
349 | * @param pElement the fixed value of pattern parameter Element, or null if not bound. | ||
350 | * @param pLink the fixed value of pattern parameter Link, or null if not bound. | ||
351 | * @return true if the input is a valid (partial) match of the pattern. | ||
352 | * | ||
353 | */ | ||
354 | public boolean hasMatch(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { | ||
355 | return rawHasMatch(new Object[]{pElement, pLink}); | ||
356 | } | ||
357 | |||
358 | /** | ||
359 | * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. | ||
360 | * @param pElement the fixed value of pattern parameter Element, or null if not bound. | ||
361 | * @param pLink the fixed value of pattern parameter Link, or null if not bound. | ||
362 | * @return the number of pattern matches found. | ||
363 | * | ||
364 | */ | ||
365 | public int countMatches(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { | ||
366 | return rawCountMatches(new Object[]{pElement, pLink}); | ||
367 | } | ||
368 | |||
369 | /** | ||
370 | * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. | ||
371 | * Neither determinism nor randomness of selection is guaranteed. | ||
372 | * @param pElement the fixed value of pattern parameter Element, or null if not bound. | ||
373 | * @param pLink the fixed value of pattern parameter Link, or null if not bound. | ||
374 | * @param processor the action that will process the selected match. | ||
375 | * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked | ||
376 | * | ||
377 | */ | ||
378 | public boolean forOneArbitraryMatch(final CommunicatingElement pElement, final DirectedCommunicationLink pLink, final Consumer<? super CommunicationLinkOfElement.Match> processor) { | ||
379 | return rawForOneArbitraryMatch(new Object[]{pElement, pLink}, processor); | ||
380 | } | ||
381 | |||
382 | /** | ||
383 | * Returns a new (partial) match. | ||
384 | * This can be used e.g. to call the matcher with a partial match. | ||
385 | * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. | ||
386 | * @param pElement the fixed value of pattern parameter Element, or null if not bound. | ||
387 | * @param pLink the fixed value of pattern parameter Link, or null if not bound. | ||
388 | * @return the (partial) match object. | ||
389 | * | ||
390 | */ | ||
391 | public CommunicationLinkOfElement.Match newMatch(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { | ||
392 | return CommunicationLinkOfElement.Match.newMatch(pElement, pLink); | ||
393 | } | ||
394 | |||
395 | /** | ||
396 | * Retrieve the set of values that occur in matches for Element. | ||
397 | * @return the Set of all values or empty set if there are no matches | ||
398 | * | ||
399 | */ | ||
400 | protected Stream<CommunicatingElement> rawStreamAllValuesOfElement(final Object[] parameters) { | ||
401 | return rawStreamAllValues(POSITION_ELEMENT, parameters).map(CommunicatingElement.class::cast); | ||
402 | } | ||
403 | |||
404 | /** | ||
405 | * Retrieve the set of values that occur in matches for Element. | ||
406 | * @return the Set of all values or empty set if there are no matches | ||
407 | * | ||
408 | */ | ||
409 | public Set<CommunicatingElement> getAllValuesOfElement() { | ||
410 | return rawStreamAllValuesOfElement(emptyArray()).collect(Collectors.toSet()); | ||
411 | } | ||
412 | |||
413 | /** | ||
414 | * Retrieve the set of values that occur in matches for Element. | ||
415 | * @return the Set of all values or empty set if there are no matches | ||
416 | * | ||
417 | */ | ||
418 | public Stream<CommunicatingElement> streamAllValuesOfElement() { | ||
419 | return rawStreamAllValuesOfElement(emptyArray()); | ||
420 | } | ||
421 | |||
422 | /** | ||
423 | * Retrieve the set of values that occur in matches for Element. | ||
424 | * </p> | ||
425 | * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed. | ||
426 | * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>. | ||
427 | * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. | ||
428 | * | ||
429 | * @return the Stream of all values or empty set if there are no matches | ||
430 | * | ||
431 | */ | ||
432 | public Stream<CommunicatingElement> streamAllValuesOfElement(final CommunicationLinkOfElement.Match partialMatch) { | ||
433 | return rawStreamAllValuesOfElement(partialMatch.toArray()); | ||
434 | } | ||
435 | |||
436 | /** | ||
437 | * Retrieve the set of values that occur in matches for Element. | ||
438 | * </p> | ||
439 | * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed. | ||
440 | * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>. | ||
441 | * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. | ||
442 | * | ||
443 | * @return the Stream of all values or empty set if there are no matches | ||
444 | * | ||
445 | */ | ||
446 | public Stream<CommunicatingElement> streamAllValuesOfElement(final DirectedCommunicationLink pLink) { | ||
447 | return rawStreamAllValuesOfElement(new Object[]{null, pLink}); | ||
448 | } | ||
449 | |||
450 | /** | ||
451 | * Retrieve the set of values that occur in matches for Element. | ||
452 | * @return the Set of all values or empty set if there are no matches | ||
453 | * | ||
454 | */ | ||
455 | public Set<CommunicatingElement> getAllValuesOfElement(final CommunicationLinkOfElement.Match partialMatch) { | ||
456 | return rawStreamAllValuesOfElement(partialMatch.toArray()).collect(Collectors.toSet()); | ||
457 | } | ||
458 | |||
459 | /** | ||
460 | * Retrieve the set of values that occur in matches for Element. | ||
461 | * @return the Set of all values or empty set if there are no matches | ||
462 | * | ||
463 | */ | ||
464 | public Set<CommunicatingElement> getAllValuesOfElement(final DirectedCommunicationLink pLink) { | ||
465 | return rawStreamAllValuesOfElement(new Object[]{null, pLink}).collect(Collectors.toSet()); | ||
466 | } | ||
467 | |||
468 | /** | ||
469 | * Retrieve the set of values that occur in matches for Link. | ||
470 | * @return the Set of all values or empty set if there are no matches | ||
471 | * | ||
472 | */ | ||
473 | protected Stream<DirectedCommunicationLink> rawStreamAllValuesOfLink(final Object[] parameters) { | ||
474 | return rawStreamAllValues(POSITION_LINK, parameters).map(DirectedCommunicationLink.class::cast); | ||
475 | } | ||
476 | |||
477 | /** | ||
478 | * Retrieve the set of values that occur in matches for Link. | ||
479 | * @return the Set of all values or empty set if there are no matches | ||
480 | * | ||
481 | */ | ||
482 | public Set<DirectedCommunicationLink> getAllValuesOfLink() { | ||
483 | return rawStreamAllValuesOfLink(emptyArray()).collect(Collectors.toSet()); | ||
484 | } | ||
485 | |||
486 | /** | ||
487 | * Retrieve the set of values that occur in matches for Link. | ||
488 | * @return the Set of all values or empty set if there are no matches | ||
489 | * | ||
490 | */ | ||
491 | public Stream<DirectedCommunicationLink> streamAllValuesOfLink() { | ||
492 | return rawStreamAllValuesOfLink(emptyArray()); | ||
493 | } | ||
494 | |||
495 | /** | ||
496 | * Retrieve the set of values that occur in matches for Link. | ||
497 | * </p> | ||
498 | * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed. | ||
499 | * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>. | ||
500 | * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. | ||
501 | * | ||
502 | * @return the Stream of all values or empty set if there are no matches | ||
503 | * | ||
504 | */ | ||
505 | public Stream<DirectedCommunicationLink> streamAllValuesOfLink(final CommunicationLinkOfElement.Match partialMatch) { | ||
506 | return rawStreamAllValuesOfLink(partialMatch.toArray()); | ||
507 | } | ||
508 | |||
509 | /** | ||
510 | * Retrieve the set of values that occur in matches for Link. | ||
511 | * </p> | ||
512 | * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed. | ||
513 | * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>. | ||
514 | * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. | ||
515 | * | ||
516 | * @return the Stream of all values or empty set if there are no matches | ||
517 | * | ||
518 | */ | ||
519 | public Stream<DirectedCommunicationLink> streamAllValuesOfLink(final CommunicatingElement pElement) { | ||
520 | return rawStreamAllValuesOfLink(new Object[]{pElement, null}); | ||
521 | } | ||
522 | |||
523 | /** | ||
524 | * Retrieve the set of values that occur in matches for Link. | ||
525 | * @return the Set of all values or empty set if there are no matches | ||
526 | * | ||
527 | */ | ||
528 | public Set<DirectedCommunicationLink> getAllValuesOfLink(final CommunicationLinkOfElement.Match partialMatch) { | ||
529 | return rawStreamAllValuesOfLink(partialMatch.toArray()).collect(Collectors.toSet()); | ||
530 | } | ||
531 | |||
532 | /** | ||
533 | * Retrieve the set of values that occur in matches for Link. | ||
534 | * @return the Set of all values or empty set if there are no matches | ||
535 | * | ||
536 | */ | ||
537 | public Set<DirectedCommunicationLink> getAllValuesOfLink(final CommunicatingElement pElement) { | ||
538 | return rawStreamAllValuesOfLink(new Object[]{pElement, null}).collect(Collectors.toSet()); | ||
539 | } | ||
540 | |||
541 | @Override | ||
542 | protected CommunicationLinkOfElement.Match tupleToMatch(final Tuple t) { | ||
543 | try { | ||
544 | return CommunicationLinkOfElement.Match.newMatch((CommunicatingElement) t.get(POSITION_ELEMENT), (DirectedCommunicationLink) t.get(POSITION_LINK)); | ||
545 | } catch(ClassCastException e) { | ||
546 | LOGGER.error("Element(s) in tuple not properly typed!",e); | ||
547 | return null; | ||
548 | } | ||
549 | } | ||
550 | |||
551 | @Override | ||
552 | protected CommunicationLinkOfElement.Match arrayToMatch(final Object[] match) { | ||
553 | try { | ||
554 | return CommunicationLinkOfElement.Match.newMatch((CommunicatingElement) match[POSITION_ELEMENT], (DirectedCommunicationLink) match[POSITION_LINK]); | ||
555 | } catch(ClassCastException e) { | ||
556 | LOGGER.error("Element(s) in array not properly typed!",e); | ||
557 | return null; | ||
558 | } | ||
559 | } | ||
560 | |||
561 | @Override | ||
562 | protected CommunicationLinkOfElement.Match arrayToMatchMutable(final Object[] match) { | ||
563 | try { | ||
564 | return CommunicationLinkOfElement.Match.newMutableMatch((CommunicatingElement) match[POSITION_ELEMENT], (DirectedCommunicationLink) match[POSITION_LINK]); | ||
565 | } catch(ClassCastException e) { | ||
566 | LOGGER.error("Element(s) in array not properly typed!",e); | ||
567 | return null; | ||
568 | } | ||
569 | } | ||
570 | |||
571 | /** | ||
572 | * @return the singleton instance of the query specification of this pattern | ||
573 | * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded | ||
574 | * | ||
575 | */ | ||
576 | public static IQuerySpecification<CommunicationLinkOfElement.Matcher> querySpecification() { | ||
577 | return CommunicationLinkOfElement.instance(); | ||
578 | } | ||
579 | } | ||
580 | |||
581 | private CommunicationLinkOfElement() { | ||
582 | super(GeneratedPQuery.INSTANCE); | ||
583 | } | ||
584 | |||
585 | /** | ||
586 | * @return the singleton instance of the query specification | ||
587 | * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded | ||
588 | * | ||
589 | */ | ||
590 | public static CommunicationLinkOfElement instance() { | ||
591 | try{ | ||
592 | return LazyHolder.INSTANCE; | ||
593 | } catch (ExceptionInInitializerError err) { | ||
594 | throw processInitializerError(err); | ||
595 | } | ||
596 | } | ||
597 | |||
598 | @Override | ||
599 | protected CommunicationLinkOfElement.Matcher instantiate(final ViatraQueryEngine engine) { | ||
600 | return CommunicationLinkOfElement.Matcher.on(engine); | ||
601 | } | ||
602 | |||
603 | @Override | ||
604 | public CommunicationLinkOfElement.Matcher instantiate() { | ||
605 | return CommunicationLinkOfElement.Matcher.create(); | ||
606 | } | ||
607 | |||
608 | @Override | ||
609 | public CommunicationLinkOfElement.Match newEmptyMatch() { | ||
610 | return CommunicationLinkOfElement.Match.newEmptyMatch(); | ||
611 | } | ||
612 | |||
613 | @Override | ||
614 | public CommunicationLinkOfElement.Match newMatch(final Object... parameters) { | ||
615 | return CommunicationLinkOfElement.Match.newMatch((satellite.CommunicatingElement) parameters[0], (satellite.DirectedCommunicationLink) parameters[1]); | ||
616 | } | ||
617 | |||
618 | /** | ||
619 | * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkOfElement (visibility: PUBLIC, simpleName: CommunicationLinkOfElement, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkOfElement, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created | ||
620 | * <b>not</b> at the class load time of the outer class, | ||
621 | * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkOfElement (visibility: PUBLIC, simpleName: CommunicationLinkOfElement, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkOfElement, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. | ||
622 | * | ||
623 | * <p> This workaround is required e.g. to support recursion. | ||
624 | * | ||
625 | */ | ||
626 | private static class LazyHolder { | ||
627 | private static final CommunicationLinkOfElement INSTANCE = new CommunicationLinkOfElement(); | ||
628 | |||
629 | /** | ||
630 | * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned. | ||
631 | * This initialization order is required to support indirect recursion. | ||
632 | * | ||
633 | * <p> The static initializer is defined using a helper field to work around limitations of the code generator. | ||
634 | * | ||
635 | */ | ||
636 | private static final Object STATIC_INITIALIZER = ensureInitialized(); | ||
637 | |||
638 | public static Object ensureInitialized() { | ||
639 | INSTANCE.ensureInitializedInternal(); | ||
640 | return null; | ||
641 | } | ||
642 | } | ||
643 | |||
644 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | ||
645 | private static final CommunicationLinkOfElement.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | ||
646 | |||
647 | private final PParameter parameter_Element = new PParameter("Element", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); | ||
648 | |||
649 | private final PParameter parameter_Link = new PParameter("Link", "satellite.DirectedCommunicationLink", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "DirectedCommunicationLink")), PParameterDirection.INOUT); | ||
650 | |||
651 | private final List<PParameter> parameters = Arrays.asList(parameter_Element, parameter_Link); | ||
652 | |||
653 | private GeneratedPQuery() { | ||
654 | super(PVisibility.PUBLIC); | ||
655 | } | ||
656 | |||
657 | @Override | ||
658 | public String getFullyQualifiedName() { | ||
659 | return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLinkOfElement"; | ||
660 | } | ||
661 | |||
662 | @Override | ||
663 | public List<String> getParameterNames() { | ||
664 | return Arrays.asList("Element","Link"); | ||
665 | } | ||
666 | |||
667 | @Override | ||
668 | public List<PParameter> getParameters() { | ||
669 | return parameters; | ||
670 | } | ||
671 | |||
672 | @Override | ||
673 | public Set<PBody> doGetContainedBodies() { | ||
674 | setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); | ||
675 | Set<PBody> bodies = new LinkedHashSet<>(); | ||
676 | { | ||
677 | PBody body = new PBody(this); | ||
678 | PVariable var_Element = body.getOrCreateVariableByName("Element"); | ||
679 | PVariable var_Link = body.getOrCreateVariableByName("Link"); | ||
680 | new TypeConstraint(body, Tuples.flatTupleOf(var_Element), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); | ||
681 | new TypeConstraint(body, Tuples.flatTupleOf(var_Link), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "DirectedCommunicationLink"))); | ||
682 | body.setSymbolicParameters(Arrays.<ExportedParameter>asList( | ||
683 | new ExportedParameter(body, var_Element, parameter_Element), | ||
684 | new ExportedParameter(body, var_Link, parameter_Link) | ||
685 | )); | ||
686 | // CommunicatingElement.commSubsystem.communicationLink(Element, Link) | ||
687 | new TypeConstraint(body, Tuples.flatTupleOf(var_Element), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); | ||
688 | PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); | ||
689 | new TypeConstraint(body, Tuples.flatTupleOf(var_Element, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "commSubsystem"))); | ||
690 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem"))); | ||
691 | PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); | ||
692 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommSubsystem", "communicationLink"))); | ||
693 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "DirectedCommunicationLink"))); | ||
694 | new Equality(body, var__virtual_1_, var_Link); | ||
695 | bodies.add(body); | ||
696 | } | ||
697 | { | ||
698 | PAnnotation annotation = new PAnnotation("QueryBasedFeature"); | ||
699 | annotation.addAttribute("feature", "communicationLink"); | ||
700 | addAnnotation(annotation); | ||
701 | } | ||
702 | return bodies; | ||
703 | } | ||
704 | } | ||
705 | } | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CommunicationLoop.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CommunicationLoop.java index f5835baf..ede57df8 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CommunicationLoop.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CommunicationLoop.java | |||
@@ -3,7 +3,6 @@ | |||
3 | */ | 3 | */ |
4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; | 4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; |
5 | 5 | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement; | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IndirectCommunicationLink; | 6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IndirectCommunicationLink; |
8 | import java.util.Arrays; | 7 | import java.util.Arrays; |
9 | import java.util.Collection; | 8 | import java.util.Collection; |
@@ -39,6 +38,7 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; | |||
39 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; | 38 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; |
40 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; | 39 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; |
41 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; | 40 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; |
41 | import satellite.CommunicatingElement; | ||
42 | 42 | ||
43 | /** | 43 | /** |
44 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. | 44 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. |
@@ -472,7 +472,7 @@ public final class CommunicationLoop extends BaseGeneratedEMFQuerySpecification< | |||
472 | 472 | ||
473 | @Override | 473 | @Override |
474 | public CommunicationLoop.Match newMatch(final Object... parameters) { | 474 | public CommunicationLoop.Match newMatch(final Object... parameters) { |
475 | return CommunicationLoop.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement) parameters[0]); | 475 | return CommunicationLoop.Match.newMatch((satellite.CommunicatingElement) parameters[0]); |
476 | } | 476 | } |
477 | 477 | ||
478 | /** | 478 | /** |
@@ -504,7 +504,7 @@ public final class CommunicationLoop extends BaseGeneratedEMFQuerySpecification< | |||
504 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 504 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
505 | private static final CommunicationLoop.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 505 | private static final CommunicationLoop.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
506 | 506 | ||
507 | private final PParameter parameter_Element = new PParameter("Element", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); | 507 | private final PParameter parameter_Element = new PParameter("Element", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); |
508 | 508 | ||
509 | private final List<PParameter> parameters = Arrays.asList(parameter_Element); | 509 | private final List<PParameter> parameters = Arrays.asList(parameter_Element); |
510 | 510 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CubeSatWithKaAntenna.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CubeSatWithKaAntenna.java index ba69943a..b73cb23f 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CubeSatWithKaAntenna.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CubeSatWithKaAntenna.java | |||
@@ -3,7 +3,6 @@ | |||
3 | */ | 3 | */ |
4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; | 4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; |
5 | 5 | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft; | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SmallSat; | 6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SmallSat; |
8 | import java.util.Arrays; | 7 | import java.util.Arrays; |
9 | import java.util.Collection; | 8 | import java.util.Collection; |
@@ -44,6 +43,7 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; | |||
44 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; | 43 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; |
45 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; | 44 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; |
46 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; | 45 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; |
46 | import satellite.Spacecraft; | ||
47 | 47 | ||
48 | /** | 48 | /** |
49 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. | 49 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. |
@@ -477,7 +477,7 @@ public final class CubeSatWithKaAntenna extends BaseGeneratedEMFQuerySpecificati | |||
477 | 477 | ||
478 | @Override | 478 | @Override |
479 | public CubeSatWithKaAntenna.Match newMatch(final Object... parameters) { | 479 | public CubeSatWithKaAntenna.Match newMatch(final Object... parameters) { |
480 | return CubeSatWithKaAntenna.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft) parameters[0]); | 480 | return CubeSatWithKaAntenna.Match.newMatch((satellite.Spacecraft) parameters[0]); |
481 | } | 481 | } |
482 | 482 | ||
483 | /** | 483 | /** |
@@ -509,7 +509,7 @@ public final class CubeSatWithKaAntenna extends BaseGeneratedEMFQuerySpecificati | |||
509 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 509 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
510 | private static final CubeSatWithKaAntenna.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 510 | private static final CubeSatWithKaAntenna.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
511 | 511 | ||
512 | private final PParameter parameter_Spacecraft = new PParameter("Spacecraft", "hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); | 512 | private final PParameter parameter_Spacecraft = new PParameter("Spacecraft", "satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); |
513 | 513 | ||
514 | private final List<PParameter> parameters = Arrays.asList(parameter_Spacecraft); | 514 | private final List<PParameter> parameters = Arrays.asList(parameter_Spacecraft); |
515 | 515 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/IncompatibleSourceAndTargetBand.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/IncompatibleSourceAndTargetBand.java index 4cacc34b..f2713f45 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/IncompatibleSourceAndTargetBand.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/IncompatibleSourceAndTargetBand.java | |||
@@ -3,7 +3,6 @@ | |||
3 | */ | 3 | */ |
4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; | 4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; |
5 | 5 | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.DirectedCommunicationLink; | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemBand; | 6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemBand; |
8 | import java.util.Arrays; | 7 | import java.util.Arrays; |
9 | import java.util.Collection; | 8 | import java.util.Collection; |
@@ -43,6 +42,7 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; | |||
43 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; | 42 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; |
44 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; | 43 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; |
45 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; | 44 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; |
45 | import satellite.DirectedCommunicationLink; | ||
46 | 46 | ||
47 | /** | 47 | /** |
48 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. | 48 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. |
@@ -480,7 +480,7 @@ public final class IncompatibleSourceAndTargetBand extends BaseGeneratedEMFQuery | |||
480 | 480 | ||
481 | @Override | 481 | @Override |
482 | public IncompatibleSourceAndTargetBand.Match newMatch(final Object... parameters) { | 482 | public IncompatibleSourceAndTargetBand.Match newMatch(final Object... parameters) { |
483 | return IncompatibleSourceAndTargetBand.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.DirectedCommunicationLink) parameters[0]); | 483 | return IncompatibleSourceAndTargetBand.Match.newMatch((satellite.DirectedCommunicationLink) parameters[0]); |
484 | } | 484 | } |
485 | 485 | ||
486 | /** | 486 | /** |
@@ -512,7 +512,7 @@ public final class IncompatibleSourceAndTargetBand extends BaseGeneratedEMFQuery | |||
512 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 512 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
513 | private static final IncompatibleSourceAndTargetBand.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 513 | private static final IncompatibleSourceAndTargetBand.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
514 | 514 | ||
515 | private final PParameter parameter_Link = new PParameter("Link", "hu.bme.mit.inf.dslreasoner.domains.satellite.DirectedCommunicationLink", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "DirectedCommunicationLink")), PParameterDirection.INOUT); | 515 | private final PParameter parameter_Link = new PParameter("Link", "satellite.DirectedCommunicationLink", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "DirectedCommunicationLink")), PParameterDirection.INOUT); |
516 | 516 | ||
517 | private final List<PParameter> parameters = Arrays.asList(parameter_Link); | 517 | private final List<PParameter> parameters = Arrays.asList(parameter_Link); |
518 | 518 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/IncompatibleSourceAndTargetGain.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/IncompatibleSourceAndTargetGain.java index 3f247613..33a4b067 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/IncompatibleSourceAndTargetGain.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/IncompatibleSourceAndTargetGain.java | |||
@@ -3,7 +3,6 @@ | |||
3 | */ | 3 | */ |
4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; | 4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; |
5 | 5 | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.DirectedCommunicationLink; | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemGain; | 6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemGain; |
8 | import java.util.Arrays; | 7 | import java.util.Arrays; |
9 | import java.util.Collection; | 8 | import java.util.Collection; |
@@ -43,6 +42,7 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; | |||
43 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; | 42 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; |
44 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; | 43 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; |
45 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; | 44 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; |
45 | import satellite.DirectedCommunicationLink; | ||
46 | 46 | ||
47 | /** | 47 | /** |
48 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. | 48 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. |
@@ -476,7 +476,7 @@ public final class IncompatibleSourceAndTargetGain extends BaseGeneratedEMFQuery | |||
476 | 476 | ||
477 | @Override | 477 | @Override |
478 | public IncompatibleSourceAndTargetGain.Match newMatch(final Object... parameters) { | 478 | public IncompatibleSourceAndTargetGain.Match newMatch(final Object... parameters) { |
479 | return IncompatibleSourceAndTargetGain.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.DirectedCommunicationLink) parameters[0]); | 479 | return IncompatibleSourceAndTargetGain.Match.newMatch((satellite.DirectedCommunicationLink) parameters[0]); |
480 | } | 480 | } |
481 | 481 | ||
482 | /** | 482 | /** |
@@ -508,7 +508,7 @@ public final class IncompatibleSourceAndTargetGain extends BaseGeneratedEMFQuery | |||
508 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 508 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
509 | private static final IncompatibleSourceAndTargetGain.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 509 | private static final IncompatibleSourceAndTargetGain.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
510 | 510 | ||
511 | private final PParameter parameter_Link = new PParameter("Link", "hu.bme.mit.inf.dslreasoner.domains.satellite.DirectedCommunicationLink", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "DirectedCommunicationLink")), PParameterDirection.INOUT); | 511 | private final PParameter parameter_Link = new PParameter("Link", "satellite.DirectedCommunicationLink", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "DirectedCommunicationLink")), PParameterDirection.INOUT); |
512 | 512 | ||
513 | private final List<PParameter> parameters = Arrays.asList(parameter_Link); | 513 | private final List<PParameter> parameters = Arrays.asList(parameter_Link); |
514 | 514 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/KaAntennaGainLow.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/KaAntennaGainLow.java index 18f6c32f..37c35bfe 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/KaAntennaGainLow.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/KaAntennaGainLow.java | |||
@@ -3,7 +3,6 @@ | |||
3 | */ | 3 | */ |
4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; | 4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; |
5 | 5 | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem; | ||
7 | import java.util.Arrays; | 6 | import java.util.Arrays; |
8 | import java.util.Collection; | 7 | import java.util.Collection; |
9 | import java.util.LinkedHashSet; | 8 | import java.util.LinkedHashSet; |
@@ -42,6 +41,7 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; | |||
42 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; | 41 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; |
43 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; | 42 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; |
44 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; | 43 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; |
44 | import satellite.CommSubsystem; | ||
45 | 45 | ||
46 | /** | 46 | /** |
47 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. | 47 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. |
@@ -475,7 +475,7 @@ public final class KaAntennaGainLow extends BaseGeneratedEMFQuerySpecification<K | |||
475 | 475 | ||
476 | @Override | 476 | @Override |
477 | public KaAntennaGainLow.Match newMatch(final Object... parameters) { | 477 | public KaAntennaGainLow.Match newMatch(final Object... parameters) { |
478 | return KaAntennaGainLow.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem) parameters[0]); | 478 | return KaAntennaGainLow.Match.newMatch((satellite.CommSubsystem) parameters[0]); |
479 | } | 479 | } |
480 | 480 | ||
481 | /** | 481 | /** |
@@ -507,7 +507,7 @@ public final class KaAntennaGainLow extends BaseGeneratedEMFQuerySpecification<K | |||
507 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 507 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
508 | private static final KaAntennaGainLow.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 508 | private static final KaAntennaGainLow.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
509 | 509 | ||
510 | private final PParameter parameter_Comm = new PParameter("Comm", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); | 510 | private final PParameter parameter_Comm = new PParameter("Comm", "satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); |
511 | 511 | ||
512 | private final List<PParameter> parameters = Arrays.asList(parameter_Comm); | 512 | private final List<PParameter> parameters = Arrays.asList(parameter_Comm); |
513 | 513 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CommunicationLinkDoesNotStartAtContainingElement.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/MultipleCommunicationLinks.java index dde3c20f..ad82ead9 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CommunicationLinkDoesNotStartAtContainingElement.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/MultipleCommunicationLinks.java | |||
@@ -3,7 +3,6 @@ | |||
3 | */ | 3 | */ |
4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; | 4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; |
5 | 5 | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.DirectedCommunicationLink; | ||
7 | import java.util.Arrays; | 6 | import java.util.Arrays; |
8 | import java.util.Collection; | 7 | import java.util.Collection; |
9 | import java.util.LinkedHashSet; | 8 | import java.util.LinkedHashSet; |
@@ -40,19 +39,19 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; | |||
40 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; | 39 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; |
41 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; | 40 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; |
42 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; | 41 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; |
42 | import satellite.CommunicatingElement; | ||
43 | 43 | ||
44 | /** | 44 | /** |
45 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. | 45 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. |
46 | * | 46 | * |
47 | * <p>Original source: | 47 | * <p>Original source: |
48 | * <code><pre> | 48 | * <code><pre> |
49 | * {@literal @}Constraint(severity = "error", key = {Link}, | 49 | * {@literal @}Constraint(severity = "error", key = {Element}, |
50 | * message = "Communication links must start from the containing element.") | 50 | * message = "Only one communication link is allowed per element.") |
51 | * pattern communicationLinkDoesNotStartAtContainingElement(Link : DirectedCommunicationLink) { | 51 | * pattern multipleCommunicationLinks(Element : CommunicatingElement) { |
52 | * CommunicatingElement.communicationLink(Element, Link); | 52 | * CommunicatingElement.commSubsystem.communicationLink(Element, Link1); |
53 | * DirectedCommunicationLink.source(Link, SourceComm); | 53 | * CommunicatingElement.commSubsystem.communicationLink(Element, Link2); |
54 | * CommunicatingElement.commSubsystem(SourceElement, SourceComm); | 54 | * Link1 != Link2; |
55 | * Element != SourceElement; | ||
56 | * } | 55 | * } |
57 | * </pre></code> | 56 | * </pre></code> |
58 | * | 57 | * |
@@ -61,9 +60,9 @@ import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; | |||
61 | * | 60 | * |
62 | */ | 61 | */ |
63 | @SuppressWarnings("all") | 62 | @SuppressWarnings("all") |
64 | public final class CommunicationLinkDoesNotStartAtContainingElement extends BaseGeneratedEMFQuerySpecification<CommunicationLinkDoesNotStartAtContainingElement.Matcher> { | 63 | public final class MultipleCommunicationLinks extends BaseGeneratedEMFQuerySpecification<MultipleCommunicationLinks.Matcher> { |
65 | /** | 64 | /** |
66 | * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLinkDoesNotStartAtContainingElement pattern, | 65 | * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.satellite.queries.multipleCommunicationLinks pattern, |
67 | * to be used in conjunction with {@link Matcher}. | 66 | * to be used in conjunction with {@link Matcher}. |
68 | * | 67 | * |
69 | * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. | 68 | * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. |
@@ -75,69 +74,69 @@ public final class CommunicationLinkDoesNotStartAtContainingElement extends Base | |||
75 | * | 74 | * |
76 | */ | 75 | */ |
77 | public static abstract class Match extends BasePatternMatch { | 76 | public static abstract class Match extends BasePatternMatch { |
78 | private DirectedCommunicationLink fLink; | 77 | private CommunicatingElement fElement; |
79 | 78 | ||
80 | private static List<String> parameterNames = makeImmutableList("Link"); | 79 | private static List<String> parameterNames = makeImmutableList("Element"); |
81 | 80 | ||
82 | private Match(final DirectedCommunicationLink pLink) { | 81 | private Match(final CommunicatingElement pElement) { |
83 | this.fLink = pLink; | 82 | this.fElement = pElement; |
84 | } | 83 | } |
85 | 84 | ||
86 | @Override | 85 | @Override |
87 | public Object get(final String parameterName) { | 86 | public Object get(final String parameterName) { |
88 | if ("Link".equals(parameterName)) return this.fLink; | 87 | if ("Element".equals(parameterName)) return this.fElement; |
89 | return null; | 88 | return null; |
90 | } | 89 | } |
91 | 90 | ||
92 | public DirectedCommunicationLink getLink() { | 91 | public CommunicatingElement getElement() { |
93 | return this.fLink; | 92 | return this.fElement; |
94 | } | 93 | } |
95 | 94 | ||
96 | @Override | 95 | @Override |
97 | public boolean set(final String parameterName, final Object newValue) { | 96 | public boolean set(final String parameterName, final Object newValue) { |
98 | if (!isMutable()) throw new java.lang.UnsupportedOperationException(); | 97 | if (!isMutable()) throw new java.lang.UnsupportedOperationException(); |
99 | if ("Link".equals(parameterName) ) { | 98 | if ("Element".equals(parameterName) ) { |
100 | this.fLink = (DirectedCommunicationLink) newValue; | 99 | this.fElement = (CommunicatingElement) newValue; |
101 | return true; | 100 | return true; |
102 | } | 101 | } |
103 | return false; | 102 | return false; |
104 | } | 103 | } |
105 | 104 | ||
106 | public void setLink(final DirectedCommunicationLink pLink) { | 105 | public void setElement(final CommunicatingElement pElement) { |
107 | if (!isMutable()) throw new java.lang.UnsupportedOperationException(); | 106 | if (!isMutable()) throw new java.lang.UnsupportedOperationException(); |
108 | this.fLink = pLink; | 107 | this.fElement = pElement; |
109 | } | 108 | } |
110 | 109 | ||
111 | @Override | 110 | @Override |
112 | public String patternName() { | 111 | public String patternName() { |
113 | return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLinkDoesNotStartAtContainingElement"; | 112 | return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.multipleCommunicationLinks"; |
114 | } | 113 | } |
115 | 114 | ||
116 | @Override | 115 | @Override |
117 | public List<String> parameterNames() { | 116 | public List<String> parameterNames() { |
118 | return CommunicationLinkDoesNotStartAtContainingElement.Match.parameterNames; | 117 | return MultipleCommunicationLinks.Match.parameterNames; |
119 | } | 118 | } |
120 | 119 | ||
121 | @Override | 120 | @Override |
122 | public Object[] toArray() { | 121 | public Object[] toArray() { |
123 | return new Object[]{fLink}; | 122 | return new Object[]{fElement}; |
124 | } | 123 | } |
125 | 124 | ||
126 | @Override | 125 | @Override |
127 | public CommunicationLinkDoesNotStartAtContainingElement.Match toImmutable() { | 126 | public MultipleCommunicationLinks.Match toImmutable() { |
128 | return isMutable() ? newMatch(fLink) : this; | 127 | return isMutable() ? newMatch(fElement) : this; |
129 | } | 128 | } |
130 | 129 | ||
131 | @Override | 130 | @Override |
132 | public String prettyPrint() { | 131 | public String prettyPrint() { |
133 | StringBuilder result = new StringBuilder(); | 132 | StringBuilder result = new StringBuilder(); |
134 | result.append("\"Link\"=" + prettyPrintValue(fLink)); | 133 | result.append("\"Element\"=" + prettyPrintValue(fElement)); |
135 | return result.toString(); | 134 | return result.toString(); |
136 | } | 135 | } |
137 | 136 | ||
138 | @Override | 137 | @Override |
139 | public int hashCode() { | 138 | public int hashCode() { |
140 | return Objects.hash(fLink); | 139 | return Objects.hash(fElement); |
141 | } | 140 | } |
142 | 141 | ||
143 | @Override | 142 | @Override |
@@ -147,9 +146,9 @@ public final class CommunicationLinkDoesNotStartAtContainingElement extends Base | |||
147 | if (obj == null) { | 146 | if (obj == null) { |
148 | return false; | 147 | return false; |
149 | } | 148 | } |
150 | if ((obj instanceof CommunicationLinkDoesNotStartAtContainingElement.Match)) { | 149 | if ((obj instanceof MultipleCommunicationLinks.Match)) { |
151 | CommunicationLinkDoesNotStartAtContainingElement.Match other = (CommunicationLinkDoesNotStartAtContainingElement.Match) obj; | 150 | MultipleCommunicationLinks.Match other = (MultipleCommunicationLinks.Match) obj; |
152 | return Objects.equals(fLink, other.fLink); | 151 | return Objects.equals(fElement, other.fElement); |
153 | } else { | 152 | } else { |
154 | // this should be infrequent | 153 | // this should be infrequent |
155 | if (!(obj instanceof IPatternMatch)) { | 154 | if (!(obj instanceof IPatternMatch)) { |
@@ -161,8 +160,8 @@ public final class CommunicationLinkDoesNotStartAtContainingElement extends Base | |||
161 | } | 160 | } |
162 | 161 | ||
163 | @Override | 162 | @Override |
164 | public CommunicationLinkDoesNotStartAtContainingElement specification() { | 163 | public MultipleCommunicationLinks specification() { |
165 | return CommunicationLinkDoesNotStartAtContainingElement.instance(); | 164 | return MultipleCommunicationLinks.instance(); |
166 | } | 165 | } |
167 | 166 | ||
168 | /** | 167 | /** |
@@ -172,7 +171,7 @@ public final class CommunicationLinkDoesNotStartAtContainingElement extends Base | |||
172 | * @return the empty match. | 171 | * @return the empty match. |
173 | * | 172 | * |
174 | */ | 173 | */ |
175 | public static CommunicationLinkDoesNotStartAtContainingElement.Match newEmptyMatch() { | 174 | public static MultipleCommunicationLinks.Match newEmptyMatch() { |
176 | return new Mutable(null); | 175 | return new Mutable(null); |
177 | } | 176 | } |
178 | 177 | ||
@@ -180,29 +179,29 @@ public final class CommunicationLinkDoesNotStartAtContainingElement extends Base | |||
180 | * Returns a mutable (partial) match. | 179 | * Returns a mutable (partial) match. |
181 | * Fields of the mutable match can be filled to create a partial match, usable as matcher input. | 180 | * Fields of the mutable match can be filled to create a partial match, usable as matcher input. |
182 | * | 181 | * |
183 | * @param pLink the fixed value of pattern parameter Link, or null if not bound. | 182 | * @param pElement the fixed value of pattern parameter Element, or null if not bound. |
184 | * @return the new, mutable (partial) match object. | 183 | * @return the new, mutable (partial) match object. |
185 | * | 184 | * |
186 | */ | 185 | */ |
187 | public static CommunicationLinkDoesNotStartAtContainingElement.Match newMutableMatch(final DirectedCommunicationLink pLink) { | 186 | public static MultipleCommunicationLinks.Match newMutableMatch(final CommunicatingElement pElement) { |
188 | return new Mutable(pLink); | 187 | return new Mutable(pElement); |
189 | } | 188 | } |
190 | 189 | ||
191 | /** | 190 | /** |
192 | * Returns a new (partial) match. | 191 | * Returns a new (partial) match. |
193 | * This can be used e.g. to call the matcher with a partial match. | 192 | * This can be used e.g. to call the matcher with a partial match. |
194 | * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. | 193 | * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. |
195 | * @param pLink the fixed value of pattern parameter Link, or null if not bound. | 194 | * @param pElement the fixed value of pattern parameter Element, or null if not bound. |
196 | * @return the (partial) match object. | 195 | * @return the (partial) match object. |
197 | * | 196 | * |
198 | */ | 197 | */ |
199 | public static CommunicationLinkDoesNotStartAtContainingElement.Match newMatch(final DirectedCommunicationLink pLink) { | 198 | public static MultipleCommunicationLinks.Match newMatch(final CommunicatingElement pElement) { |
200 | return new Immutable(pLink); | 199 | return new Immutable(pElement); |
201 | } | 200 | } |
202 | 201 | ||
203 | private static final class Mutable extends CommunicationLinkDoesNotStartAtContainingElement.Match { | 202 | private static final class Mutable extends MultipleCommunicationLinks.Match { |
204 | Mutable(final DirectedCommunicationLink pLink) { | 203 | Mutable(final CommunicatingElement pElement) { |
205 | super(pLink); | 204 | super(pElement); |
206 | } | 205 | } |
207 | 206 | ||
208 | @Override | 207 | @Override |
@@ -211,9 +210,9 @@ public final class CommunicationLinkDoesNotStartAtContainingElement extends Base | |||
211 | } | 210 | } |
212 | } | 211 | } |
213 | 212 | ||
214 | private static final class Immutable extends CommunicationLinkDoesNotStartAtContainingElement.Match { | 213 | private static final class Immutable extends MultipleCommunicationLinks.Match { |
215 | Immutable(final DirectedCommunicationLink pLink) { | 214 | Immutable(final CommunicatingElement pElement) { |
216 | super(pLink); | 215 | super(pElement); |
217 | } | 216 | } |
218 | 217 | ||
219 | @Override | 218 | @Override |
@@ -224,7 +223,7 @@ public final class CommunicationLinkDoesNotStartAtContainingElement extends Base | |||
224 | } | 223 | } |
225 | 224 | ||
226 | /** | 225 | /** |
227 | * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLinkDoesNotStartAtContainingElement pattern, | 226 | * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.satellite.queries.multipleCommunicationLinks pattern, |
228 | * providing pattern-specific query methods. | 227 | * providing pattern-specific query methods. |
229 | * | 228 | * |
230 | * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, | 229 | * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, |
@@ -234,21 +233,20 @@ public final class CommunicationLinkDoesNotStartAtContainingElement extends Base | |||
234 | * | 233 | * |
235 | * <p>Original source: | 234 | * <p>Original source: |
236 | * <code><pre> | 235 | * <code><pre> |
237 | * {@literal @}Constraint(severity = "error", key = {Link}, | 236 | * {@literal @}Constraint(severity = "error", key = {Element}, |
238 | * message = "Communication links must start from the containing element.") | 237 | * message = "Only one communication link is allowed per element.") |
239 | * pattern communicationLinkDoesNotStartAtContainingElement(Link : DirectedCommunicationLink) { | 238 | * pattern multipleCommunicationLinks(Element : CommunicatingElement) { |
240 | * CommunicatingElement.communicationLink(Element, Link); | 239 | * CommunicatingElement.commSubsystem.communicationLink(Element, Link1); |
241 | * DirectedCommunicationLink.source(Link, SourceComm); | 240 | * CommunicatingElement.commSubsystem.communicationLink(Element, Link2); |
242 | * CommunicatingElement.commSubsystem(SourceElement, SourceComm); | 241 | * Link1 != Link2; |
243 | * Element != SourceElement; | ||
244 | * } | 242 | * } |
245 | * </pre></code> | 243 | * </pre></code> |
246 | * | 244 | * |
247 | * @see Match | 245 | * @see Match |
248 | * @see CommunicationLinkDoesNotStartAtContainingElement | 246 | * @see MultipleCommunicationLinks |
249 | * | 247 | * |
250 | */ | 248 | */ |
251 | public static class Matcher extends BaseMatcher<CommunicationLinkDoesNotStartAtContainingElement.Match> { | 249 | public static class Matcher extends BaseMatcher<MultipleCommunicationLinks.Match> { |
252 | /** | 250 | /** |
253 | * Initializes the pattern matcher within an existing VIATRA Query engine. | 251 | * Initializes the pattern matcher within an existing VIATRA Query engine. |
254 | * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. | 252 | * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. |
@@ -257,7 +255,7 @@ public final class CommunicationLinkDoesNotStartAtContainingElement extends Base | |||
257 | * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation | 255 | * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation |
258 | * | 256 | * |
259 | */ | 257 | */ |
260 | public static CommunicationLinkDoesNotStartAtContainingElement.Matcher on(final ViatraQueryEngine engine) { | 258 | public static MultipleCommunicationLinks.Matcher on(final ViatraQueryEngine engine) { |
261 | // check if matcher already exists | 259 | // check if matcher already exists |
262 | Matcher matcher = engine.getExistingMatcher(querySpecification()); | 260 | Matcher matcher = engine.getExistingMatcher(querySpecification()); |
263 | if (matcher == null) { | 261 | if (matcher == null) { |
@@ -272,13 +270,13 @@ public final class CommunicationLinkDoesNotStartAtContainingElement extends Base | |||
272 | * @noreference This method is for internal matcher initialization by the framework, do not call it manually. | 270 | * @noreference This method is for internal matcher initialization by the framework, do not call it manually. |
273 | * | 271 | * |
274 | */ | 272 | */ |
275 | public static CommunicationLinkDoesNotStartAtContainingElement.Matcher create() { | 273 | public static MultipleCommunicationLinks.Matcher create() { |
276 | return new Matcher(); | 274 | return new Matcher(); |
277 | } | 275 | } |
278 | 276 | ||
279 | private static final int POSITION_LINK = 0; | 277 | private static final int POSITION_ELEMENT = 0; |
280 | 278 | ||
281 | private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(CommunicationLinkDoesNotStartAtContainingElement.Matcher.class); | 279 | private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(MultipleCommunicationLinks.Matcher.class); |
282 | 280 | ||
283 | /** | 281 | /** |
284 | * Initializes the pattern matcher within an existing VIATRA Query engine. | 282 | * Initializes the pattern matcher within an existing VIATRA Query engine. |
@@ -294,12 +292,12 @@ public final class CommunicationLinkDoesNotStartAtContainingElement extends Base | |||
294 | 292 | ||
295 | /** | 293 | /** |
296 | * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. | 294 | * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. |
297 | * @param pLink the fixed value of pattern parameter Link, or null if not bound. | 295 | * @param pElement the fixed value of pattern parameter Element, or null if not bound. |
298 | * @return matches represented as a Match object. | 296 | * @return matches represented as a Match object. |
299 | * | 297 | * |
300 | */ | 298 | */ |
301 | public Collection<CommunicationLinkDoesNotStartAtContainingElement.Match> getAllMatches(final DirectedCommunicationLink pLink) { | 299 | public Collection<MultipleCommunicationLinks.Match> getAllMatches(final CommunicatingElement pElement) { |
302 | return rawStreamAllMatches(new Object[]{pLink}).collect(Collectors.toSet()); | 300 | return rawStreamAllMatches(new Object[]{pElement}).collect(Collectors.toSet()); |
303 | } | 301 | } |
304 | 302 | ||
305 | /** | 303 | /** |
@@ -308,101 +306,101 @@ public final class CommunicationLinkDoesNotStartAtContainingElement extends Base | |||
308 | * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed. | 306 | * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed. |
309 | * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>. | 307 | * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>. |
310 | * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. | 308 | * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. |
311 | * @param pLink the fixed value of pattern parameter Link, or null if not bound. | 309 | * @param pElement the fixed value of pattern parameter Element, or null if not bound. |
312 | * @return a stream of matches represented as a Match object. | 310 | * @return a stream of matches represented as a Match object. |
313 | * | 311 | * |
314 | */ | 312 | */ |
315 | public Stream<CommunicationLinkDoesNotStartAtContainingElement.Match> streamAllMatches(final DirectedCommunicationLink pLink) { | 313 | public Stream<MultipleCommunicationLinks.Match> streamAllMatches(final CommunicatingElement pElement) { |
316 | return rawStreamAllMatches(new Object[]{pLink}); | 314 | return rawStreamAllMatches(new Object[]{pElement}); |
317 | } | 315 | } |
318 | 316 | ||
319 | /** | 317 | /** |
320 | * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. | 318 | * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. |
321 | * Neither determinism nor randomness of selection is guaranteed. | 319 | * Neither determinism nor randomness of selection is guaranteed. |
322 | * @param pLink the fixed value of pattern parameter Link, or null if not bound. | 320 | * @param pElement the fixed value of pattern parameter Element, or null if not bound. |
323 | * @return a match represented as a Match object, or null if no match is found. | 321 | * @return a match represented as a Match object, or null if no match is found. |
324 | * | 322 | * |
325 | */ | 323 | */ |
326 | public Optional<CommunicationLinkDoesNotStartAtContainingElement.Match> getOneArbitraryMatch(final DirectedCommunicationLink pLink) { | 324 | public Optional<MultipleCommunicationLinks.Match> getOneArbitraryMatch(final CommunicatingElement pElement) { |
327 | return rawGetOneArbitraryMatch(new Object[]{pLink}); | 325 | return rawGetOneArbitraryMatch(new Object[]{pElement}); |
328 | } | 326 | } |
329 | 327 | ||
330 | /** | 328 | /** |
331 | * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, | 329 | * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, |
332 | * under any possible substitution of the unspecified parameters (if any). | 330 | * under any possible substitution of the unspecified parameters (if any). |
333 | * @param pLink the fixed value of pattern parameter Link, or null if not bound. | 331 | * @param pElement the fixed value of pattern parameter Element, or null if not bound. |
334 | * @return true if the input is a valid (partial) match of the pattern. | 332 | * @return true if the input is a valid (partial) match of the pattern. |
335 | * | 333 | * |
336 | */ | 334 | */ |
337 | public boolean hasMatch(final DirectedCommunicationLink pLink) { | 335 | public boolean hasMatch(final CommunicatingElement pElement) { |
338 | return rawHasMatch(new Object[]{pLink}); | 336 | return rawHasMatch(new Object[]{pElement}); |
339 | } | 337 | } |
340 | 338 | ||
341 | /** | 339 | /** |
342 | * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. | 340 | * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. |
343 | * @param pLink the fixed value of pattern parameter Link, or null if not bound. | 341 | * @param pElement the fixed value of pattern parameter Element, or null if not bound. |
344 | * @return the number of pattern matches found. | 342 | * @return the number of pattern matches found. |
345 | * | 343 | * |
346 | */ | 344 | */ |
347 | public int countMatches(final DirectedCommunicationLink pLink) { | 345 | public int countMatches(final CommunicatingElement pElement) { |
348 | return rawCountMatches(new Object[]{pLink}); | 346 | return rawCountMatches(new Object[]{pElement}); |
349 | } | 347 | } |
350 | 348 | ||
351 | /** | 349 | /** |
352 | * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. | 350 | * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. |
353 | * Neither determinism nor randomness of selection is guaranteed. | 351 | * Neither determinism nor randomness of selection is guaranteed. |
354 | * @param pLink the fixed value of pattern parameter Link, or null if not bound. | 352 | * @param pElement the fixed value of pattern parameter Element, or null if not bound. |
355 | * @param processor the action that will process the selected match. | 353 | * @param processor the action that will process the selected match. |
356 | * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked | 354 | * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked |
357 | * | 355 | * |
358 | */ | 356 | */ |
359 | public boolean forOneArbitraryMatch(final DirectedCommunicationLink pLink, final Consumer<? super CommunicationLinkDoesNotStartAtContainingElement.Match> processor) { | 357 | public boolean forOneArbitraryMatch(final CommunicatingElement pElement, final Consumer<? super MultipleCommunicationLinks.Match> processor) { |
360 | return rawForOneArbitraryMatch(new Object[]{pLink}, processor); | 358 | return rawForOneArbitraryMatch(new Object[]{pElement}, processor); |
361 | } | 359 | } |
362 | 360 | ||
363 | /** | 361 | /** |
364 | * Returns a new (partial) match. | 362 | * Returns a new (partial) match. |
365 | * This can be used e.g. to call the matcher with a partial match. | 363 | * This can be used e.g. to call the matcher with a partial match. |
366 | * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. | 364 | * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. |
367 | * @param pLink the fixed value of pattern parameter Link, or null if not bound. | 365 | * @param pElement the fixed value of pattern parameter Element, or null if not bound. |
368 | * @return the (partial) match object. | 366 | * @return the (partial) match object. |
369 | * | 367 | * |
370 | */ | 368 | */ |
371 | public CommunicationLinkDoesNotStartAtContainingElement.Match newMatch(final DirectedCommunicationLink pLink) { | 369 | public MultipleCommunicationLinks.Match newMatch(final CommunicatingElement pElement) { |
372 | return CommunicationLinkDoesNotStartAtContainingElement.Match.newMatch(pLink); | 370 | return MultipleCommunicationLinks.Match.newMatch(pElement); |
373 | } | 371 | } |
374 | 372 | ||
375 | /** | 373 | /** |
376 | * Retrieve the set of values that occur in matches for Link. | 374 | * Retrieve the set of values that occur in matches for Element. |
377 | * @return the Set of all values or empty set if there are no matches | 375 | * @return the Set of all values or empty set if there are no matches |
378 | * | 376 | * |
379 | */ | 377 | */ |
380 | protected Stream<DirectedCommunicationLink> rawStreamAllValuesOfLink(final Object[] parameters) { | 378 | protected Stream<CommunicatingElement> rawStreamAllValuesOfElement(final Object[] parameters) { |
381 | return rawStreamAllValues(POSITION_LINK, parameters).map(DirectedCommunicationLink.class::cast); | 379 | return rawStreamAllValues(POSITION_ELEMENT, parameters).map(CommunicatingElement.class::cast); |
382 | } | 380 | } |
383 | 381 | ||
384 | /** | 382 | /** |
385 | * Retrieve the set of values that occur in matches for Link. | 383 | * Retrieve the set of values that occur in matches for Element. |
386 | * @return the Set of all values or empty set if there are no matches | 384 | * @return the Set of all values or empty set if there are no matches |
387 | * | 385 | * |
388 | */ | 386 | */ |
389 | public Set<DirectedCommunicationLink> getAllValuesOfLink() { | 387 | public Set<CommunicatingElement> getAllValuesOfElement() { |
390 | return rawStreamAllValuesOfLink(emptyArray()).collect(Collectors.toSet()); | 388 | return rawStreamAllValuesOfElement(emptyArray()).collect(Collectors.toSet()); |
391 | } | 389 | } |
392 | 390 | ||
393 | /** | 391 | /** |
394 | * Retrieve the set of values that occur in matches for Link. | 392 | * Retrieve the set of values that occur in matches for Element. |
395 | * @return the Set of all values or empty set if there are no matches | 393 | * @return the Set of all values or empty set if there are no matches |
396 | * | 394 | * |
397 | */ | 395 | */ |
398 | public Stream<DirectedCommunicationLink> streamAllValuesOfLink() { | 396 | public Stream<CommunicatingElement> streamAllValuesOfElement() { |
399 | return rawStreamAllValuesOfLink(emptyArray()); | 397 | return rawStreamAllValuesOfElement(emptyArray()); |
400 | } | 398 | } |
401 | 399 | ||
402 | @Override | 400 | @Override |
403 | protected CommunicationLinkDoesNotStartAtContainingElement.Match tupleToMatch(final Tuple t) { | 401 | protected MultipleCommunicationLinks.Match tupleToMatch(final Tuple t) { |
404 | try { | 402 | try { |
405 | return CommunicationLinkDoesNotStartAtContainingElement.Match.newMatch((DirectedCommunicationLink) t.get(POSITION_LINK)); | 403 | return MultipleCommunicationLinks.Match.newMatch((CommunicatingElement) t.get(POSITION_ELEMENT)); |
406 | } catch(ClassCastException e) { | 404 | } catch(ClassCastException e) { |
407 | LOGGER.error("Element(s) in tuple not properly typed!",e); | 405 | LOGGER.error("Element(s) in tuple not properly typed!",e); |
408 | return null; | 406 | return null; |
@@ -410,9 +408,9 @@ public final class CommunicationLinkDoesNotStartAtContainingElement extends Base | |||
410 | } | 408 | } |
411 | 409 | ||
412 | @Override | 410 | @Override |
413 | protected CommunicationLinkDoesNotStartAtContainingElement.Match arrayToMatch(final Object[] match) { | 411 | protected MultipleCommunicationLinks.Match arrayToMatch(final Object[] match) { |
414 | try { | 412 | try { |
415 | return CommunicationLinkDoesNotStartAtContainingElement.Match.newMatch((DirectedCommunicationLink) match[POSITION_LINK]); | 413 | return MultipleCommunicationLinks.Match.newMatch((CommunicatingElement) match[POSITION_ELEMENT]); |
416 | } catch(ClassCastException e) { | 414 | } catch(ClassCastException e) { |
417 | LOGGER.error("Element(s) in array not properly typed!",e); | 415 | LOGGER.error("Element(s) in array not properly typed!",e); |
418 | return null; | 416 | return null; |
@@ -420,9 +418,9 @@ public final class CommunicationLinkDoesNotStartAtContainingElement extends Base | |||
420 | } | 418 | } |
421 | 419 | ||
422 | @Override | 420 | @Override |
423 | protected CommunicationLinkDoesNotStartAtContainingElement.Match arrayToMatchMutable(final Object[] match) { | 421 | protected MultipleCommunicationLinks.Match arrayToMatchMutable(final Object[] match) { |
424 | try { | 422 | try { |
425 | return CommunicationLinkDoesNotStartAtContainingElement.Match.newMutableMatch((DirectedCommunicationLink) match[POSITION_LINK]); | 423 | return MultipleCommunicationLinks.Match.newMutableMatch((CommunicatingElement) match[POSITION_ELEMENT]); |
426 | } catch(ClassCastException e) { | 424 | } catch(ClassCastException e) { |
427 | LOGGER.error("Element(s) in array not properly typed!",e); | 425 | LOGGER.error("Element(s) in array not properly typed!",e); |
428 | return null; | 426 | return null; |
@@ -434,12 +432,12 @@ public final class CommunicationLinkDoesNotStartAtContainingElement extends Base | |||
434 | * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded | 432 | * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded |
435 | * | 433 | * |
436 | */ | 434 | */ |
437 | public static IQuerySpecification<CommunicationLinkDoesNotStartAtContainingElement.Matcher> querySpecification() { | 435 | public static IQuerySpecification<MultipleCommunicationLinks.Matcher> querySpecification() { |
438 | return CommunicationLinkDoesNotStartAtContainingElement.instance(); | 436 | return MultipleCommunicationLinks.instance(); |
439 | } | 437 | } |
440 | } | 438 | } |
441 | 439 | ||
442 | private CommunicationLinkDoesNotStartAtContainingElement() { | 440 | private MultipleCommunicationLinks() { |
443 | super(GeneratedPQuery.INSTANCE); | 441 | super(GeneratedPQuery.INSTANCE); |
444 | } | 442 | } |
445 | 443 | ||
@@ -448,7 +446,7 @@ public final class CommunicationLinkDoesNotStartAtContainingElement extends Base | |||
448 | * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded | 446 | * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded |
449 | * | 447 | * |
450 | */ | 448 | */ |
451 | public static CommunicationLinkDoesNotStartAtContainingElement instance() { | 449 | public static MultipleCommunicationLinks instance() { |
452 | try{ | 450 | try{ |
453 | return LazyHolder.INSTANCE; | 451 | return LazyHolder.INSTANCE; |
454 | } catch (ExceptionInInitializerError err) { | 452 | } catch (ExceptionInInitializerError err) { |
@@ -457,35 +455,35 @@ public final class CommunicationLinkDoesNotStartAtContainingElement extends Base | |||
457 | } | 455 | } |
458 | 456 | ||
459 | @Override | 457 | @Override |
460 | protected CommunicationLinkDoesNotStartAtContainingElement.Matcher instantiate(final ViatraQueryEngine engine) { | 458 | protected MultipleCommunicationLinks.Matcher instantiate(final ViatraQueryEngine engine) { |
461 | return CommunicationLinkDoesNotStartAtContainingElement.Matcher.on(engine); | 459 | return MultipleCommunicationLinks.Matcher.on(engine); |
462 | } | 460 | } |
463 | 461 | ||
464 | @Override | 462 | @Override |
465 | public CommunicationLinkDoesNotStartAtContainingElement.Matcher instantiate() { | 463 | public MultipleCommunicationLinks.Matcher instantiate() { |
466 | return CommunicationLinkDoesNotStartAtContainingElement.Matcher.create(); | 464 | return MultipleCommunicationLinks.Matcher.create(); |
467 | } | 465 | } |
468 | 466 | ||
469 | @Override | 467 | @Override |
470 | public CommunicationLinkDoesNotStartAtContainingElement.Match newEmptyMatch() { | 468 | public MultipleCommunicationLinks.Match newEmptyMatch() { |
471 | return CommunicationLinkDoesNotStartAtContainingElement.Match.newEmptyMatch(); | 469 | return MultipleCommunicationLinks.Match.newEmptyMatch(); |
472 | } | 470 | } |
473 | 471 | ||
474 | @Override | 472 | @Override |
475 | public CommunicationLinkDoesNotStartAtContainingElement.Match newMatch(final Object... parameters) { | 473 | public MultipleCommunicationLinks.Match newMatch(final Object... parameters) { |
476 | return CommunicationLinkDoesNotStartAtContainingElement.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.DirectedCommunicationLink) parameters[0]); | 474 | return MultipleCommunicationLinks.Match.newMatch((satellite.CommunicatingElement) parameters[0]); |
477 | } | 475 | } |
478 | 476 | ||
479 | /** | 477 | /** |
480 | * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement (visibility: PUBLIC, simpleName: CommunicationLinkDoesNotStartAtContainingElement, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created | 478 | * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.MultipleCommunicationLinks (visibility: PUBLIC, simpleName: MultipleCommunicationLinks, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.MultipleCommunicationLinks, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created |
481 | * <b>not</b> at the class load time of the outer class, | 479 | * <b>not</b> at the class load time of the outer class, |
482 | * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement (visibility: PUBLIC, simpleName: CommunicationLinkDoesNotStartAtContainingElement, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. | 480 | * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.MultipleCommunicationLinks (visibility: PUBLIC, simpleName: MultipleCommunicationLinks, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.MultipleCommunicationLinks, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. |
483 | * | 481 | * |
484 | * <p> This workaround is required e.g. to support recursion. | 482 | * <p> This workaround is required e.g. to support recursion. |
485 | * | 483 | * |
486 | */ | 484 | */ |
487 | private static class LazyHolder { | 485 | private static class LazyHolder { |
488 | private static final CommunicationLinkDoesNotStartAtContainingElement INSTANCE = new CommunicationLinkDoesNotStartAtContainingElement(); | 486 | private static final MultipleCommunicationLinks INSTANCE = new MultipleCommunicationLinks(); |
489 | 487 | ||
490 | /** | 488 | /** |
491 | * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned. | 489 | * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned. |
@@ -503,11 +501,11 @@ public final class CommunicationLinkDoesNotStartAtContainingElement extends Base | |||
503 | } | 501 | } |
504 | 502 | ||
505 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 503 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
506 | private static final CommunicationLinkDoesNotStartAtContainingElement.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 504 | private static final MultipleCommunicationLinks.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
507 | 505 | ||
508 | private final PParameter parameter_Link = new PParameter("Link", "hu.bme.mit.inf.dslreasoner.domains.satellite.DirectedCommunicationLink", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "DirectedCommunicationLink")), PParameterDirection.INOUT); | 506 | private final PParameter parameter_Element = new PParameter("Element", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); |
509 | 507 | ||
510 | private final List<PParameter> parameters = Arrays.asList(parameter_Link); | 508 | private final List<PParameter> parameters = Arrays.asList(parameter_Element); |
511 | 509 | ||
512 | private GeneratedPQuery() { | 510 | private GeneratedPQuery() { |
513 | super(PVisibility.PUBLIC); | 511 | super(PVisibility.PUBLIC); |
@@ -515,12 +513,12 @@ public final class CommunicationLinkDoesNotStartAtContainingElement extends Base | |||
515 | 513 | ||
516 | @Override | 514 | @Override |
517 | public String getFullyQualifiedName() { | 515 | public String getFullyQualifiedName() { |
518 | return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLinkDoesNotStartAtContainingElement"; | 516 | return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.multipleCommunicationLinks"; |
519 | } | 517 | } |
520 | 518 | ||
521 | @Override | 519 | @Override |
522 | public List<String> getParameterNames() { | 520 | public List<String> getParameterNames() { |
523 | return Arrays.asList("Link"); | 521 | return Arrays.asList("Element"); |
524 | } | 522 | } |
525 | 523 | ||
526 | @Override | 524 | @Override |
@@ -534,43 +532,42 @@ public final class CommunicationLinkDoesNotStartAtContainingElement extends Base | |||
534 | Set<PBody> bodies = new LinkedHashSet<>(); | 532 | Set<PBody> bodies = new LinkedHashSet<>(); |
535 | { | 533 | { |
536 | PBody body = new PBody(this); | 534 | PBody body = new PBody(this); |
537 | PVariable var_Link = body.getOrCreateVariableByName("Link"); | ||
538 | PVariable var_Element = body.getOrCreateVariableByName("Element"); | 535 | PVariable var_Element = body.getOrCreateVariableByName("Element"); |
539 | PVariable var_SourceComm = body.getOrCreateVariableByName("SourceComm"); | 536 | PVariable var_Link1 = body.getOrCreateVariableByName("Link1"); |
540 | PVariable var_SourceElement = body.getOrCreateVariableByName("SourceElement"); | 537 | PVariable var_Link2 = body.getOrCreateVariableByName("Link2"); |
541 | new TypeConstraint(body, Tuples.flatTupleOf(var_Link), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "DirectedCommunicationLink"))); | 538 | new TypeConstraint(body, Tuples.flatTupleOf(var_Element), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); |
542 | body.setSymbolicParameters(Arrays.<ExportedParameter>asList( | 539 | body.setSymbolicParameters(Arrays.<ExportedParameter>asList( |
543 | new ExportedParameter(body, var_Link, parameter_Link) | 540 | new ExportedParameter(body, var_Element, parameter_Element) |
544 | )); | 541 | )); |
545 | // CommunicatingElement.communicationLink(Element, Link) | 542 | // CommunicatingElement.commSubsystem.communicationLink(Element, Link1) |
546 | new TypeConstraint(body, Tuples.flatTupleOf(var_Element), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); | 543 | new TypeConstraint(body, Tuples.flatTupleOf(var_Element), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); |
547 | PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); | 544 | PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); |
548 | new TypeConstraint(body, Tuples.flatTupleOf(var_Element, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "communicationLink"))); | 545 | new TypeConstraint(body, Tuples.flatTupleOf(var_Element, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "commSubsystem"))); |
549 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "DirectedCommunicationLink"))); | 546 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem"))); |
550 | new Equality(body, var__virtual_0_, var_Link); | ||
551 | // DirectedCommunicationLink.source(Link, SourceComm) | ||
552 | new TypeConstraint(body, Tuples.flatTupleOf(var_Link), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "DirectedCommunicationLink"))); | ||
553 | PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); | 547 | PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); |
554 | new TypeConstraint(body, Tuples.flatTupleOf(var_Link, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "DirectedCommunicationLink", "source"))); | 548 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommSubsystem", "communicationLink"))); |
555 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem"))); | 549 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "DirectedCommunicationLink"))); |
556 | new Equality(body, var__virtual_1_, var_SourceComm); | 550 | new Equality(body, var__virtual_1_, var_Link1); |
557 | // CommunicatingElement.commSubsystem(SourceElement, SourceComm) | 551 | // CommunicatingElement.commSubsystem.communicationLink(Element, Link2) |
558 | new TypeConstraint(body, Tuples.flatTupleOf(var_SourceElement), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); | 552 | new TypeConstraint(body, Tuples.flatTupleOf(var_Element), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); |
559 | PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}"); | 553 | PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}"); |
560 | new TypeConstraint(body, Tuples.flatTupleOf(var_SourceElement, var__virtual_2_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "commSubsystem"))); | 554 | new TypeConstraint(body, Tuples.flatTupleOf(var_Element, var__virtual_2_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "commSubsystem"))); |
561 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_2_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem"))); | 555 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_2_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem"))); |
562 | new Equality(body, var__virtual_2_, var_SourceComm); | 556 | PVariable var__virtual_3_ = body.getOrCreateVariableByName(".virtual{3}"); |
563 | // Element != SourceElement | 557 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_2_, var__virtual_3_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommSubsystem", "communicationLink"))); |
564 | new Inequality(body, var_Element, var_SourceElement); | 558 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_3_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "DirectedCommunicationLink"))); |
559 | new Equality(body, var__virtual_3_, var_Link2); | ||
560 | // Link1 != Link2 | ||
561 | new Inequality(body, var_Link1, var_Link2); | ||
565 | bodies.add(body); | 562 | bodies.add(body); |
566 | } | 563 | } |
567 | { | 564 | { |
568 | PAnnotation annotation = new PAnnotation("Constraint"); | 565 | PAnnotation annotation = new PAnnotation("Constraint"); |
569 | annotation.addAttribute("severity", "error"); | 566 | annotation.addAttribute("severity", "error"); |
570 | annotation.addAttribute("key", Arrays.asList(new Object[] { | 567 | annotation.addAttribute("key", Arrays.asList(new Object[] { |
571 | new ParameterReference("Link") | 568 | new ParameterReference("Element") |
572 | })); | 569 | })); |
573 | annotation.addAttribute("message", "Communication links must start from the containing element."); | 570 | annotation.addAttribute("message", "Only one communication link is allowed per element."); |
574 | addAnnotation(annotation); | 571 | addAnnotation(annotation); |
575 | } | 572 | } |
576 | return bodies; | 573 | return bodies; |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NoLinkToGroundStation.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NoLinkToGroundStation.java index 598f3a6b..45952f33 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NoLinkToGroundStation.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NoLinkToGroundStation.java | |||
@@ -3,7 +3,6 @@ | |||
3 | */ | 3 | */ |
4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; | 4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; |
5 | 5 | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft; | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IndirectCommunicationLink; | 6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IndirectCommunicationLink; |
8 | import java.util.Arrays; | 7 | import java.util.Arrays; |
9 | import java.util.Collection; | 8 | import java.util.Collection; |
@@ -41,6 +40,7 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; | |||
41 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; | 40 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; |
42 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; | 41 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; |
43 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; | 42 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; |
43 | import satellite.Spacecraft; | ||
44 | 44 | ||
45 | /** | 45 | /** |
46 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. | 46 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. |
@@ -476,7 +476,7 @@ public final class NoLinkToGroundStation extends BaseGeneratedEMFQuerySpecificat | |||
476 | 476 | ||
477 | @Override | 477 | @Override |
478 | public NoLinkToGroundStation.Match newMatch(final Object... parameters) { | 478 | public NoLinkToGroundStation.Match newMatch(final Object... parameters) { |
479 | return NoLinkToGroundStation.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft) parameters[0]); | 479 | return NoLinkToGroundStation.Match.newMatch((satellite.Spacecraft) parameters[0]); |
480 | } | 480 | } |
481 | 481 | ||
482 | /** | 482 | /** |
@@ -508,7 +508,7 @@ public final class NoLinkToGroundStation extends BaseGeneratedEMFQuerySpecificat | |||
508 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 508 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
509 | private static final NoLinkToGroundStation.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 509 | private static final NoLinkToGroundStation.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
510 | 510 | ||
511 | private final PParameter parameter_Spacecraft = new PParameter("Spacecraft", "hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); | 511 | private final PParameter parameter_Spacecraft = new PParameter("Spacecraft", "satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); |
512 | 512 | ||
513 | private final List<PParameter> parameters = Arrays.asList(parameter_Spacecraft); | 513 | private final List<PParameter> parameters = Arrays.asList(parameter_Spacecraft); |
514 | 514 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NoPotentialLinkToGroundStation.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NoPotentialLinkToGroundStation.java index 1e8f8502..3366de46 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NoPotentialLinkToGroundStation.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NoPotentialLinkToGroundStation.java | |||
@@ -3,7 +3,6 @@ | |||
3 | */ | 3 | */ |
4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; | 4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; |
5 | 5 | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft; | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IndirectLinkAllowed; | 6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IndirectLinkAllowed; |
8 | import java.util.Arrays; | 7 | import java.util.Arrays; |
9 | import java.util.Collection; | 8 | import java.util.Collection; |
@@ -41,6 +40,7 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; | |||
41 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; | 40 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; |
42 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; | 41 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; |
43 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; | 42 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; |
43 | import satellite.Spacecraft; | ||
44 | 44 | ||
45 | /** | 45 | /** |
46 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. | 46 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. |
@@ -472,7 +472,7 @@ public final class NoPotentialLinkToGroundStation extends BaseGeneratedEMFQueryS | |||
472 | 472 | ||
473 | @Override | 473 | @Override |
474 | public NoPotentialLinkToGroundStation.Match newMatch(final Object... parameters) { | 474 | public NoPotentialLinkToGroundStation.Match newMatch(final Object... parameters) { |
475 | return NoPotentialLinkToGroundStation.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft) parameters[0]); | 475 | return NoPotentialLinkToGroundStation.Match.newMatch((satellite.Spacecraft) parameters[0]); |
476 | } | 476 | } |
477 | 477 | ||
478 | /** | 478 | /** |
@@ -504,7 +504,7 @@ public final class NoPotentialLinkToGroundStation extends BaseGeneratedEMFQueryS | |||
504 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 504 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
505 | private static final NoPotentialLinkToGroundStation.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 505 | private static final NoPotentialLinkToGroundStation.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
506 | 506 | ||
507 | private final PParameter parameter_Spacecraft = new PParameter("Spacecraft", "hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); | 507 | private final PParameter parameter_Spacecraft = new PParameter("Spacecraft", "satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); |
508 | 508 | ||
509 | private final List<PParameter> parameters = Arrays.asList(parameter_Spacecraft); | 509 | private final List<PParameter> parameters = Arrays.asList(parameter_Spacecraft); |
510 | 510 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NotEnoughInterferometryPayloads.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NotEnoughInterferometryPayloads.java index d75dea5f..bdd97100 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NotEnoughInterferometryPayloads.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NotEnoughInterferometryPayloads.java | |||
@@ -3,7 +3,6 @@ | |||
3 | */ | 3 | */ |
4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; | 4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; |
5 | 5 | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.InterferometryMission; | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.AtLeastTwoInterferometryPayloads; | 6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.AtLeastTwoInterferometryPayloads; |
8 | import java.util.Arrays; | 7 | import java.util.Arrays; |
9 | import java.util.Collection; | 8 | import java.util.Collection; |
@@ -39,6 +38,7 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; | |||
39 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; | 38 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; |
40 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; | 39 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; |
41 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; | 40 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; |
41 | import satellite.InterferometryMission; | ||
42 | 42 | ||
43 | /** | 43 | /** |
44 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. | 44 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. |
@@ -472,7 +472,7 @@ public final class NotEnoughInterferometryPayloads extends BaseGeneratedEMFQuery | |||
472 | 472 | ||
473 | @Override | 473 | @Override |
474 | public NotEnoughInterferometryPayloads.Match newMatch(final Object... parameters) { | 474 | public NotEnoughInterferometryPayloads.Match newMatch(final Object... parameters) { |
475 | return NotEnoughInterferometryPayloads.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.InterferometryMission) parameters[0]); | 475 | return NotEnoughInterferometryPayloads.Match.newMatch((satellite.InterferometryMission) parameters[0]); |
476 | } | 476 | } |
477 | 477 | ||
478 | /** | 478 | /** |
@@ -504,7 +504,7 @@ public final class NotEnoughInterferometryPayloads extends BaseGeneratedEMFQuery | |||
504 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 504 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
505 | private static final NotEnoughInterferometryPayloads.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 505 | private static final NotEnoughInterferometryPayloads.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
506 | 506 | ||
507 | private final PParameter parameter_Mission = new PParameter("Mission", "hu.bme.mit.inf.dslreasoner.domains.satellite.InterferometryMission", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "InterferometryMission")), PParameterDirection.INOUT); | 507 | private final PParameter parameter_Mission = new PParameter("Mission", "satellite.InterferometryMission", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "InterferometryMission")), PParameterDirection.INOUT); |
508 | 508 | ||
509 | private final List<PParameter> parameters = Arrays.asList(parameter_Mission); | 509 | private final List<PParameter> parameters = Arrays.asList(parameter_Mission); |
510 | 510 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.java index c86761ce..d7378783 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.java | |||
@@ -3,12 +3,13 @@ | |||
3 | */ | 3 | */ |
4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; | 4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; |
5 | 5 | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement; | 6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkOfElement; |
7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLoop; | 7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLoop; |
8 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CubeSatWithKaAntenna; | 8 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CubeSatWithKaAntenna; |
9 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetBand; | 9 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetBand; |
10 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetGain; | 10 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetGain; |
11 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.KaAntennaGainLow; | 11 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.KaAntennaGainLow; |
12 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.MultipleCommunicationLinks; | ||
12 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoLinkToGroundStation; | 13 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoLinkToGroundStation; |
13 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoPotentialLinkToGroundStation; | 14 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoPotentialLinkToGroundStation; |
14 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NotEnoughInterferometryPayloads; | 15 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NotEnoughInterferometryPayloads; |
@@ -28,7 +29,8 @@ import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; | |||
28 | * in order to achieve better performance than one-by-one on-demand matcher initialization. | 29 | * in order to achieve better performance than one-by-one on-demand matcher initialization. |
29 | * | 30 | * |
30 | * <p> From package hu.bme.mit.inf.dslreasoner.domains.satellite.queries, the group contains the definition of the following patterns: <ul> | 31 | * <p> From package hu.bme.mit.inf.dslreasoner.domains.satellite.queries, the group contains the definition of the following patterns: <ul> |
31 | * <li>communicationLinkDoesNotStartAtContainingElement</li> | 32 | * <li>multipleCommunicationLinks</li> |
33 | * <li>communicationLinkOfElement</li> | ||
32 | * <li>notEnoughInterferometryPayloads</li> | 34 | * <li>notEnoughInterferometryPayloads</li> |
33 | * <li>noLinkToGroundStation</li> | 35 | * <li>noLinkToGroundStation</li> |
34 | * <li>noPotentialLinkToGroundStation</li> | 36 | * <li>noPotentialLinkToGroundStation</li> |
@@ -66,7 +68,8 @@ public final class SatelliteQueries extends BaseGeneratedPatternGroup { | |||
66 | private static SatelliteQueries INSTANCE; | 68 | private static SatelliteQueries INSTANCE; |
67 | 69 | ||
68 | private SatelliteQueries() { | 70 | private SatelliteQueries() { |
69 | querySpecifications.add(CommunicationLinkDoesNotStartAtContainingElement.instance()); | 71 | querySpecifications.add(MultipleCommunicationLinks.instance()); |
72 | querySpecifications.add(CommunicationLinkOfElement.instance()); | ||
70 | querySpecifications.add(NotEnoughInterferometryPayloads.instance()); | 73 | querySpecifications.add(NotEnoughInterferometryPayloads.instance()); |
71 | querySpecifications.add(NoLinkToGroundStation.instance()); | 74 | querySpecifications.add(NoLinkToGroundStation.instance()); |
72 | querySpecifications.add(NoPotentialLinkToGroundStation.instance()); | 75 | querySpecifications.add(NoPotentialLinkToGroundStation.instance()); |
@@ -82,12 +85,20 @@ public final class SatelliteQueries extends BaseGeneratedPatternGroup { | |||
82 | querySpecifications.add(SpacecraftOfKind.instance()); | 85 | querySpecifications.add(SpacecraftOfKind.instance()); |
83 | } | 86 | } |
84 | 87 | ||
85 | public CommunicationLinkDoesNotStartAtContainingElement getCommunicationLinkDoesNotStartAtContainingElement() { | 88 | public MultipleCommunicationLinks getMultipleCommunicationLinks() { |
86 | return CommunicationLinkDoesNotStartAtContainingElement.instance(); | 89 | return MultipleCommunicationLinks.instance(); |
87 | } | 90 | } |
88 | 91 | ||
89 | public CommunicationLinkDoesNotStartAtContainingElement.Matcher getCommunicationLinkDoesNotStartAtContainingElement(final ViatraQueryEngine engine) { | 92 | public MultipleCommunicationLinks.Matcher getMultipleCommunicationLinks(final ViatraQueryEngine engine) { |
90 | return CommunicationLinkDoesNotStartAtContainingElement.Matcher.on(engine); | 93 | return MultipleCommunicationLinks.Matcher.on(engine); |
94 | } | ||
95 | |||
96 | public CommunicationLinkOfElement getCommunicationLinkOfElement() { | ||
97 | return CommunicationLinkOfElement.instance(); | ||
98 | } | ||
99 | |||
100 | public CommunicationLinkOfElement.Matcher getCommunicationLinkOfElement(final ViatraQueryEngine engine) { | ||
101 | return CommunicationLinkOfElement.Matcher.on(engine); | ||
91 | } | 102 | } |
92 | 103 | ||
93 | public NotEnoughInterferometryPayloads getNotEnoughInterferometryPayloads() { | 104 | public NotEnoughInterferometryPayloads getNotEnoughInterferometryPayloads() { |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SmallSat.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SmallSat.java index 7bc497ab..4791740e 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SmallSat.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SmallSat.java | |||
@@ -64,11 +64,11 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification<SmallSat. | |||
64 | * | 64 | * |
65 | */ | 65 | */ |
66 | public static abstract class Match extends BasePatternMatch { | 66 | public static abstract class Match extends BasePatternMatch { |
67 | private hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat fSat; | 67 | private satellite.SmallSat fSat; |
68 | 68 | ||
69 | private static List<String> parameterNames = makeImmutableList("Sat"); | 69 | private static List<String> parameterNames = makeImmutableList("Sat"); |
70 | 70 | ||
71 | private Match(final hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat pSat) { | 71 | private Match(final satellite.SmallSat pSat) { |
72 | this.fSat = pSat; | 72 | this.fSat = pSat; |
73 | } | 73 | } |
74 | 74 | ||
@@ -78,7 +78,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification<SmallSat. | |||
78 | return null; | 78 | return null; |
79 | } | 79 | } |
80 | 80 | ||
81 | public hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat getSat() { | 81 | public satellite.SmallSat getSat() { |
82 | return this.fSat; | 82 | return this.fSat; |
83 | } | 83 | } |
84 | 84 | ||
@@ -86,13 +86,13 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification<SmallSat. | |||
86 | public boolean set(final String parameterName, final Object newValue) { | 86 | public boolean set(final String parameterName, final Object newValue) { |
87 | if (!isMutable()) throw new java.lang.UnsupportedOperationException(); | 87 | if (!isMutable()) throw new java.lang.UnsupportedOperationException(); |
88 | if ("Sat".equals(parameterName) ) { | 88 | if ("Sat".equals(parameterName) ) { |
89 | this.fSat = (hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat) newValue; | 89 | this.fSat = (satellite.SmallSat) newValue; |
90 | return true; | 90 | return true; |
91 | } | 91 | } |
92 | return false; | 92 | return false; |
93 | } | 93 | } |
94 | 94 | ||
95 | public void setSat(final hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat pSat) { | 95 | public void setSat(final satellite.SmallSat pSat) { |
96 | if (!isMutable()) throw new java.lang.UnsupportedOperationException(); | 96 | if (!isMutable()) throw new java.lang.UnsupportedOperationException(); |
97 | this.fSat = pSat; | 97 | this.fSat = pSat; |
98 | } | 98 | } |
@@ -173,7 +173,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification<SmallSat. | |||
173 | * @return the new, mutable (partial) match object. | 173 | * @return the new, mutable (partial) match object. |
174 | * | 174 | * |
175 | */ | 175 | */ |
176 | public static SmallSat.Match newMutableMatch(final hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat pSat) { | 176 | public static SmallSat.Match newMutableMatch(final satellite.SmallSat pSat) { |
177 | return new Mutable(pSat); | 177 | return new Mutable(pSat); |
178 | } | 178 | } |
179 | 179 | ||
@@ -185,12 +185,12 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification<SmallSat. | |||
185 | * @return the (partial) match object. | 185 | * @return the (partial) match object. |
186 | * | 186 | * |
187 | */ | 187 | */ |
188 | public static SmallSat.Match newMatch(final hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat pSat) { | 188 | public static SmallSat.Match newMatch(final satellite.SmallSat pSat) { |
189 | return new Immutable(pSat); | 189 | return new Immutable(pSat); |
190 | } | 190 | } |
191 | 191 | ||
192 | private static final class Mutable extends SmallSat.Match { | 192 | private static final class Mutable extends SmallSat.Match { |
193 | Mutable(final hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat pSat) { | 193 | Mutable(final satellite.SmallSat pSat) { |
194 | super(pSat); | 194 | super(pSat); |
195 | } | 195 | } |
196 | 196 | ||
@@ -201,7 +201,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification<SmallSat. | |||
201 | } | 201 | } |
202 | 202 | ||
203 | private static final class Immutable extends SmallSat.Match { | 203 | private static final class Immutable extends SmallSat.Match { |
204 | Immutable(final hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat pSat) { | 204 | Immutable(final satellite.SmallSat pSat) { |
205 | super(pSat); | 205 | super(pSat); |
206 | } | 206 | } |
207 | 207 | ||
@@ -282,7 +282,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification<SmallSat. | |||
282 | * @return matches represented as a Match object. | 282 | * @return matches represented as a Match object. |
283 | * | 283 | * |
284 | */ | 284 | */ |
285 | public Collection<SmallSat.Match> getAllMatches(final hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat pSat) { | 285 | public Collection<SmallSat.Match> getAllMatches(final satellite.SmallSat pSat) { |
286 | return rawStreamAllMatches(new Object[]{pSat}).collect(Collectors.toSet()); | 286 | return rawStreamAllMatches(new Object[]{pSat}).collect(Collectors.toSet()); |
287 | } | 287 | } |
288 | 288 | ||
@@ -296,7 +296,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification<SmallSat. | |||
296 | * @return a stream of matches represented as a Match object. | 296 | * @return a stream of matches represented as a Match object. |
297 | * | 297 | * |
298 | */ | 298 | */ |
299 | public Stream<SmallSat.Match> streamAllMatches(final hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat pSat) { | 299 | public Stream<SmallSat.Match> streamAllMatches(final satellite.SmallSat pSat) { |
300 | return rawStreamAllMatches(new Object[]{pSat}); | 300 | return rawStreamAllMatches(new Object[]{pSat}); |
301 | } | 301 | } |
302 | 302 | ||
@@ -307,7 +307,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification<SmallSat. | |||
307 | * @return a match represented as a Match object, or null if no match is found. | 307 | * @return a match represented as a Match object, or null if no match is found. |
308 | * | 308 | * |
309 | */ | 309 | */ |
310 | public Optional<SmallSat.Match> getOneArbitraryMatch(final hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat pSat) { | 310 | public Optional<SmallSat.Match> getOneArbitraryMatch(final satellite.SmallSat pSat) { |
311 | return rawGetOneArbitraryMatch(new Object[]{pSat}); | 311 | return rawGetOneArbitraryMatch(new Object[]{pSat}); |
312 | } | 312 | } |
313 | 313 | ||
@@ -318,7 +318,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification<SmallSat. | |||
318 | * @return true if the input is a valid (partial) match of the pattern. | 318 | * @return true if the input is a valid (partial) match of the pattern. |
319 | * | 319 | * |
320 | */ | 320 | */ |
321 | public boolean hasMatch(final hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat pSat) { | 321 | public boolean hasMatch(final satellite.SmallSat pSat) { |
322 | return rawHasMatch(new Object[]{pSat}); | 322 | return rawHasMatch(new Object[]{pSat}); |
323 | } | 323 | } |
324 | 324 | ||
@@ -328,7 +328,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification<SmallSat. | |||
328 | * @return the number of pattern matches found. | 328 | * @return the number of pattern matches found. |
329 | * | 329 | * |
330 | */ | 330 | */ |
331 | public int countMatches(final hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat pSat) { | 331 | public int countMatches(final satellite.SmallSat pSat) { |
332 | return rawCountMatches(new Object[]{pSat}); | 332 | return rawCountMatches(new Object[]{pSat}); |
333 | } | 333 | } |
334 | 334 | ||
@@ -340,7 +340,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification<SmallSat. | |||
340 | * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked | 340 | * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked |
341 | * | 341 | * |
342 | */ | 342 | */ |
343 | public boolean forOneArbitraryMatch(final hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat pSat, final Consumer<? super SmallSat.Match> processor) { | 343 | public boolean forOneArbitraryMatch(final satellite.SmallSat pSat, final Consumer<? super SmallSat.Match> processor) { |
344 | return rawForOneArbitraryMatch(new Object[]{pSat}, processor); | 344 | return rawForOneArbitraryMatch(new Object[]{pSat}, processor); |
345 | } | 345 | } |
346 | 346 | ||
@@ -352,7 +352,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification<SmallSat. | |||
352 | * @return the (partial) match object. | 352 | * @return the (partial) match object. |
353 | * | 353 | * |
354 | */ | 354 | */ |
355 | public SmallSat.Match newMatch(final hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat pSat) { | 355 | public SmallSat.Match newMatch(final satellite.SmallSat pSat) { |
356 | return SmallSat.Match.newMatch(pSat); | 356 | return SmallSat.Match.newMatch(pSat); |
357 | } | 357 | } |
358 | 358 | ||
@@ -361,8 +361,8 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification<SmallSat. | |||
361 | * @return the Set of all values or empty set if there are no matches | 361 | * @return the Set of all values or empty set if there are no matches |
362 | * | 362 | * |
363 | */ | 363 | */ |
364 | protected Stream<hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat> rawStreamAllValuesOfSat(final Object[] parameters) { | 364 | protected Stream<satellite.SmallSat> rawStreamAllValuesOfSat(final Object[] parameters) { |
365 | return rawStreamAllValues(POSITION_SAT, parameters).map(hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat.class::cast); | 365 | return rawStreamAllValues(POSITION_SAT, parameters).map(satellite.SmallSat.class::cast); |
366 | } | 366 | } |
367 | 367 | ||
368 | /** | 368 | /** |
@@ -370,7 +370,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification<SmallSat. | |||
370 | * @return the Set of all values or empty set if there are no matches | 370 | * @return the Set of all values or empty set if there are no matches |
371 | * | 371 | * |
372 | */ | 372 | */ |
373 | public Set<hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat> getAllValuesOfSat() { | 373 | public Set<satellite.SmallSat> getAllValuesOfSat() { |
374 | return rawStreamAllValuesOfSat(emptyArray()).collect(Collectors.toSet()); | 374 | return rawStreamAllValuesOfSat(emptyArray()).collect(Collectors.toSet()); |
375 | } | 375 | } |
376 | 376 | ||
@@ -379,14 +379,14 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification<SmallSat. | |||
379 | * @return the Set of all values or empty set if there are no matches | 379 | * @return the Set of all values or empty set if there are no matches |
380 | * | 380 | * |
381 | */ | 381 | */ |
382 | public Stream<hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat> streamAllValuesOfSat() { | 382 | public Stream<satellite.SmallSat> streamAllValuesOfSat() { |
383 | return rawStreamAllValuesOfSat(emptyArray()); | 383 | return rawStreamAllValuesOfSat(emptyArray()); |
384 | } | 384 | } |
385 | 385 | ||
386 | @Override | 386 | @Override |
387 | protected SmallSat.Match tupleToMatch(final Tuple t) { | 387 | protected SmallSat.Match tupleToMatch(final Tuple t) { |
388 | try { | 388 | try { |
389 | return SmallSat.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat) t.get(POSITION_SAT)); | 389 | return SmallSat.Match.newMatch((satellite.SmallSat) t.get(POSITION_SAT)); |
390 | } catch(ClassCastException e) { | 390 | } catch(ClassCastException e) { |
391 | LOGGER.error("Element(s) in tuple not properly typed!",e); | 391 | LOGGER.error("Element(s) in tuple not properly typed!",e); |
392 | return null; | 392 | return null; |
@@ -396,7 +396,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification<SmallSat. | |||
396 | @Override | 396 | @Override |
397 | protected SmallSat.Match arrayToMatch(final Object[] match) { | 397 | protected SmallSat.Match arrayToMatch(final Object[] match) { |
398 | try { | 398 | try { |
399 | return SmallSat.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat) match[POSITION_SAT]); | 399 | return SmallSat.Match.newMatch((satellite.SmallSat) match[POSITION_SAT]); |
400 | } catch(ClassCastException e) { | 400 | } catch(ClassCastException e) { |
401 | LOGGER.error("Element(s) in array not properly typed!",e); | 401 | LOGGER.error("Element(s) in array not properly typed!",e); |
402 | return null; | 402 | return null; |
@@ -406,7 +406,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification<SmallSat. | |||
406 | @Override | 406 | @Override |
407 | protected SmallSat.Match arrayToMatchMutable(final Object[] match) { | 407 | protected SmallSat.Match arrayToMatchMutable(final Object[] match) { |
408 | try { | 408 | try { |
409 | return SmallSat.Match.newMutableMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat) match[POSITION_SAT]); | 409 | return SmallSat.Match.newMutableMatch((satellite.SmallSat) match[POSITION_SAT]); |
410 | } catch(ClassCastException e) { | 410 | } catch(ClassCastException e) { |
411 | LOGGER.error("Element(s) in array not properly typed!",e); | 411 | LOGGER.error("Element(s) in array not properly typed!",e); |
412 | return null; | 412 | return null; |
@@ -457,7 +457,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification<SmallSat. | |||
457 | 457 | ||
458 | @Override | 458 | @Override |
459 | public SmallSat.Match newMatch(final Object... parameters) { | 459 | public SmallSat.Match newMatch(final Object... parameters) { |
460 | return SmallSat.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat) parameters[0]); | 460 | return SmallSat.Match.newMatch((satellite.SmallSat) parameters[0]); |
461 | } | 461 | } |
462 | 462 | ||
463 | /** | 463 | /** |
@@ -489,7 +489,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification<SmallSat. | |||
489 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 489 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
490 | private static final SmallSat.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 490 | private static final SmallSat.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
491 | 491 | ||
492 | private final PParameter parameter_Sat = new PParameter("Sat", "hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "SmallSat")), PParameterDirection.INOUT); | 492 | private final PParameter parameter_Sat = new PParameter("Sat", "satellite.SmallSat", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "SmallSat")), PParameterDirection.INOUT); |
493 | 493 | ||
494 | private final List<PParameter> parameters = Arrays.asList(parameter_Sat); | 494 | private final List<PParameter> parameters = Arrays.asList(parameter_Sat); |
495 | 495 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SpacecraftOfKind.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SpacecraftOfKind.java index 52602bb5..ed0bd7dc 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SpacecraftOfKind.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SpacecraftOfKind.java | |||
@@ -3,8 +3,6 @@ | |||
3 | */ | 3 | */ |
4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; | 4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; |
5 | 5 | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft; | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.SpacecraftKind; | ||
8 | import java.util.Arrays; | 6 | import java.util.Arrays; |
9 | import java.util.Collection; | 7 | import java.util.Collection; |
10 | import java.util.LinkedHashSet; | 8 | import java.util.LinkedHashSet; |
@@ -41,6 +39,8 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; | |||
41 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; | 39 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; |
42 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; | 40 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; |
43 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; | 41 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; |
42 | import satellite.Spacecraft; | ||
43 | import satellite.SpacecraftKind; | ||
44 | 44 | ||
45 | /** | 45 | /** |
46 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. | 46 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. |
@@ -628,7 +628,7 @@ public final class SpacecraftOfKind extends BaseGeneratedEMFQuerySpecification<S | |||
628 | 628 | ||
629 | @Override | 629 | @Override |
630 | public SpacecraftOfKind.Match newMatch(final Object... parameters) { | 630 | public SpacecraftOfKind.Match newMatch(final Object... parameters) { |
631 | return SpacecraftOfKind.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft) parameters[0], (hu.bme.mit.inf.dslreasoner.domains.satellite.SpacecraftKind) parameters[1]); | 631 | return SpacecraftOfKind.Match.newMatch((satellite.Spacecraft) parameters[0], (satellite.SpacecraftKind) parameters[1]); |
632 | } | 632 | } |
633 | 633 | ||
634 | /** | 634 | /** |
@@ -660,9 +660,9 @@ public final class SpacecraftOfKind extends BaseGeneratedEMFQuerySpecification<S | |||
660 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 660 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
661 | private static final SpacecraftOfKind.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 661 | private static final SpacecraftOfKind.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
662 | 662 | ||
663 | private final PParameter parameter_Spacecraft = new PParameter("Spacecraft", "hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); | 663 | private final PParameter parameter_Spacecraft = new PParameter("Spacecraft", "satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); |
664 | 664 | ||
665 | private final PParameter parameter_Kind = new PParameter("Kind", "hu.bme.mit.inf.dslreasoner.domains.satellite.SpacecraftKind", new EDataTypeInSlotsKey((EDataType)getClassifierLiteralSafe("http://www.example.org/satellite", "SpacecraftKind")), PParameterDirection.INOUT); | 665 | private final PParameter parameter_Kind = new PParameter("Kind", "satellite.SpacecraftKind", new EDataTypeInSlotsKey((EDataType)getClassifierLiteralSafe("http://www.example.org/satellite", "SpacecraftKind")), PParameterDirection.INOUT); |
666 | 666 | ||
667 | private final List<PParameter> parameters = Arrays.asList(parameter_Spacecraft, parameter_Kind); | 667 | private final List<PParameter> parameters = Arrays.asList(parameter_Spacecraft, parameter_Kind); |
668 | 668 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/ThreeUCubeSatWithNonUhfCrossLink.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/ThreeUCubeSatWithNonUhfCrossLink.java index 6408033b..51b224b1 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/ThreeUCubeSatWithNonUhfCrossLink.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/ThreeUCubeSatWithNonUhfCrossLink.java | |||
@@ -3,7 +3,6 @@ | |||
3 | */ | 3 | */ |
4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; | 4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; |
5 | 5 | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat3U; | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemBandUhf; | 6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemBandUhf; |
8 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.GroundStationNetwork; | 7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.GroundStationNetwork; |
9 | import java.util.Arrays; | 8 | import java.util.Arrays; |
@@ -42,6 +41,7 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; | |||
42 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; | 41 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; |
43 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; | 42 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; |
44 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; | 43 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; |
44 | import satellite.CubeSat3U; | ||
45 | 45 | ||
46 | /** | 46 | /** |
47 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. | 47 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. |
@@ -485,7 +485,7 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer | |||
485 | 485 | ||
486 | @Override | 486 | @Override |
487 | public ThreeUCubeSatWithNonUhfCrossLink.Match newMatch(final Object... parameters) { | 487 | public ThreeUCubeSatWithNonUhfCrossLink.Match newMatch(final Object... parameters) { |
488 | return ThreeUCubeSatWithNonUhfCrossLink.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat3U) parameters[0]); | 488 | return ThreeUCubeSatWithNonUhfCrossLink.Match.newMatch((satellite.CubeSat3U) parameters[0]); |
489 | } | 489 | } |
490 | 490 | ||
491 | /** | 491 | /** |
@@ -517,7 +517,7 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer | |||
517 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 517 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
518 | private static final ThreeUCubeSatWithNonUhfCrossLink.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 518 | private static final ThreeUCubeSatWithNonUhfCrossLink.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
519 | 519 | ||
520 | private final PParameter parameter_Sat = new PParameter("Sat", "hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat3U", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CubeSat3U")), PParameterDirection.INOUT); | 520 | private final PParameter parameter_Sat = new PParameter("Sat", "satellite.CubeSat3U", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CubeSat3U")), PParameterDirection.INOUT); |
521 | 521 | ||
522 | private final List<PParameter> parameters = Arrays.asList(parameter_Sat); | 522 | private final List<PParameter> parameters = Arrays.asList(parameter_Sat); |
523 | 523 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/UhfAntennaGainNotLow.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/UhfAntennaGainNotLow.java index 62222ded..99e472ea 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/UhfAntennaGainNotLow.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/UhfAntennaGainNotLow.java | |||
@@ -3,7 +3,6 @@ | |||
3 | */ | 3 | */ |
4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; | 4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; |
5 | 5 | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem; | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemGainLow; | 6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemGainLow; |
8 | import java.util.Arrays; | 7 | import java.util.Arrays; |
9 | import java.util.Collection; | 8 | import java.util.Collection; |
@@ -44,6 +43,7 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; | |||
44 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; | 43 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; |
45 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; | 44 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; |
46 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; | 45 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; |
46 | import satellite.CommSubsystem; | ||
47 | 47 | ||
48 | /** | 48 | /** |
49 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. | 49 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. |
@@ -483,7 +483,7 @@ public final class UhfAntennaGainNotLow extends BaseGeneratedEMFQuerySpecificati | |||
483 | 483 | ||
484 | @Override | 484 | @Override |
485 | public UhfAntennaGainNotLow.Match newMatch(final Object... parameters) { | 485 | public UhfAntennaGainNotLow.Match newMatch(final Object... parameters) { |
486 | return UhfAntennaGainNotLow.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem) parameters[0]); | 486 | return UhfAntennaGainNotLow.Match.newMatch((satellite.CommSubsystem) parameters[0]); |
487 | } | 487 | } |
488 | 488 | ||
489 | /** | 489 | /** |
@@ -515,7 +515,7 @@ public final class UhfAntennaGainNotLow extends BaseGeneratedEMFQuerySpecificati | |||
515 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 515 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
516 | private static final UhfAntennaGainNotLow.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 516 | private static final UhfAntennaGainNotLow.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
517 | 517 | ||
518 | private final PParameter parameter_Comm = new PParameter("Comm", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); | 518 | private final PParameter parameter_Comm = new PParameter("Comm", "satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); |
519 | 519 | ||
520 | private final List<PParameter> parameters = Arrays.asList(parameter_Comm); | 520 | private final List<PParameter> parameters = Arrays.asList(parameter_Comm); |
521 | 521 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/XAntennaGainNotMedium.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/XAntennaGainNotMedium.java index dbe6d26e..b50962c5 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/XAntennaGainNotMedium.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/XAntennaGainNotMedium.java | |||
@@ -3,7 +3,6 @@ | |||
3 | */ | 3 | */ |
4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; | 4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; |
5 | 5 | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem; | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemGainMedium; | 6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemGainMedium; |
8 | import java.util.Arrays; | 7 | import java.util.Arrays; |
9 | import java.util.Collection; | 8 | import java.util.Collection; |
@@ -44,6 +43,7 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; | |||
44 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; | 43 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; |
45 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; | 44 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; |
46 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; | 45 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; |
46 | import satellite.CommSubsystem; | ||
47 | 47 | ||
48 | /** | 48 | /** |
49 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. | 49 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. |
@@ -477,7 +477,7 @@ public final class XAntennaGainNotMedium extends BaseGeneratedEMFQuerySpecificat | |||
477 | 477 | ||
478 | @Override | 478 | @Override |
479 | public XAntennaGainNotMedium.Match newMatch(final Object... parameters) { | 479 | public XAntennaGainNotMedium.Match newMatch(final Object... parameters) { |
480 | return XAntennaGainNotMedium.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem) parameters[0]); | 480 | return XAntennaGainNotMedium.Match.newMatch((satellite.CommSubsystem) parameters[0]); |
481 | } | 481 | } |
482 | 482 | ||
483 | /** | 483 | /** |
@@ -509,7 +509,7 @@ public final class XAntennaGainNotMedium extends BaseGeneratedEMFQuerySpecificat | |||
509 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 509 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
510 | private static final XAntennaGainNotMedium.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 510 | private static final XAntennaGainNotMedium.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
511 | 511 | ||
512 | private final PParameter parameter_Comm = new PParameter("Comm", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); | 512 | private final PParameter parameter_Comm = new PParameter("Comm", "satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); |
513 | 513 | ||
514 | private final List<PParameter> parameters = Arrays.asList(parameter_Comm); | 514 | private final List<PParameter> parameters = Arrays.asList(parameter_Comm); |
515 | 515 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/AtLeastTwoInterferometryPayloads.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/AtLeastTwoInterferometryPayloads.java index d560ac93..58e7e183 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/AtLeastTwoInterferometryPayloads.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/AtLeastTwoInterferometryPayloads.java | |||
@@ -88,7 +88,7 @@ public final class AtLeastTwoInterferometryPayloads extends BaseGeneratedEMFQuer | |||
88 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 88 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
89 | private static final AtLeastTwoInterferometryPayloads.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 89 | private static final AtLeastTwoInterferometryPayloads.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
90 | 90 | ||
91 | private final PParameter parameter_Mission = new PParameter("Mission", "hu.bme.mit.inf.dslreasoner.domains.satellite.InterferometryMission", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "InterferometryMission")), PParameterDirection.INOUT); | 91 | private final PParameter parameter_Mission = new PParameter("Mission", "satellite.InterferometryMission", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "InterferometryMission")), PParameterDirection.INOUT); |
92 | 92 | ||
93 | private final List<PParameter> parameters = Arrays.asList(parameter_Mission); | 93 | private final List<PParameter> parameters = Arrays.asList(parameter_Mission); |
94 | 94 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemBand.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemBand.java index a0009587..609e0b93 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemBand.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemBand.java | |||
@@ -87,9 +87,9 @@ public final class CommSubsystemBand extends BaseGeneratedEMFQuerySpecificationW | |||
87 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 87 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
88 | private static final CommSubsystemBand.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 88 | private static final CommSubsystemBand.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
89 | 89 | ||
90 | private final PParameter parameter_Comm = new PParameter("Comm", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); | 90 | private final PParameter parameter_Comm = new PParameter("Comm", "satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); |
91 | 91 | ||
92 | private final PParameter parameter_Band = new PParameter("Band", "hu.bme.mit.inf.dslreasoner.domains.satellite.TransceiverBand", new EDataTypeInSlotsKey((EDataType)getClassifierLiteralSafe("http://www.example.org/satellite", "TransceiverBand")), PParameterDirection.INOUT); | 92 | private final PParameter parameter_Band = new PParameter("Band", "satellite.TransceiverBand", new EDataTypeInSlotsKey((EDataType)getClassifierLiteralSafe("http://www.example.org/satellite", "TransceiverBand")), PParameterDirection.INOUT); |
93 | 93 | ||
94 | private final List<PParameter> parameters = Arrays.asList(parameter_Comm, parameter_Band); | 94 | private final List<PParameter> parameters = Arrays.asList(parameter_Comm, parameter_Band); |
95 | 95 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemBandUhf.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemBandUhf.java index 51175ce3..bc25ea59 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemBandUhf.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemBandUhf.java | |||
@@ -88,7 +88,7 @@ public final class CommSubsystemBandUhf extends BaseGeneratedEMFQuerySpecificati | |||
88 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 88 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
89 | private static final CommSubsystemBandUhf.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 89 | private static final CommSubsystemBandUhf.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
90 | 90 | ||
91 | private final PParameter parameter_Comm = new PParameter("Comm", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); | 91 | private final PParameter parameter_Comm = new PParameter("Comm", "satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); |
92 | 92 | ||
93 | private final List<PParameter> parameters = Arrays.asList(parameter_Comm); | 93 | private final List<PParameter> parameters = Arrays.asList(parameter_Comm); |
94 | 94 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGain.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGain.java index e2e0e2a1..69793a96 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGain.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGain.java | |||
@@ -87,9 +87,9 @@ public final class CommSubsystemGain extends BaseGeneratedEMFQuerySpecificationW | |||
87 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 87 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
88 | private static final CommSubsystemGain.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 88 | private static final CommSubsystemGain.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
89 | 89 | ||
90 | private final PParameter parameter_Comm = new PParameter("Comm", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); | 90 | private final PParameter parameter_Comm = new PParameter("Comm", "satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); |
91 | 91 | ||
92 | private final PParameter parameter_Gain = new PParameter("Gain", "hu.bme.mit.inf.dslreasoner.domains.satellite.AntennaGain", new EDataTypeInSlotsKey((EDataType)getClassifierLiteralSafe("http://www.example.org/satellite", "AntennaGain")), PParameterDirection.INOUT); | 92 | private final PParameter parameter_Gain = new PParameter("Gain", "satellite.AntennaGain", new EDataTypeInSlotsKey((EDataType)getClassifierLiteralSafe("http://www.example.org/satellite", "AntennaGain")), PParameterDirection.INOUT); |
93 | 93 | ||
94 | private final List<PParameter> parameters = Arrays.asList(parameter_Comm, parameter_Gain); | 94 | private final List<PParameter> parameters = Arrays.asList(parameter_Comm, parameter_Gain); |
95 | 95 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGainLow.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGainLow.java index 04ee67da..fd24f163 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGainLow.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGainLow.java | |||
@@ -88,7 +88,7 @@ public final class CommSubsystemGainLow extends BaseGeneratedEMFQuerySpecificati | |||
88 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 88 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
89 | private static final CommSubsystemGainLow.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 89 | private static final CommSubsystemGainLow.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
90 | 90 | ||
91 | private final PParameter parameter_Comm = new PParameter("Comm", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); | 91 | private final PParameter parameter_Comm = new PParameter("Comm", "satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); |
92 | 92 | ||
93 | private final List<PParameter> parameters = Arrays.asList(parameter_Comm); | 93 | private final List<PParameter> parameters = Arrays.asList(parameter_Comm); |
94 | 94 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGainMedium.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGainMedium.java index 4b3bc03b..82b77bbc 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGainMedium.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGainMedium.java | |||
@@ -88,7 +88,7 @@ public final class CommSubsystemGainMedium extends BaseGeneratedEMFQuerySpecific | |||
88 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 88 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
89 | private static final CommSubsystemGainMedium.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 89 | private static final CommSubsystemGainMedium.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
90 | 90 | ||
91 | private final PParameter parameter_Comm = new PParameter("Comm", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); | 91 | private final PParameter parameter_Comm = new PParameter("Comm", "satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); |
92 | 92 | ||
93 | private final List<PParameter> parameters = Arrays.asList(parameter_Comm); | 93 | private final List<PParameter> parameters = Arrays.asList(parameter_Comm); |
94 | 94 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CubeSat3U.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CubeSat3U.java index fe789893..acc60475 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CubeSat3U.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CubeSat3U.java | |||
@@ -83,7 +83,7 @@ public final class CubeSat3U extends BaseGeneratedEMFQuerySpecificationWithGener | |||
83 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 83 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
84 | private static final CubeSat3U.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 84 | private static final CubeSat3U.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
85 | 85 | ||
86 | private final PParameter parameter_Sat = new PParameter("Sat", "hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat3U", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CubeSat3U")), PParameterDirection.INOUT); | 86 | private final PParameter parameter_Sat = new PParameter("Sat", "satellite.CubeSat3U", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CubeSat3U")), PParameterDirection.INOUT); |
87 | 87 | ||
88 | private final List<PParameter> parameters = Arrays.asList(parameter_Sat); | 88 | private final List<PParameter> parameters = Arrays.asList(parameter_Sat); |
89 | 89 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/DirectCommunicationLink.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/DirectCommunicationLink.java index d6f5c53b..a2123354 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/DirectCommunicationLink.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/DirectCommunicationLink.java | |||
@@ -88,9 +88,9 @@ public final class DirectCommunicationLink extends BaseGeneratedEMFQuerySpecific | |||
88 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 88 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
89 | private static final DirectCommunicationLink.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 89 | private static final DirectCommunicationLink.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
90 | 90 | ||
91 | private final PParameter parameter_Source = new PParameter("Source", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); | 91 | private final PParameter parameter_Source = new PParameter("Source", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); |
92 | 92 | ||
93 | private final PParameter parameter_Target = new PParameter("Target", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); | 93 | private final PParameter parameter_Target = new PParameter("Target", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); |
94 | 94 | ||
95 | private final List<PParameter> parameters = Arrays.asList(parameter_Source, parameter_Target); | 95 | private final List<PParameter> parameters = Arrays.asList(parameter_Source, parameter_Target); |
96 | 96 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/GroundStationNetwork.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/GroundStationNetwork.java index 93b1a01b..606cdfed 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/GroundStationNetwork.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/GroundStationNetwork.java | |||
@@ -83,7 +83,7 @@ public final class GroundStationNetwork extends BaseGeneratedEMFQuerySpecificati | |||
83 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 83 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
84 | private static final GroundStationNetwork.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 84 | private static final GroundStationNetwork.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
85 | 85 | ||
86 | private final PParameter parameter_Network = new PParameter("Network", "hu.bme.mit.inf.dslreasoner.domains.satellite.GroundStationNetwork", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "GroundStationNetwork")), PParameterDirection.INOUT); | 86 | private final PParameter parameter_Network = new PParameter("Network", "satellite.GroundStationNetwork", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "GroundStationNetwork")), PParameterDirection.INOUT); |
87 | 87 | ||
88 | private final List<PParameter> parameters = Arrays.asList(parameter_Network); | 88 | private final List<PParameter> parameters = Arrays.asList(parameter_Network); |
89 | 89 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IndirectCommunicationLink.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IndirectCommunicationLink.java index 6d5e475c..dee8a83c 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IndirectCommunicationLink.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IndirectCommunicationLink.java | |||
@@ -85,9 +85,9 @@ public final class IndirectCommunicationLink extends BaseGeneratedEMFQuerySpecif | |||
85 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 85 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
86 | private static final IndirectCommunicationLink.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 86 | private static final IndirectCommunicationLink.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
87 | 87 | ||
88 | private final PParameter parameter_Source = new PParameter("Source", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); | 88 | private final PParameter parameter_Source = new PParameter("Source", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); |
89 | 89 | ||
90 | private final PParameter parameter_Target = new PParameter("Target", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); | 90 | private final PParameter parameter_Target = new PParameter("Target", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); |
91 | 91 | ||
92 | private final List<PParameter> parameters = Arrays.asList(parameter_Source, parameter_Target); | 92 | private final List<PParameter> parameters = Arrays.asList(parameter_Source, parameter_Target); |
93 | 93 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IndirectLinkAllowed.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IndirectLinkAllowed.java index 27648bf3..31381a09 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IndirectLinkAllowed.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IndirectLinkAllowed.java | |||
@@ -85,9 +85,9 @@ public final class IndirectLinkAllowed extends BaseGeneratedEMFQuerySpecificatio | |||
85 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 85 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
86 | private static final IndirectLinkAllowed.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 86 | private static final IndirectLinkAllowed.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
87 | 87 | ||
88 | private final PParameter parameter_From = new PParameter("From", "hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); | 88 | private final PParameter parameter_From = new PParameter("From", "satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); |
89 | 89 | ||
90 | private final PParameter parameter_To = new PParameter("To", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); | 90 | private final PParameter parameter_To = new PParameter("To", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); |
91 | 91 | ||
92 | private final List<PParameter> parameters = Arrays.asList(parameter_From, parameter_To); | 92 | private final List<PParameter> parameters = Arrays.asList(parameter_From, parameter_To); |
93 | 93 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/LinkAllowed.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/LinkAllowed.java index e7529aa2..7118d657 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/LinkAllowed.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/LinkAllowed.java | |||
@@ -96,9 +96,9 @@ public final class LinkAllowed extends BaseGeneratedEMFQuerySpecificationWithGen | |||
96 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 96 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
97 | private static final LinkAllowed.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 97 | private static final LinkAllowed.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
98 | 98 | ||
99 | private final PParameter parameter_From = new PParameter("From", "hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); | 99 | private final PParameter parameter_From = new PParameter("From", "satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); |
100 | 100 | ||
101 | private final PParameter parameter_To = new PParameter("To", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); | 101 | private final PParameter parameter_To = new PParameter("To", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); |
102 | 102 | ||
103 | private final List<PParameter> parameters = Arrays.asList(parameter_From, parameter_To); | 103 | private final List<PParameter> parameters = Arrays.asList(parameter_From, parameter_To); |
104 | 104 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MatchingAntenna.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MatchingAntenna.java index b4f0d9e9..3a52ad1d 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MatchingAntenna.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MatchingAntenna.java | |||
@@ -90,11 +90,11 @@ public final class MatchingAntenna extends BaseGeneratedEMFQuerySpecificationWit | |||
90 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 90 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
91 | private static final MatchingAntenna.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 91 | private static final MatchingAntenna.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
92 | 92 | ||
93 | private final PParameter parameter_From = new PParameter("From", "hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); | 93 | private final PParameter parameter_From = new PParameter("From", "satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); |
94 | 94 | ||
95 | private final PParameter parameter_To = new PParameter("To", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); | 95 | private final PParameter parameter_To = new PParameter("To", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); |
96 | 96 | ||
97 | private final PParameter parameter_Band = new PParameter("Band", "hu.bme.mit.inf.dslreasoner.domains.satellite.TransceiverBand", new EDataTypeInSlotsKey((EDataType)getClassifierLiteralSafe("http://www.example.org/satellite", "TransceiverBand")), PParameterDirection.INOUT); | 97 | private final PParameter parameter_Band = new PParameter("Band", "satellite.TransceiverBand", new EDataTypeInSlotsKey((EDataType)getClassifierLiteralSafe("http://www.example.org/satellite", "TransceiverBand")), PParameterDirection.INOUT); |
98 | 98 | ||
99 | private final List<PParameter> parameters = Arrays.asList(parameter_From, parameter_To, parameter_Band); | 99 | private final List<PParameter> parameters = Arrays.asList(parameter_From, parameter_To, parameter_Band); |
100 | 100 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SatelliteQueriesAll.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SatelliteQueriesAll.java index 36fa4557..591215cd 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SatelliteQueriesAll.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SatelliteQueriesAll.java | |||
@@ -3,12 +3,13 @@ | |||
3 | */ | 3 | */ |
4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal; | 4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal; |
5 | 5 | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement; | 6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkOfElement; |
7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLoop; | 7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLoop; |
8 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CubeSatWithKaAntenna; | 8 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CubeSatWithKaAntenna; |
9 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetBand; | 9 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetBand; |
10 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetGain; | 10 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetGain; |
11 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.KaAntennaGainLow; | 11 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.KaAntennaGainLow; |
12 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.MultipleCommunicationLinks; | ||
12 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoLinkToGroundStation; | 13 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoLinkToGroundStation; |
13 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoPotentialLinkToGroundStation; | 14 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoPotentialLinkToGroundStation; |
14 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NotEnoughInterferometryPayloads; | 15 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NotEnoughInterferometryPayloads; |
@@ -39,7 +40,8 @@ import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; | |||
39 | * <p>A private group that includes private patterns as well. Only intended use case is for pattern testing. | 40 | * <p>A private group that includes private patterns as well. Only intended use case is for pattern testing. |
40 | * | 41 | * |
41 | * <p> From package hu.bme.mit.inf.dslreasoner.domains.satellite.queries, the group contains the definition of the following patterns: <ul> | 42 | * <p> From package hu.bme.mit.inf.dslreasoner.domains.satellite.queries, the group contains the definition of the following patterns: <ul> |
42 | * <li>communicationLinkDoesNotStartAtContainingElement</li> | 43 | * <li>multipleCommunicationLinks</li> |
44 | * <li>communicationLinkOfElement</li> | ||
43 | * <li>notEnoughInterferometryPayloads</li> | 45 | * <li>notEnoughInterferometryPayloads</li> |
44 | * <li>atLeastTwoInterferometryPayloads</li> | 46 | * <li>atLeastTwoInterferometryPayloads</li> |
45 | * <li>spacecraftWithInterferometryPayload</li> | 47 | * <li>spacecraftWithInterferometryPayload</li> |
@@ -91,7 +93,8 @@ public final class SatelliteQueriesAll extends BaseGeneratedPatternGroup { | |||
91 | private static SatelliteQueriesAll INSTANCE; | 93 | private static SatelliteQueriesAll INSTANCE; |
92 | 94 | ||
93 | private SatelliteQueriesAll() { | 95 | private SatelliteQueriesAll() { |
94 | querySpecifications.add(CommunicationLinkDoesNotStartAtContainingElement.instance()); | 96 | querySpecifications.add(MultipleCommunicationLinks.instance()); |
97 | querySpecifications.add(CommunicationLinkOfElement.instance()); | ||
95 | querySpecifications.add(NotEnoughInterferometryPayloads.instance()); | 98 | querySpecifications.add(NotEnoughInterferometryPayloads.instance()); |
96 | querySpecifications.add(AtLeastTwoInterferometryPayloads.instance()); | 99 | querySpecifications.add(AtLeastTwoInterferometryPayloads.instance()); |
97 | querySpecifications.add(SpacecraftWithInterferometryPayload.instance()); | 100 | querySpecifications.add(SpacecraftWithInterferometryPayload.instance()); |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftWithInterferometryPayload.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftWithInterferometryPayload.java index f8e6ca4f..9566c4c5 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftWithInterferometryPayload.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftWithInterferometryPayload.java | |||
@@ -87,9 +87,9 @@ public final class SpacecraftWithInterferometryPayload extends BaseGeneratedEMFQ | |||
87 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | 87 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { |
88 | private static final SpacecraftWithInterferometryPayload.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | 88 | private static final SpacecraftWithInterferometryPayload.GeneratedPQuery INSTANCE = new GeneratedPQuery(); |
89 | 89 | ||
90 | private final PParameter parameter_Mission = new PParameter("Mission", "hu.bme.mit.inf.dslreasoner.domains.satellite.ConstellationMission", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "ConstellationMission")), PParameterDirection.INOUT); | 90 | private final PParameter parameter_Mission = new PParameter("Mission", "satellite.ConstellationMission", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "ConstellationMission")), PParameterDirection.INOUT); |
91 | 91 | ||
92 | private final PParameter parameter_Spacecraft = new PParameter("Spacecraft", "hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); | 92 | private final PParameter parameter_Spacecraft = new PParameter("Spacecraft", "satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); |
93 | 93 | ||
94 | private final List<PParameter> parameters = Arrays.asList(parameter_Mission, parameter_Spacecraft); | 94 | private final List<PParameter> parameters = Arrays.asList(parameter_Mission, parameter_Spacecraft); |
95 | 95 | ||