mirror of
https://github.com/eMoflon/emoflon-neo.git
synced 2024-05-21 04:00:37 +00:00
Bugfix: Rule Scheduler should filter rules based on non-negative IDs
This commit is contained in:
parent
08fee98e09
commit
f7ae57ceff
|
@ -7,7 +7,7 @@ import org.emoflon.neo.cypher.models.*;
|
|||
public class API_Common {
|
||||
// Default values (might have to be changed)
|
||||
public static final String PLATFORM_PLUGIN_URI = "/C:/Program Files/Eclipse/eclipse-for-java-and-dsl-developers/plugins/";
|
||||
public static final String NEOCORE_URI_INSTALLED = "/C:/Program Files/Eclipse/eclipse-for-java-and-dsl-developers/plugins/org.emoflon.neo.neocore_1.0.0.202210011604/";
|
||||
public static final String NEOCORE_URI_INSTALLED = "/C:/Program Files/Eclipse/eclipse-for-java-and-dsl-developers/plugins/org.emoflon.neo.neocore_1.0.0.202211241827/";
|
||||
public static final String PLATFORM_RESOURCE_URI = "../";
|
||||
|
||||
public static NeoCoreBuilder createBuilder() {
|
||||
|
|
|
@ -175,6 +175,7 @@ public class ModelIntegrationOperationalStrategy extends ILPBasedOperationalStra
|
|||
var filteredRulesToMatches = new HashMap<IRule<NeoMatch, NeoCoMatch>, Collection<NeoMatch>>();
|
||||
var allRulesToMatches = super.selectMatches(matchContainer, progressMonitor);
|
||||
determineCreateDeltaElements();
|
||||
Collection<Long> createDeltaElementsWithPositiveIds = createDeltaElements.stream().map(e -> Math.abs(e)).toList();
|
||||
|
||||
for (IRule<NeoMatch,NeoCoMatch> r : allRulesToMatches.keySet()) {
|
||||
// No CO rule
|
||||
|
@ -183,7 +184,7 @@ public class ModelIntegrationOperationalStrategy extends ILPBasedOperationalStra
|
|||
else {
|
||||
filteredRulesToMatches.put(r, new HashSet<NeoMatch>());
|
||||
for (NeoMatch m : allRulesToMatches.get(r))
|
||||
if (m.getElements().stream().filter(e -> createDeltaElements.contains(e)).findAny().isPresent())
|
||||
if (m.getElements().stream().filter(e -> createDeltaElementsWithPositiveIds.contains(e)).findAny().isPresent())
|
||||
filteredRulesToMatches.get(r).add(m);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue