-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: prevent duplicate IDs when processing existing identifiers
When processing identifiers that already exist in the triplestore, the system was creating new IDs instead of reusing the existing ones. This was causing duplicate IDs for the same identifier, particularly noticeable when merging venues that were previously unconnected. The fix modifies the __update_id_count method to check if an identifier already exists in the triplestore before creating a new ID. If the identifier exists, its existing MetaID is reused instead of generating a new one. This ensures that: - Existing identifiers maintain their original MetaIDs - No duplicate IDs are created for the same identifier - The system properly handles cases where venues need to be merged through common identifiers
- Loading branch information
arcangelo7
committed
Jan 22, 2025
1 parent
1e7b14a
commit 88d5b57
Showing
7 changed files
with
258 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
ISC License (ISC) | ||
================================== | ||
# ISC License (ISC) | ||
|
||
_Copyright 2019 Silvio Peroni <[email protected]>_ | ||
_Copyright 2019-2020 Fabio Mariani <[email protected]>_ | ||
_Copyright 2021 Simone Persiani <[email protected]>_ | ||
_Copyright 2021-2022 Arcangelo Massari <[email protected]>_ | ||
_Copyright 2021-2025 Arcangelo Massari <[email protected]>_ | ||
|
||
Permission to use, copy, modify, and/or distribute this software for any purpose with or | ||
without fee is hereby granted, provided that the above copyright notice and this permission | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
"id","meta" | ||
"doi:10.1001/jamapediatrics.2016.0073","060101" | ||
"doi:2","060102" | ||
"doi:10.1001/jamainternmed.2016.1384","0601" | ||
"doi:10.1001/jamainternmed.2016.1384","060103" | ||
"doi:10.1001/jama.2016.4932","060301" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
"id","meta" | ||
"doi:10.1123/ijatt.2015-0070","06011" | ||
"doi:10.1001/jama.2016.4932","060301" | ||
"doi:10.1001/jamapediatrics.2016.0073","0601" | ||
"doi:10.1001/jamapediatrics.2016.0073","060101" |
4 changes: 2 additions & 2 deletions
4
test/testcases/testcase_data/indices/15.2/index_id_ra_15.2.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
"id","meta" | ||
"orcid:0000-0003-0530-4305","0602" | ||
"crossref:1111","0603" | ||
"orcid:0000-0003-0530-4305","0601" | ||
"crossref:1111","0602" |