diff options
Diffstat (limited to 'subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/CompiledQuery.java')
-rw-r--r-- | subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/CompiledQuery.java | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/CompiledQuery.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/CompiledQuery.java new file mode 100644 index 00000000..b8c793c5 --- /dev/null +++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/traceability/CompiledQuery.java | |||
@@ -0,0 +1,54 @@ | |||
1 | /******************************************************************************* | ||
2 | * Copyright (c) 2010-2014, Bergmann Gabor, Istvan Rath and Daniel Varro | ||
3 | * This program and the accompanying materials are made available under the | ||
4 | * terms of the Eclipse Public License v. 2.0 which is available at | ||
5 | * http://www.eclipse.org/legal/epl-v20.html. | ||
6 | * | ||
7 | * SPDX-License-Identifier: EPL-2.0 | ||
8 | *******************************************************************************/ | ||
9 | package tools.refinery.viatra.runtime.rete.traceability; | ||
10 | |||
11 | import java.util.Map; | ||
12 | |||
13 | import tools.refinery.viatra.runtime.matchers.psystem.PBody; | ||
14 | import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery; | ||
15 | import tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe; | ||
16 | |||
17 | /** | ||
18 | * Indicates that recipe expresses the finished match set of a query. | ||
19 | * @author Bergmann Gabor | ||
20 | * @noinstantiate This class is not intended to be instantiated by clients. | ||
21 | */ | ||
22 | public class CompiledQuery extends RecipeTraceInfo implements | ||
23 | PatternTraceInfo { | ||
24 | |||
25 | private PQuery query; | ||
26 | private final Map<PBody, ? extends RecipeTraceInfo> parentRecipeTracesPerBody; | ||
27 | |||
28 | /** | ||
29 | * @since 1.6 | ||
30 | */ | ||
31 | public CompiledQuery(ReteNodeRecipe recipe, | ||
32 | Map<PBody, ? extends RecipeTraceInfo> parentRecipeTraces, | ||
33 | PQuery query) { | ||
34 | super(recipe, parentRecipeTraces.values()); | ||
35 | parentRecipeTracesPerBody = parentRecipeTraces; | ||
36 | this.query = query; | ||
37 | } | ||
38 | public PQuery getQuery() { | ||
39 | return query; | ||
40 | } | ||
41 | |||
42 | @Override | ||
43 | public String getPatternName() { | ||
44 | return query.getFullyQualifiedName(); | ||
45 | } | ||
46 | |||
47 | /** | ||
48 | * @since 1.6 | ||
49 | */ | ||
50 | public Map<PBody, ? extends RecipeTraceInfo> getParentRecipeTracesPerBody() { | ||
51 | return parentRecipeTracesPerBody; | ||
52 | } | ||
53 | |||
54 | } | ||