From e4a1aa97bc46c1c99a5c22a158ce4296c4198578 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Fri, 2 Sep 2016 17:22:11 +0300 Subject: [PATCH] Add notes for 2016-09-02 --- content/2016-09.md | 77 +++++++++++++++++++ public/2016-09/index.html | 88 ++++++++++++++++++++++ public/images/2016/09/ilri-ldap-users.png | Bin 0 -> 10162 bytes public/index.html | 2 +- public/index.xml | 88 ++++++++++++++++++++++ public/tags/notes/index.html | 2 +- public/tags/notes/index.xml | 88 ++++++++++++++++++++++ static/images/2016/09/ilri-ldap-users.png | Bin 0 -> 10162 bytes 8 files changed, 343 insertions(+), 2 deletions(-) create mode 100644 public/images/2016/09/ilri-ldap-users.png create mode 100644 static/images/2016/09/ilri-ldap-users.png diff --git a/content/2016-09.md b/content/2016-09.md index 47fd79508..c3ba59294 100644 --- a/content/2016-09.md +++ b/content/2016-09.md @@ -24,6 +24,10 @@ distinguishedName: CN=Last\, First (ILRI),OU=ILRI Kenya Employees,OU=ILRI Kenya, distinguishedName: CN=Last\, First (ILRI),OU=ILRI Ethiopia Employees,OU=ILRI Ethiopia,DC=ILRI,DC=CGIARAD,DC=ORG ``` +- Changing the DSpace LDAP config to use `OU=ILRIHUB` seems to work: + +![DSpace groups based on LDAP DN](../images/2016/09/ilri-ldap-users.png) + - Notes for local PostgreSQL database recreation from production snapshot: ``` @@ -35,3 +39,76 @@ $ psql dspacetest -c 'alter user dspacetest nocreateuser;' $ psql -U dspacetest -f ~/src/git/DSpace/dspace/etc/postgres/update-sequences.sql dspacetest -h localhost $ vacuumdb dspacetest ``` + +- Some names that I thought I fixed in July seem not to be: + +``` +dspacetest=# select distinct text_value, authority, confidence from metadatavalue where metadata_field_id=3 and resource_type_id=2 and text_value like 'Poole, %'; + text_value | authority | confidence +-----------------------+--------------------------------------+------------ + Poole, Elizabeth Jane | b6efa27f-8829-4b92-80fe-bc63e03e3ccb | 600 + Poole, Elizabeth Jane | 41628f42-fc38-4b38-b473-93aec9196326 | 600 + Poole, Elizabeth Jane | 83b82da0-f652-4ebc-babc-591af1697919 | 600 + Poole, Elizabeth Jane | c3a22456-8d6a-41f9-bba0-de51ef564d45 | 600 + Poole, E.J. | c3a22456-8d6a-41f9-bba0-de51ef564d45 | 600 + Poole, E.J. | 0fbd91b9-1b71-4504-8828-e26885bf8b84 | 600 +(6 rows) +``` + +- At least a few of these actually have the correct ORCID, but I will unify the authority to be c3a22456-8d6a-41f9-bba0-de51ef564d45 + +``` +dspacetest=# update metadatavalue set authority='c3a22456-8d6a-41f9-bba0-de51ef564d45', confidence=600 where metadata_field_id=3 and resource_type_id=2 and text_value like 'Poole, %'; +UPDATE 69 +``` +- And for Peter Ballantyne: + +``` +dspacetest=# select distinct text_value, authority, confidence from metadatavalue where metadata_field_id=3 and resource_type_id=2 and text_value like 'Ballantyne, %'; + text_value | authority | confidence +-------------------+--------------------------------------+------------ + Ballantyne, Peter | 2dcbcc7b-47b0-4fd7-bef9-39d554494081 | 600 + Ballantyne, Peter | 4f04ca06-9a76-4206-bd9c-917ca75d278e | 600 + Ballantyne, P.G. | 4f04ca06-9a76-4206-bd9c-917ca75d278e | 600 + Ballantyne, Peter | ba5f205b-b78b-43e5-8e80-0c9a1e1ad2ca | 600 + Ballantyne, Peter | 20f21160-414c-4ecf-89ca-5f2cb64e75c1 | 600 +(5 rows) +``` + +- Again, a few have the correct ORCID, but there should only be one authority... + +``` +dspacetest=# update metadatavalue set authority='4f04ca06-9a76-4206-bd9c-917ca75d278e', confidence=600 where metadata_field_id=3 and resource_type_id=2 and text_value like 'Ballantyne, %'; +UPDATE 58 +``` + +- And for me: + +``` +dspacetest=# select distinct text_value, authority, confidence from metadatavalue where metadata_field_id=3 and resource_type_id=2 and text_value like 'Orth, A%'; + text_value | authority | confidence +------------+--------------------------------------+------------ + Orth, Alan | 4884def0-4d7e-4256-9dd4-018cd60a5871 | 600 + Orth, A. | 4884def0-4d7e-4256-9dd4-018cd60a5871 | 600 + Orth, A. | 1a1943a0-3f87-402f-9afe-e52fb46a513e | 600 +(3 rows) +dspacetest=# update metadatavalue set authority='1a1943a0-3f87-402f-9afe-e52fb46a513e', confidence=600 where metadata_field_id=3 and resource_type_id=2 and text_value like 'Orth, %'; +UPDATE 11 +``` + +- And for CCAFS author Bruce Campbell that I had discussed with CCAFS earlier this week: + +``` +dspacetest=# update metadatavalue set authority='0e414b4c-4671-4a23-b570-6077aca647d8', confidence=600 where metadata_field_id=3 and resource_type_id=2 and text_value like 'Campbell, B%'; +UPDATE 166 +dspacetest=# select distinct text_value, authority, confidence from metadatavalue where metadata_field_id=3 and resource_type_id=2 and text_value like 'Campbell, B%'; + text_value | authority | confidence +------------------------+--------------------------------------+------------ + Campbell, Bruce | 0e414b4c-4671-4a23-b570-6077aca647d8 | 600 + Campbell, Bruce Morgan | 0e414b4c-4671-4a23-b570-6077aca647d8 | 600 + Campbell, B. | 0e414b4c-4671-4a23-b570-6077aca647d8 | 600 + Campbell, B.M. | 0e414b4c-4671-4a23-b570-6077aca647d8 | 600 +(4 rows) +``` + +- After updating the Authority indexes (`bin/dspace index-authority`) everything looks good diff --git a/public/2016-09/index.html b/public/2016-09/index.html index a4ac16a46..ff9c03d50 100644 --- a/public/2016-09/index.html +++ b/public/2016-09/index.html @@ -99,6 +99,12 @@ distinguishedName: CN=Last\, First (ILRI),OU=ILRI Ethiopia Employees,OU=ILRI Ethiopia,DC=ILRI,DC=CGIARAD,DC=ORG + + +

