@@ -60,7 +60,7 @@ def string_compare(str1, str2):
60
60
"""
61
61
Compare two strings
62
62
"""
63
- logging .debug ("string_compare: %s ---- %s" , str1 , str2 )
63
+ logging .debug ("%s ---- %s" , str1 , str2 )
64
64
return str1 == str2
65
65
66
66
@@ -98,7 +98,7 @@ def string_compare_ignore_whitespace(str1, str2):
98
98
else :
99
99
ret = regex .sub ("" , str (str1 )) == regex .sub ("" , str (str2 ))
100
100
logging .debug (
101
- "string_compare_ignore_whitespace: %s ---- %s %s" ,
101
+ "%s ---- %s %s" ,
102
102
str (str1 ),
103
103
str (str2 ),
104
104
str (ret ),
@@ -111,7 +111,7 @@ def member_of_list_compare(list1, list2):
111
111
"""
112
112
Compare two lists
113
113
"""
114
- logging .debug ("member_of_list_compare: %s ---- %s" , list1 , list2 )
114
+ logging .debug ("%s ---- %s" , list1 , list2 )
115
115
return list1 == list2
116
116
117
117
@@ -147,13 +147,18 @@ def collection_parent_compare(list1, list2):
147
147
logging .debug ("%s ---- %s" , list1 , list2 )
148
148
149
149
# list 1 is nan if item not in Jupiter
150
- list1 = "[]" if isinstance (list1 , str ) is False else list1
150
+ list1 = "['']" if isinstance (list1 , str ) is False else list1
151
+
152
+ logging .debug ("%s ---- %s" , list1 , list2 )
151
153
152
154
list1_collection_ids = list (
153
155
path .split ("/" )[1 ]
154
156
for path in utils .convert_string_to_json (list1 )
155
157
if path and isinstance (list1 , str )
156
158
)
159
+
160
+ logging .debug ("%s ---- %s" , list1_collection_ids , list2 )
161
+
157
162
return list1_collection_ids == utils .convert_string_list_representation_to_list (
158
163
list2
159
164
)
@@ -179,7 +184,7 @@ def language_compare(list1, list2):
179
184
"http://id.loc.gov/vocabulary/iso639-2/zxx" : "No linguistic content" ,
180
185
"http://terms.library.ualberta.ca/other" : "other" ,
181
186
}
182
- logging .debug ("member_of_list_compare: %s ---- %s" , list1 , list2 )
187
+ logging .debug ("%s ---- %s" , list1 , list2 )
183
188
conversion_result = list (
184
189
easy_language_mapping [language ]
185
190
for language in utils .convert_string_list_representation_to_list (list1 )
@@ -347,7 +352,7 @@ def special_type_compare(row, key, value):
347
352
"dspace" : ["provenance.ual.jupiterId.item" , "bitstream.sequenceId" ],
348
353
},
349
354
"label_column" : "item.name" ,
350
- "identifier" : {"jupiter" : "provenance.ual.jupiterId. item" , "dspace" : "item.uuid" },
355
+ "identifier" : {"jupiter" : "item.id " , "dspace" : "item.uuid" },
351
356
"last_modified" : {"jupiter" : "created_at" , "dspace" : None },
352
357
"comparison_types" : {
353
358
"name" : {
@@ -371,7 +376,7 @@ def special_type_compare(row, key, value):
371
376
"parent_item_id" : {
372
377
"columns" : {
373
378
"jupiter" : "provenance.ual.jupiterId.item_jupiter" ,
374
- "dspace" : "provenance.ual.jupiterId.item_jupiter " ,
379
+ "dspace" : "provenance.ual.jupiterId.item_dspace " ,
375
380
},
376
381
"comparison_function" : string_compare ,
377
382
},
@@ -423,11 +428,11 @@ def special_type_compare(row, key, value):
423
428
},
424
429
"dc.title" : {
425
430
"columns" : {"jupiter" : "title" , "dspace" : "metadata.dc.title" },
426
- "comparison_function" : string_compare ,
431
+ "comparison_function" : value_in_string_list_compare ,
427
432
},
428
433
"dc.contributor.author" : {
429
434
"columns" : {
430
- "jupiter" : "creators" "" ,
435
+ "jupiter" : "creators" ,
431
436
"dspace" : "metadata.dc.contributor.author" ,
432
437
},
433
438
"comparison_function" : string_lists_compare ,
@@ -439,6 +444,13 @@ def special_type_compare(row, key, value):
439
444
},
440
445
"comparison_function" : string_lists_compare ,
441
446
},
447
+ "dc.creator" : {
448
+ "columns" : {
449
+ "jupiter" : "creators" ,
450
+ "dspace" : "metadata.dc.creator" ,
451
+ },
452
+ "comparison_function" : string_lists_compare ,
453
+ },
442
454
"dc.type" : {
443
455
"columns" : {
444
456
"jupiter" : ["item_type" , "publication_status" ],
@@ -584,13 +596,13 @@ def process_input(
584
596
]
585
597
}
586
598
)
587
- if comparison_config ["identifier" ]["dspace " ] is not None :
599
+ if comparison_config ["identifier" ]["jupiter " ] is not None :
588
600
comparison_output .update (
589
- {"dspace_id " : row [comparison_config ["identifier" ]["dspace " ]]}
601
+ {"jupiter_id " : row [comparison_config ["identifier" ]["jupiter " ]]}
590
602
)
591
- if comparison_config ["identifier" ]["jupiter " ] is not None :
603
+ if comparison_config ["identifier" ]["dspace " ] is not None :
592
604
comparison_output .update (
593
- {"jupiter_id " : row [comparison_config ["identifier" ]["dspace" ]]}
605
+ {"dspace_id " : row [comparison_config ["identifier" ]["dspace" ]]}
594
606
)
595
607
comparison_output .update (
596
608
process_row (row , comparison_config ["comparison_types" ])
0 commit comments