Add function(s) to process _RELS_EXT.rdf
tyt3 opened this issue · comments
This is a bit complicated because, ideally, 'collection_id' would be in all digital item-level base layer CSV, rather than a separate CSV.
In data_layer_config.py:
DIGITAL_ITEM_RDF_MAP = {
'collection_id': {'bs_exp':['Description > isMemberOfCollection[rdf:resource]',]}
}
For example of RELS_EXT file, see pitt_31735047439256_RELS-EXT.rdf.
Modify if statement block to include 'collection_id' in extract_base_layer.py
:
if u == 'copyright_status':
# looks for attribute value and handles exception if no attribute
results = bs_object.select(exp)
try:
field_data += results[0]['copyright.status']
except:
field_data += ''