diff options
Diffstat (limited to 'subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchResultProvider.java')
-rw-r--r-- | subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchResultProvider.java | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchResultProvider.java b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchResultProvider.java new file mode 100644 index 00000000..a3017b18 --- /dev/null +++ b/subprojects/viatra-runtime-localsearch/src/main/java/tools/refinery/viatra/runtime/localsearch/matcher/integration/LocalSearchResultProvider.java | |||
@@ -0,0 +1,56 @@ | |||
1 | /******************************************************************************* | ||
2 | * Copyright (c) 2010-2015, Marton Bur, Zoltan Ujhelyi, 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.localsearch.matcher.integration; | ||
10 | |||
11 | import tools.refinery.viatra.runtime.localsearch.plan.IPlanProvider; | ||
12 | import tools.refinery.viatra.runtime.localsearch.planner.compiler.EMFOperationCompiler; | ||
13 | import tools.refinery.viatra.runtime.localsearch.planner.compiler.IOperationCompiler; | ||
14 | import tools.refinery.viatra.runtime.matchers.ViatraQueryRuntimeException; | ||
15 | import tools.refinery.viatra.runtime.matchers.backend.QueryEvaluationHint; | ||
16 | import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext; | ||
17 | import tools.refinery.viatra.runtime.matchers.context.IndexingService; | ||
18 | import tools.refinery.viatra.runtime.matchers.psystem.queries.PQuery; | ||
19 | |||
20 | /** | ||
21 | * @author Marton Bur, Zoltan Ujhelyi | ||
22 | * | ||
23 | */ | ||
24 | public class LocalSearchResultProvider extends AbstractLocalSearchResultProvider { | ||
25 | |||
26 | /** | ||
27 | * @throws ViatraQueryRuntimeException | ||
28 | * @since 1.5 | ||
29 | */ | ||
30 | public LocalSearchResultProvider(LocalSearchBackend backend, IQueryBackendContext context, PQuery query, | ||
31 | IPlanProvider planProvider) { | ||
32 | this(backend, context, query, planProvider, null); | ||
33 | } | ||
34 | |||
35 | /** | ||
36 | * @throws ViatraQueryRuntimeException | ||
37 | * @since 1.5 | ||
38 | */ | ||
39 | public LocalSearchResultProvider(LocalSearchBackend backend, IQueryBackendContext context, PQuery query, | ||
40 | IPlanProvider planProvider, QueryEvaluationHint userHints) { | ||
41 | super(backend, context, query, planProvider, userHints); | ||
42 | } | ||
43 | |||
44 | @Override | ||
45 | protected void indexInitializationBeforePlanning() { | ||
46 | super.indexInitializationBeforePlanning(); | ||
47 | |||
48 | indexReferredTypesOfQuery(query, IndexingService.STATISTICS); | ||
49 | } | ||
50 | |||
51 | @Override | ||
52 | protected IOperationCompiler getOperationCompiler(IQueryBackendContext backendContext, | ||
53 | LocalSearchHints configuration) { | ||
54 | return new EMFOperationCompiler(runtimeContext, configuration.isUseBase()); | ||
55 | } | ||
56 | } | ||