Skip to content

Commit

Permalink
Update handling of superordinate links (RPB-184, RPB-239)
Browse files Browse the repository at this point in the history
- Include new external records (`f...`) in RPB-ID pattern
- Turn any URLs into relative links, not just lobid-resources URLs
  • Loading branch information
fsteeg committed Feb 4, 2025
1 parent 90c8999 commit 0f6e678
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/TableRow.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ String[] refAndLabel(String property, String value,
if ((property.equals("containedIn") || property.equals("hasPart")
|| property.equals("isPartOf") || property.equals("hasSuperordinate")
|| property.equals("bibliographicCitation")) && value.contains("lobid.org")) {
return new String[] { value.matches(".*?[as]\\d+.*|.*?\\d{3}[a-z]\\d+.*") // rpbId
? value.replace("https://lobid.org/resources/", "/")
return new String[] { value.matches(".*?[asf]\\d+.*|.*?\\d{3}[a-z]\\d+.*") // rpbId
? value.replaceAll("http.+/", "/") // full URL -> relative link
: value, Lobid.resourceLabel(value) };
}
String label =
Expand Down

0 comments on commit 0f6e678

Please sign in to comment.