DSpace groups based on LDAP DN

+ @@ -112,6 +118,88 @@ $ psql -U dspacetest -f ~/src/git/DSpace/dspace/etc/postgres/update-sequences.sq $ vacuumdb dspacetest + + +
dspacetest=# select distinct text_value, authority, confidence from metadatavalue where metadata_field_id=3 and resource_type_id=2 and text_value like 'Poole, %';
+      text_value       |              authority               | confidence
+-----------------------+--------------------------------------+------------
+ Poole, Elizabeth Jane | b6efa27f-8829-4b92-80fe-bc63e03e3ccb |        600
+ Poole, Elizabeth Jane | 41628f42-fc38-4b38-b473-93aec9196326 |        600
+ Poole, Elizabeth Jane | 83b82da0-f652-4ebc-babc-591af1697919 |        600
+ Poole, Elizabeth Jane | c3a22456-8d6a-41f9-bba0-de51ef564d45 |        600
+ Poole, E.J.           | c3a22456-8d6a-41f9-bba0-de51ef564d45 |        600
+ Poole, E.J.           | 0fbd91b9-1b71-4504-8828-e26885bf8b84 |        600
+(6 rows)
+
+ + + +
dspacetest=# update metadatavalue set authority='c3a22456-8d6a-41f9-bba0-de51ef564d45', confidence=600 where metadata_field_id=3 and resource_type_id=2 and text_value like 'Poole, %';
+UPDATE 69
+
+ + + +
dspacetest=# select distinct text_value, authority, confidence from metadatavalue where metadata_field_id=3 and resource_type_id=2 and text_value like 'Ballantyne, %';
+    text_value     |              authority               | confidence
+-------------------+--------------------------------------+------------
+ Ballantyne, Peter | 2dcbcc7b-47b0-4fd7-bef9-39d554494081 |        600
+ Ballantyne, Peter | 4f04ca06-9a76-4206-bd9c-917ca75d278e |        600
+ Ballantyne, P.G.  | 4f04ca06-9a76-4206-bd9c-917ca75d278e |        600
+ Ballantyne, Peter | ba5f205b-b78b-43e5-8e80-0c9a1e1ad2ca |        600
+ Ballantyne, Peter | 20f21160-414c-4ecf-89ca-5f2cb64e75c1 |        600
+(5 rows)
+
+ + + +
dspacetest=# update metadatavalue set authority='4f04ca06-9a76-4206-bd9c-917ca75d278e', confidence=600 where metadata_field_id=3 and resource_type_id=2 and text_value like 'Ballantyne, %';
+UPDATE 58
+
+ + + +
dspacetest=# select distinct text_value, authority, confidence from metadatavalue where metadata_field_id=3 and resource_type_id=2 and text_value like 'Orth, A%';
+ text_value |              authority               | confidence
+------------+--------------------------------------+------------
+ Orth, Alan | 4884def0-4d7e-4256-9dd4-018cd60a5871 |        600
+ Orth, A.   | 4884def0-4d7e-4256-9dd4-018cd60a5871 |        600
+ Orth, A.   | 1a1943a0-3f87-402f-9afe-e52fb46a513e |        600
+(3 rows)
+dspacetest=# update metadatavalue set authority='1a1943a0-3f87-402f-9afe-e52fb46a513e', confidence=600 where metadata_field_id=3 and resource_type_id=2 and text_value like 'Orth, %';
+UPDATE 11
+
+ + + +
dspacetest=# update metadatavalue set authority='0e414b4c-4671-4a23-b570-6077aca647d8', confidence=600 where metadata_field_id=3 and resource_type_id=2 and text_value like 'Campbell, B%';
+UPDATE 166
+dspacetest=# select distinct text_value, authority, confidence from metadatavalue where metadata_field_id=3 and resource_type_id=2 and text_value like 'Campbell, B%';
+       text_value       |              authority               | confidence
+------------------------+--------------------------------------+------------
+ Campbell, Bruce        | 0e414b4c-4671-4a23-b570-6077aca647d8 |        600
+ Campbell, Bruce Morgan | 0e414b4c-4671-4a23-b570-6077aca647d8 |        600
+ Campbell, B.           | 0e414b4c-4671-4a23-b570-6077aca647d8 |        600
+ Campbell, B.M.         | 0e414b4c-4671-4a23-b570-6077aca647d8 |        600
+(4 rows)
+
+ + +