From fa07b7fef332147345702a22077ea805ed56b0c7 Mon Sep 17 00:00:00 2001 From: Martin Scharm Date: Wed, 12 Jul 2017 21:39:52 +0200 Subject: [PATCH] fixing the query to gather missing diffs fixes https://github.com/SemsProject/masymos-diff/issues/4 --- .../de/unirostock/sems/masymos/diff/DiffGatherTask.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/unirostock/sems/masymos/diff/DiffGatherTask.java b/src/main/java/de/unirostock/sems/masymos/diff/DiffGatherTask.java index b239ae8..567259c 100644 --- a/src/main/java/de/unirostock/sems/masymos/diff/DiffGatherTask.java +++ b/src/main/java/de/unirostock/sems/masymos/diff/DiffGatherTask.java @@ -126,13 +126,13 @@ protected Set getDocumentsWithoutDiff(long limit, String typ parameter.put("limit", limit); // do filtering - String query = "Match (a:DOCUMENT)-[:HAS_SUCCESSOR]->(b:DOCUMENT) Where NOT (a)-->(:DIFF)-->(b) and (a)-->(:MODEL) and (b)-->(:MODEL) Return a,b Limit {limit}"; + String query = "Match (a:DOCUMENT)-[:HAS_SUCCESSOR]->(b:DOCUMENT) Where NOT (a)-->(:DIFF)<--(b) and (a)-->(:MODEL) and (b)-->(:MODEL) Return a,b Limit {limit}"; if( Property.ModelType.CELLML.equals(typeFilter) ) { - query = "Match (a:DOCUMENT)-[:HAS_SUCCESSOR]->(b:DOCUMENT) Where NOT (a)-->(:DIFF)-->(b) and (a)-->(:CELLML_MODEL) and (b)-->(:CELLML_MODEL) Return a,b Limit {limit}"; + query = "Match (a:DOCUMENT)-[:HAS_SUCCESSOR]->(b:DOCUMENT) Where NOT (a)-->(:DIFF)<--(b) and (a)-->(:CELLML_MODEL) and (b)-->(:CELLML_MODEL) Return a,b Limit {limit}"; log.debug("restrict to CELLML models"); } else if( Property.ModelType.SBML.equals(typeFilter) ) { - query = "Match (a:DOCUMENT)-[:HAS_SUCCESSOR]->(b:DOCUMENT) Where NOT (a)-->(:DIFF)-->(b) and (a)-->(:SBML_MODEL) and (b)-->(:SBML_MODEL) Return a,b Limit {limit}"; + query = "Match (a:DOCUMENT)-[:HAS_SUCCESSOR]->(b:DOCUMENT) Where NOT (a)-->(:DIFF)<--(b) and (a)-->(:SBML_MODEL) and (b)-->(:SBML_MODEL) Return a,b Limit {limit}"; log.debug("restrict to SBML models"); }