def transform_record(self, pid, record, links_factory=None, **kwargs): """Transform record into an intermediate representation.""" series = super().transform_record(pid, record, links_factory=links_factory, **kwargs) format_login_required_urls(series["metadata"].get("access_urls", [])) field_cover_metadata(series["metadata"]) return series
def transform_search_hit( self, pid, record_hit, links_factory=None, **kwargs ): """Transform search result hit into an intermediate representation.""" hit = super().transform_search_hit( pid, record_hit, links_factory=links_factory, **kwargs ) field_is_overdue(hit["metadata"]) field_cover_metadata(hit["metadata"].get("document", {})) return hit
def transform_record(self, pid, record, links_factory=None, **kwargs): """Transform record into an intermediate representation.""" literature = super().transform_record( pid, record, links_factory=links_factory, **kwargs ) eitems = literature["metadata"].get("eitems", {}).get("hits", []) for eitem in eitems: format_login_required_urls(eitem) field_cover_metadata(literature["metadata"]) return literature
def transform_record(self, pid, record, links_factory=None, **kwargs): """Transform record into an intermediate representation.""" loan = super().transform_record( pid, record, links_factory=links_factory, **kwargs ) field_is_overdue(loan["metadata"]) field_pickup_location(loan["metadata"]) field_transaction_location(loan["metadata"]) field_transaction_user(loan["metadata"]) field_cover_metadata(loan["metadata"].get("document", {})) return loan
def transform_search_hit( self, pid, record_hit, links_factory=None, **kwargs ): """Transform search result hit into an intermediate representation.""" hit = super().transform_search_hit( pid, record_hit, links_factory=links_factory, **kwargs ) eitems = hit["metadata"].get("eitems", {}).get("hits", []) for eitem in eitems: format_login_required_urls(eitem) field_cover_metadata(hit["metadata"]) return hit