Skip to content

Commit

Permalink
Add describedBy.source to details view (RPB-38)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsteeg committed Nov 16, 2023
1 parent 79384a7 commit d56e8fb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/models/AuthorityResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,11 @@ private void addRest(List<Pair<String, String>> fields) {
case ARRAY:
addArray(key, Lists.newArrayList(node.elements()), fields);
break;
case OBJECT:
if (key.equals("describedBy")) {
addValues("source", Lists.newArrayList(node.get("source").elements()).stream().map(JsonNode::asText).collect(Collectors.toList()), fields);
break;
}
default:
Logger.warn("Unexpected JsonNodeType for: {}", node);
break;
Expand Down
1 change: 1 addition & 0 deletions app/models/GndOntology.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public class GndOntology {
put("type", "Entitätstyp");
put("creatorOf", "Werke");
put("rppdId", "RPPD-ID");
put("source", "Quellen");
// no current German SKOS translation, see
// https://www.w3.org/2004/02/skos/translations
put("broadMatch", "Oberbegriff");
Expand Down
1 change: 1 addition & 0 deletions conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ field.order: [
"relatedPerson",
"publication"
"type",
"source",
"gndIdentifier",
"rppdId",
"definition",
Expand Down

0 comments on commit d56e8fb

Please sign in to comment.