When an article has more than one OA location, we need to decide which is the most current, authoritative version, which is first in oa_locations and is called the best_oa_location.
Each location is assigned a sort score based on:
- host_type: "publisher" is better than "repository".
- version: "publishedVersion" is better than "acceptedVersion", which is better than "submittedVersion".
- url_for_pdf: A location with a direct PDF link is better than one without.
- for repository locations, evidence: A repository record matched by DOI is better than one matched by title.
- repository rankings: Some major repositories like PubMed Central and arXiv are ranked above others.
These attributes are compared and treated as a series of tiebreakers, producing an ordered list of locations.