Open kimakan opened 1 year ago
In order to provide the size of the downloadable file linked in the datalink table, we could add the Size entry into the oai metadata created from the datalink table. For now, the size is not provided at all, although it's already contained in the datalink table as content_length. https://github.com/django-daiquiri/daiquiri/blob/f6f352ac46c877209bb176d391f97079326e01f5/daiquiri/oai/adapter.py#L248-L254
Size
content_length
Possible solution:
elif semantics == '#this': datalink['formats'].append(content_type) datalink['size'].append(f"{content_length} bytes") datalink['related_identifiers'].append({ 'related_identifier': access_url, 'related_identifier_type': 'URL', 'relation_type': 'IsDescribedBy' })
A problem arises if there are more than one entry with the semantic #this for the same ID in the datalink table. It's a very common scenario where the object is represented by several files. It's still not clear how to handle this.
#this
In order to provide the size of the downloadable file linked in the datalink table, we could add the
Size
entry into the oai metadata created from the datalink table. For now, the size is not provided at all, although it's already contained in the datalink table ascontent_length
. https://github.com/django-daiquiri/daiquiri/blob/f6f352ac46c877209bb176d391f97079326e01f5/daiquiri/oai/adapter.py#L248-L254Possible solution:
A problem arises if there are more than one entry with the semantic
#this
for the same ID in the datalink table. It's a very common scenario where the object is represented by several files. It's still not clear how to handle this.