diff options
author | 2019-08-01 18:38:15 +0200 | |
---|---|---|
committer | 2019-08-01 18:38:15 +0200 | |
commit | 6eb760ee960cd3efe51ca6e4107153c09838a1da (patch) | |
tree | 2edd0e21be50265f65f0cfd2fd43f18a252aef02 /Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/LocalSearchEngineManager.java | |
parent | Dump required Xbase version down to 2.17 (diff) | |
download | VIATRA-Generator-6eb760ee960cd3efe51ca6e4107153c09838a1da.tar.gz VIATRA-Generator-6eb760ee960cd3efe51ca6e4107153c09838a1da.tar.zst VIATRA-Generator-6eb760ee960cd3efe51ca6e4107153c09838a1da.zip |
Clean up CPS and Satellite domains
Diffstat (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/LocalSearchEngineManager.java')
-rw-r--r-- | Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/LocalSearchEngineManager.java | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/LocalSearchEngineManager.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/LocalSearchEngineManager.java deleted file mode 100644 index 18708a37..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/LocalSearchEngineManager.java +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo; | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SatelliteQueries; | ||
4 | import java.util.WeakHashMap; | ||
5 | import java.util.function.Function; | ||
6 | import org.eclipse.emf.ecore.EObject; | ||
7 | import org.eclipse.viatra.query.runtime.api.AdvancedViatraQueryEngine; | ||
8 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; | ||
9 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngineOptions; | ||
10 | import org.eclipse.viatra.query.runtime.emf.EMFScope; | ||
11 | import org.eclipse.viatra.query.runtime.localsearch.matcher.integration.LocalSearchHints; | ||
12 | import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; | ||
13 | |||
14 | @SuppressWarnings("all") | ||
15 | public class LocalSearchEngineManager { | ||
16 | public static final LocalSearchEngineManager INSTANCE = new LocalSearchEngineManager(); | ||
17 | |||
18 | private final WeakHashMap<EObject, ViatraQueryEngine> engineMap = new WeakHashMap<EObject, ViatraQueryEngine>(); | ||
19 | |||
20 | private LocalSearchEngineManager() { | ||
21 | } | ||
22 | |||
23 | public ViatraQueryEngine getEngine(final EObject eObject) { | ||
24 | final Function<EObject, ViatraQueryEngine> _function = (EObject it) -> { | ||
25 | ViatraQueryEngine _xblockexpression = null; | ||
26 | { | ||
27 | final EMFScope scope = new EMFScope(it); | ||
28 | final QueryEvaluationHint localSearchHints = LocalSearchHints.getDefault().build(); | ||
29 | final ViatraQueryEngineOptions options = ViatraQueryEngineOptions.defineOptions().withDefaultHint(localSearchHints).withDefaultBackend( | ||
30 | localSearchHints.getQueryBackendFactory()).build(); | ||
31 | final ViatraQueryEngine engine = AdvancedViatraQueryEngine.on(scope, options); | ||
32 | SatelliteQueries.instance().prepare(engine); | ||
33 | _xblockexpression = engine; | ||
34 | } | ||
35 | return _xblockexpression; | ||
36 | }; | ||
37 | return this.engineMap.computeIfAbsent(eObject, _function); | ||
38 | } | ||
39 | } | ||