aboutsummaryrefslogtreecommitdiffstats
path: root/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/XAntennaGainNotMedium.java
diff options
context:
space:
mode:
Diffstat (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/XAntennaGainNotMedium.java')
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/XAntennaGainNotMedium.java570
1 files changed, 570 insertions, 0 deletions
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
new file mode 100644
index 00000000..dbe6d26e
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/XAntennaGainNotMedium.java
@@ -0,0 +1,570 @@
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 */
4package hu.bme.mit.inf.dslreasoner.domains.satellite.queries;
5
6import hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem;
7import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemGainMedium;
8import java.util.Arrays;
9import java.util.Collection;
10import java.util.LinkedHashSet;
11import java.util.List;
12import java.util.Objects;
13import java.util.Optional;
14import java.util.Set;
15import java.util.function.Consumer;
16import java.util.stream.Collectors;
17import java.util.stream.Stream;
18import org.apache.log4j.Logger;
19import org.eclipse.emf.ecore.EClass;
20import org.eclipse.emf.ecore.EDataType;
21import org.eclipse.viatra.query.runtime.api.IPatternMatch;
22import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
24import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
25import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
26import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
27import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
28import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
29import org.eclipse.viatra.query.runtime.emf.types.EDataTypeInSlotsKey;
30import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
31import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
32import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
33import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
34import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
35import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
36import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
37import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
38import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall;
39import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.ConstantValue;
40import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
41import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
42import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
43import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
44import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
45import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
46import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
47
48/**
49 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
50 *
51 * <p>Original source:
52 * <code><pre>
53 * // X-band transmitters may only be combined with a medium gain antenna
54 *
55 * {@literal @}Constraint(severity = "error", key = {Comm},
56 * message = "X-band transceiver must be combined with a medium gain antenna.")
57 * pattern xAntennaGainNotMedium(Comm : CommSubsystem) {
58 * CommSubsystem.band(Comm, TransceiverBand::X);
59 * neg find commSubsystemGainMedium(Comm);
60 * }
61 * </pre></code>
62 *
63 * @see Matcher
64 * @see Match
65 *
66 */
67@SuppressWarnings("all")
68public final class XAntennaGainNotMedium extends BaseGeneratedEMFQuerySpecification<XAntennaGainNotMedium.Matcher> {
69 /**
70 * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.satellite.queries.xAntennaGainNotMedium pattern,
71 * to be used in conjunction with {@link Matcher}.
72 *
73 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
74 * Each instance is a (possibly partial) substitution of pattern parameters,
75 * usable to represent a match of the pattern in the result of a query,
76 * or to specify the bound (fixed) input parameters when issuing a query.
77 *
78 * @see Matcher
79 *
80 */
81 public static abstract class Match extends BasePatternMatch {
82 private CommSubsystem fComm;
83
84 private static List<String> parameterNames = makeImmutableList("Comm");
85
86 private Match(final CommSubsystem pComm) {
87 this.fComm = pComm;
88 }
89
90 @Override
91 public Object get(final String parameterName) {
92 if ("Comm".equals(parameterName)) return this.fComm;
93 return null;
94 }
95
96 public CommSubsystem getComm() {
97 return this.fComm;
98 }
99
100 @Override
101 public boolean set(final String parameterName, final Object newValue) {
102 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
103 if ("Comm".equals(parameterName) ) {
104 this.fComm = (CommSubsystem) newValue;
105 return true;
106 }
107 return false;
108 }
109
110 public void setComm(final CommSubsystem pComm) {
111 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
112 this.fComm = pComm;
113 }
114
115 @Override
116 public String patternName() {
117 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.xAntennaGainNotMedium";
118 }
119
120 @Override
121 public List<String> parameterNames() {
122 return XAntennaGainNotMedium.Match.parameterNames;
123 }
124
125 @Override
126 public Object[] toArray() {
127 return new Object[]{fComm};
128 }
129
130 @Override
131 public XAntennaGainNotMedium.Match toImmutable() {
132 return isMutable() ? newMatch(fComm) : this;
133 }
134
135 @Override
136 public String prettyPrint() {
137 StringBuilder result = new StringBuilder();
138 result.append("\"Comm\"=" + prettyPrintValue(fComm));
139 return result.toString();
140 }
141
142 @Override
143 public int hashCode() {
144 return Objects.hash(fComm);
145 }
146
147 @Override
148 public boolean equals(final Object obj) {
149 if (this == obj)
150 return true;
151 if (obj == null) {
152 return false;
153 }
154 if ((obj instanceof XAntennaGainNotMedium.Match)) {
155 XAntennaGainNotMedium.Match other = (XAntennaGainNotMedium.Match) obj;
156 return Objects.equals(fComm, other.fComm);
157 } else {
158 // this should be infrequent
159 if (!(obj instanceof IPatternMatch)) {
160 return false;
161 }
162 IPatternMatch otherSig = (IPatternMatch) obj;
163 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
164 }
165 }
166
167 @Override
168 public XAntennaGainNotMedium specification() {
169 return XAntennaGainNotMedium.instance();
170 }
171
172 /**
173 * Returns an empty, mutable match.
174 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
175 *
176 * @return the empty match.
177 *
178 */
179 public static XAntennaGainNotMedium.Match newEmptyMatch() {
180 return new Mutable(null);
181 }
182
183 /**
184 * Returns a mutable (partial) match.
185 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
186 *
187 * @param pComm the fixed value of pattern parameter Comm, or null if not bound.
188 * @return the new, mutable (partial) match object.
189 *
190 */
191 public static XAntennaGainNotMedium.Match newMutableMatch(final CommSubsystem pComm) {
192 return new Mutable(pComm);
193 }
194
195 /**
196 * Returns a new (partial) match.
197 * This can be used e.g. to call the matcher with a partial match.
198 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
199 * @param pComm the fixed value of pattern parameter Comm, or null if not bound.
200 * @return the (partial) match object.
201 *
202 */
203 public static XAntennaGainNotMedium.Match newMatch(final CommSubsystem pComm) {
204 return new Immutable(pComm);
205 }
206
207 private static final class Mutable extends XAntennaGainNotMedium.Match {
208 Mutable(final CommSubsystem pComm) {
209 super(pComm);
210 }
211
212 @Override
213 public boolean isMutable() {
214 return true;
215 }
216 }
217
218 private static final class Immutable extends XAntennaGainNotMedium.Match {
219 Immutable(final CommSubsystem pComm) {
220 super(pComm);
221 }
222
223 @Override
224 public boolean isMutable() {
225 return false;
226 }
227 }
228 }
229
230 /**
231 * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.satellite.queries.xAntennaGainNotMedium pattern,
232 * providing pattern-specific query methods.
233 *
234 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
235 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
236 *
237 * <p>Matches of the pattern will be represented as {@link Match}.
238 *
239 * <p>Original source:
240 * <code><pre>
241 * // X-band transmitters may only be combined with a medium gain antenna
242 *
243 * {@literal @}Constraint(severity = "error", key = {Comm},
244 * message = "X-band transceiver must be combined with a medium gain antenna.")
245 * pattern xAntennaGainNotMedium(Comm : CommSubsystem) {
246 * CommSubsystem.band(Comm, TransceiverBand::X);
247 * neg find commSubsystemGainMedium(Comm);
248 * }
249 * </pre></code>
250 *
251 * @see Match
252 * @see XAntennaGainNotMedium
253 *
254 */
255 public static class Matcher extends BaseMatcher<XAntennaGainNotMedium.Match> {
256 /**
257 * Initializes the pattern matcher within an existing VIATRA Query engine.
258 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
259 *
260 * @param engine the existing VIATRA Query engine in which this matcher will be created.
261 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
262 *
263 */
264 public static XAntennaGainNotMedium.Matcher on(final ViatraQueryEngine engine) {
265 // check if matcher already exists
266 Matcher matcher = engine.getExistingMatcher(querySpecification());
267 if (matcher == null) {
268 matcher = (Matcher)engine.getMatcher(querySpecification());
269 }
270 return matcher;
271 }
272
273 /**
274 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
275 * @return an initialized matcher
276 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
277 *
278 */
279 public static XAntennaGainNotMedium.Matcher create() {
280 return new Matcher();
281 }
282
283 private static final int POSITION_COMM = 0;
284
285 private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(XAntennaGainNotMedium.Matcher.class);
286
287 /**
288 * Initializes the pattern matcher within an existing VIATRA Query engine.
289 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
290 *
291 * @param engine the existing VIATRA Query engine in which this matcher will be created.
292 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
293 *
294 */
295 private Matcher() {
296 super(querySpecification());
297 }
298
299 /**
300 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
301 * @param pComm the fixed value of pattern parameter Comm, or null if not bound.
302 * @return matches represented as a Match object.
303 *
304 */
305 public Collection<XAntennaGainNotMedium.Match> getAllMatches(final CommSubsystem pComm) {
306 return rawStreamAllMatches(new Object[]{pComm}).collect(Collectors.toSet());
307 }
308
309 /**
310 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
311 * </p>
312 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
313 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
314 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
315 * @param pComm the fixed value of pattern parameter Comm, or null if not bound.
316 * @return a stream of matches represented as a Match object.
317 *
318 */
319 public Stream<XAntennaGainNotMedium.Match> streamAllMatches(final CommSubsystem pComm) {
320 return rawStreamAllMatches(new Object[]{pComm});
321 }
322
323 /**
324 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
325 * Neither determinism nor randomness of selection is guaranteed.
326 * @param pComm the fixed value of pattern parameter Comm, or null if not bound.
327 * @return a match represented as a Match object, or null if no match is found.
328 *
329 */
330 public Optional<XAntennaGainNotMedium.Match> getOneArbitraryMatch(final CommSubsystem pComm) {
331 return rawGetOneArbitraryMatch(new Object[]{pComm});
332 }
333
334 /**
335 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
336 * under any possible substitution of the unspecified parameters (if any).
337 * @param pComm the fixed value of pattern parameter Comm, or null if not bound.
338 * @return true if the input is a valid (partial) match of the pattern.
339 *
340 */
341 public boolean hasMatch(final CommSubsystem pComm) {
342 return rawHasMatch(new Object[]{pComm});
343 }
344
345 /**
346 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
347 * @param pComm the fixed value of pattern parameter Comm, or null if not bound.
348 * @return the number of pattern matches found.
349 *
350 */
351 public int countMatches(final CommSubsystem pComm) {
352 return rawCountMatches(new Object[]{pComm});
353 }
354
355 /**
356 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
357 * Neither determinism nor randomness of selection is guaranteed.
358 * @param pComm the fixed value of pattern parameter Comm, or null if not bound.
359 * @param processor the action that will process the selected match.
360 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
361 *
362 */
363 public boolean forOneArbitraryMatch(final CommSubsystem pComm, final Consumer<? super XAntennaGainNotMedium.Match> processor) {
364 return rawForOneArbitraryMatch(new Object[]{pComm}, processor);
365 }
366
367 /**
368 * Returns a new (partial) match.
369 * This can be used e.g. to call the matcher with a partial match.
370 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
371 * @param pComm the fixed value of pattern parameter Comm, or null if not bound.
372 * @return the (partial) match object.
373 *
374 */
375 public XAntennaGainNotMedium.Match newMatch(final CommSubsystem pComm) {
376 return XAntennaGainNotMedium.Match.newMatch(pComm);
377 }
378
379 /**
380 * Retrieve the set of values that occur in matches for Comm.
381 * @return the Set of all values or empty set if there are no matches
382 *
383 */
384 protected Stream<CommSubsystem> rawStreamAllValuesOfComm(final Object[] parameters) {
385 return rawStreamAllValues(POSITION_COMM, parameters).map(CommSubsystem.class::cast);
386 }
387
388 /**
389 * Retrieve the set of values that occur in matches for Comm.
390 * @return the Set of all values or empty set if there are no matches
391 *
392 */
393 public Set<CommSubsystem> getAllValuesOfComm() {
394 return rawStreamAllValuesOfComm(emptyArray()).collect(Collectors.toSet());
395 }
396
397 /**
398 * Retrieve the set of values that occur in matches for Comm.
399 * @return the Set of all values or empty set if there are no matches
400 *
401 */
402 public Stream<CommSubsystem> streamAllValuesOfComm() {
403 return rawStreamAllValuesOfComm(emptyArray());
404 }
405
406 @Override
407 protected XAntennaGainNotMedium.Match tupleToMatch(final Tuple t) {
408 try {
409 return XAntennaGainNotMedium.Match.newMatch((CommSubsystem) t.get(POSITION_COMM));
410 } catch(ClassCastException e) {
411 LOGGER.error("Element(s) in tuple not properly typed!",e);
412 return null;
413 }
414 }
415
416 @Override
417 protected XAntennaGainNotMedium.Match arrayToMatch(final Object[] match) {
418 try {
419 return XAntennaGainNotMedium.Match.newMatch((CommSubsystem) match[POSITION_COMM]);
420 } catch(ClassCastException e) {
421 LOGGER.error("Element(s) in array not properly typed!",e);
422 return null;
423 }
424 }
425
426 @Override
427 protected XAntennaGainNotMedium.Match arrayToMatchMutable(final Object[] match) {
428 try {
429 return XAntennaGainNotMedium.Match.newMutableMatch((CommSubsystem) match[POSITION_COMM]);
430 } catch(ClassCastException e) {
431 LOGGER.error("Element(s) in array not properly typed!",e);
432 return null;
433 }
434 }
435
436 /**
437 * @return the singleton instance of the query specification of this pattern
438 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
439 *
440 */
441 public static IQuerySpecification<XAntennaGainNotMedium.Matcher> querySpecification() {
442 return XAntennaGainNotMedium.instance();
443 }
444 }
445
446 private XAntennaGainNotMedium() {
447 super(GeneratedPQuery.INSTANCE);
448 }
449
450 /**
451 * @return the singleton instance of the query specification
452 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
453 *
454 */
455 public static XAntennaGainNotMedium instance() {
456 try{
457 return LazyHolder.INSTANCE;
458 } catch (ExceptionInInitializerError err) {
459 throw processInitializerError(err);
460 }
461 }
462
463 @Override
464 protected XAntennaGainNotMedium.Matcher instantiate(final ViatraQueryEngine engine) {
465 return XAntennaGainNotMedium.Matcher.on(engine);
466 }
467
468 @Override
469 public XAntennaGainNotMedium.Matcher instantiate() {
470 return XAntennaGainNotMedium.Matcher.create();
471 }
472
473 @Override
474 public XAntennaGainNotMedium.Match newEmptyMatch() {
475 return XAntennaGainNotMedium.Match.newEmptyMatch();
476 }
477
478 @Override
479 public XAntennaGainNotMedium.Match newMatch(final Object... parameters) {
480 return XAntennaGainNotMedium.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem) parameters[0]);
481 }
482
483 /**
484 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.XAntennaGainNotMedium (visibility: PUBLIC, simpleName: XAntennaGainNotMedium, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.XAntennaGainNotMedium, 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
485 * <b>not</b> at the class load time of the outer class,
486 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.XAntennaGainNotMedium (visibility: PUBLIC, simpleName: XAntennaGainNotMedium, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.XAntennaGainNotMedium, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
487 *
488 * <p> This workaround is required e.g. to support recursion.
489 *
490 */
491 private static class LazyHolder {
492 private static final XAntennaGainNotMedium INSTANCE = new XAntennaGainNotMedium();
493
494 /**
495 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
496 * This initialization order is required to support indirect recursion.
497 *
498 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
499 *
500 */
501 private static final Object STATIC_INITIALIZER = ensureInitialized();
502
503 public static Object ensureInitialized() {
504 INSTANCE.ensureInitializedInternal();
505 return null;
506 }
507 }
508
509 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
510 private static final XAntennaGainNotMedium.GeneratedPQuery INSTANCE = new GeneratedPQuery();
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);
513
514 private final List<PParameter> parameters = Arrays.asList(parameter_Comm);
515
516 private GeneratedPQuery() {
517 super(PVisibility.PUBLIC);
518 }
519
520 @Override
521 public String getFullyQualifiedName() {
522 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.xAntennaGainNotMedium";
523 }
524
525 @Override
526 public List<String> getParameterNames() {
527 return Arrays.asList("Comm");
528 }
529
530 @Override
531 public List<PParameter> getParameters() {
532 return parameters;
533 }
534
535 @Override
536 public Set<PBody> doGetContainedBodies() {
537 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
538 Set<PBody> bodies = new LinkedHashSet<>();
539 {
540 PBody body = new PBody(this);
541 PVariable var_Comm = body.getOrCreateVariableByName("Comm");
542 new TypeConstraint(body, Tuples.flatTupleOf(var_Comm), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem")));
543 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
544 new ExportedParameter(body, var_Comm, parameter_Comm)
545 ));
546 // CommSubsystem.band(Comm, TransceiverBand::X)
547 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
548 new ConstantValue(body, var__virtual_0_, getEnumLiteral("http://www.example.org/satellite", "TransceiverBand", "X").getInstance());
549 new TypeConstraint(body, Tuples.flatTupleOf(var_Comm), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem")));
550 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
551 new TypeConstraint(body, Tuples.flatTupleOf(var_Comm, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommSubsystem", "band")));
552 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.example.org/satellite", "TransceiverBand")));
553 new Equality(body, var__virtual_1_, var__virtual_0_);
554 // neg find commSubsystemGainMedium(Comm)
555 new NegativePatternCall(body, Tuples.flatTupleOf(var_Comm), CommSubsystemGainMedium.instance().getInternalQueryRepresentation());
556 bodies.add(body);
557 }
558 {
559 PAnnotation annotation = new PAnnotation("Constraint");
560 annotation.addAttribute("severity", "error");
561 annotation.addAttribute("key", Arrays.asList(new Object[] {
562 new ParameterReference("Comm")
563 }));
564 annotation.addAttribute("message", "X-band transceiver must be combined with a medium gain antenna.");
565 addAnnotation(annotation);
566 }
567 return bodies;
568 }
569 }
570}