Skip to content

Commit

Permalink
Merge pull request #7 from aleksandr-isaev/master
Browse files Browse the repository at this point in the history
more bug fixes in linkage algorithm and fix to data-umea issue
  • Loading branch information
aldearle authored Oct 2, 2024
2 parents 092aa06 + d0970f2 commit 05b2365
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 177 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ public class Query {
private static final String BM_GROOM_MARRIAGE_EXISTS_QUERY = "MATCH (a:Birth)-[r:SIBLING { actors: \"Child-Groom\" }]-(b:Marriage) WHERE a.STANDARDISED_ID = $standard_id_from AND b.STANDARDISED_ID = $standard_id_to AND r.provenance = $prov RETURN r";
private static final String BM_BRIDE_MARRIAGE_EXISTS_QUERY = "MATCH (a:Birth)-[r:SIBLING { actors: \"Child-Bride\" }]-(b:Marriage) WHERE a.STANDARDISED_ID = $standard_id_from AND b.STANDARDISED_ID = $standard_id_to AND r.provenance = $prov RETURN r";

private static final String MM_BRIDE_BRIDE_EXISTS_QUERY = "MATCH (a:Marriage)-[r:SIBLING { actors: \"Bride-Bride\" }]-(b:Marriage) WHERE a.STANDARDISED_ID = $standard_id_from AND b.STANDARDISED_ID = $standard_id_to AND r.provenance = $prov RETURN r";
private static final String MM_GROOM_GROOM_EXISTS_QUERY = "MATCH (a:Marriage)-[r:SIBLING { actors: \"Groom-Groom\" }]-(b:Marriage) WHERE a.STANDARDISED_ID = $standard_id_from AND b.STANDARDISED_ID = $standard_id_to AND r.provenance = $prov RETURN r";
private static final String MM_BRIDE_BRIDE_EXISTS_QUERY = "MATCH (a:Marriage)-[r:ID { actors: \"Bride-Bride\" }]-(b:Marriage) WHERE a.STANDARDISED_ID = $standard_id_from AND b.STANDARDISED_ID = $standard_id_to AND r.provenance = $prov RETURN r";
private static final String MM_GROOM_GROOM_EXISTS_QUERY = "MATCH (a:Marriage)-[r:ID { actors: \"Groom-Groom\" }]-(b:Marriage) WHERE a.STANDARDISED_ID = $standard_id_from AND b.STANDARDISED_ID = $standard_id_to AND r.provenance = $prov RETURN r";

private static final String DM_DECEASED_BRIDE_EXISTS_QUERY = "MATCH (a:Death)-[r:SIBLING { actors: \"Deceased-Bride\" }]-(b:Marriage) WHERE a.STANDARDISED_ID = $standard_id_from AND b.STANDARDISED_ID = $standard_id_to AND r.provenance = $prov RETURN r";
private static final String DM_DECEASED_GROOM_EXISTS_QUERY = "MATCH (a:Death)-[r:SIBLING { actors: \"Deceased-Groom\" }]-(b:Marriage) WHERE a.STANDARDISED_ID = $standard_id_from AND b.STANDARDISED_ID = $standard_id_to AND r.provenance = $prov RETURN r";
Expand Down Expand Up @@ -237,7 +237,7 @@ public static void createMMGroomBrideSiblingReference(NeoDbCypherBridge bridge,
* See createReference for param details
*/
public static void createMMBrideGroomSiblingReference(NeoDbCypherBridge bridge, String standard_id_from, String standard_id_to, String provenance, int fields_populated, double distance) {
createReference(bridge, MM_GB_SIBLING_QUERY, standard_id_to, standard_id_from, provenance, fields_populated, distance);
createReference(bridge, MM_GB_SIBLING_QUERY, standard_id_from, standard_id_to, provenance, fields_populated, distance);
}

/**
Expand Down Expand Up @@ -365,43 +365,43 @@ public static boolean MMGroomBrideSiblingReferenceExists(NeoDbCypherBridge bridg
}

public static boolean MMBrideGroomSiblingReferenceExists(NeoDbCypherBridge bridge, String standard_id_from, String standard_id_to, String provenance) {
return linkExists( bridge, MM_GB_SIBLING_EXISTS_QUERY, standard_id_to, standard_id_from, provenance );
return linkExists( bridge, MM_GB_SIBLING_EXISTS_QUERY, standard_id_from, standard_id_to, provenance );
}

public static boolean DBSiblingReferenceExists(NeoDbCypherBridge bridge, String standard_id_from, String standard_id_to, String provenance) {
return linkExists( bridge, DB_SIBLING_EXISTS_QUERY, standard_id_to, standard_id_from, provenance );
return linkExists( bridge, DB_SIBLING_EXISTS_QUERY, standard_id_from, standard_id_to, provenance );
}

public static boolean MMGroomMarriageParentsMarriageReferenceExists(NeoDbCypherBridge bridge, String standard_id_from, String standard_id_to, String provenance) {
return linkExists( bridge, MM_GROOM_MARRIAGE_EXISTS_QUERY, standard_id_to, standard_id_from, provenance );
return linkExists( bridge, MM_GROOM_MARRIAGE_EXISTS_QUERY, standard_id_from, standard_id_to, provenance );
}

public static boolean MMBrideMarriageParentsMarriageReferenceExists(NeoDbCypherBridge bridge, String standard_id_from, String standard_id_to, String provenance) {
return linkExists( bridge, MM_BRIDE_MARRIAGE_EXISTS_QUERY, standard_id_to, standard_id_from, provenance );
return linkExists( bridge, MM_BRIDE_MARRIAGE_EXISTS_QUERY, standard_id_from, standard_id_to, provenance );
}

public static boolean BMGroomSiblingReferenceExists(NeoDbCypherBridge bridge, String standard_id_from, String standard_id_to, String provenance ){
return linkExists(bridge, BM_GROOM_MARRIAGE_EXISTS_QUERY, standard_id_to, standard_id_from, provenance);
return linkExists(bridge, BM_GROOM_MARRIAGE_EXISTS_QUERY, standard_id_from, standard_id_to, provenance );
}

public static boolean BMBrideSiblingReferenceExists(NeoDbCypherBridge bridge, String standard_id_from, String standard_id_to, String provenance ) {
return linkExists( bridge, BM_BRIDE_MARRIAGE_EXISTS_QUERY, standard_id_to, standard_id_from, provenance );
return linkExists( bridge, BM_BRIDE_MARRIAGE_EXISTS_QUERY, standard_id_from, standard_id_to, provenance );
}

public static boolean MMBrideBrideIdReferenceExists(NeoDbCypherBridge bridge, String standard_id_from, String standard_id_to, String provenance ) {
return linkExists( bridge, MM_BRIDE_BRIDE_EXISTS_QUERY, standard_id_to, standard_id_from, provenance );
return linkExists( bridge, MM_BRIDE_BRIDE_EXISTS_QUERY, standard_id_from, standard_id_to, provenance );
}

public static boolean MMGroomGroomIdReferenceExists(NeoDbCypherBridge bridge, String standard_id_from, String standard_id_to, String provenance ) {
return linkExists( bridge, MM_GROOM_GROOM_EXISTS_QUERY, standard_id_to, standard_id_from, provenance );
return linkExists( bridge, MM_GROOM_GROOM_EXISTS_QUERY, standard_id_from, standard_id_to, provenance );
}

public static boolean DMBrideSiblingReferenceExists(NeoDbCypherBridge bridge, String standard_id_from, String standard_id_to, String provenance ) {
return linkExists( bridge, DM_DECEASED_BRIDE_EXISTS_QUERY, standard_id_to, standard_id_from, provenance );
return linkExists( bridge, DM_DECEASED_BRIDE_EXISTS_QUERY, standard_id_from, standard_id_to, provenance );
}

public static boolean DMGroomSiblingReferenceExists(NeoDbCypherBridge bridge, String standard_id_from, String standard_id_to, String provenance ) {
return linkExists( bridge, DM_DECEASED_GROOM_EXISTS_QUERY, standard_id_to, standard_id_from, provenance );
return linkExists( bridge, DM_DECEASED_GROOM_EXISTS_QUERY, standard_id_from, standard_id_to, provenance );
}

public static List<String> getAllLinkQueries(){
Expand Down

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions src/main/scripts/install/setup_umea_in_storr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
export MAVEN_OPTS="-Xmx16G"

echo "Creating indices"
mvn exec:java -q -Dexec.cleanupDaemonThreads=false -Dexec.mainClass="uk.ac.standrews.cs.population_linkage.helpers.CreateIndices" -e
java -cp ~/Documents/GitHub/data-umea-1.0-SNAPSHOT-jar-with-dependencies.jar uk.ac.standrews.cs.data.umea.store.CreateIndices

echo "Loading event records"
mvn exec:java -q -Dexec.cleanupDaemonThreads=false -Dexec.mainClass="uk.ac.standrews.cs.population_linkage.helpers.ImportUmeaRecordsToStore" -e
java -cp ~/Documents/GitHub/data-umea-1.0-SNAPSHOT-jar-with-dependencies.jar uk.ac.standrews.cs.data.umea.store.ImportUmeaRecordsToStore

0 comments on commit 05b2365

Please sign in to comment.