Exemplo n.º 1
0
 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
Exemplo n.º 2
0
 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
Exemplo n.º 3
0
 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
Exemplo n.º 4
0
 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
Exemplo n.º 5
0
 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