Skip to content

Commit

Permalink
Show Euregio at bottom of 9x spatial entries
Browse files Browse the repository at this point in the history
See #452
  • Loading branch information
fsteeg committed Jan 28, 2019
1 parent c5c611b commit d8e0341
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/controllers/nwbib/Classification.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ private static void addN90s(Map<String, List<JsonNode>> subClasses) {
Classification.buildHierarchyWikidata(wikidataJson);
String n9 = "http://purl.org/lobid/nwbib-spatial#n9";
String euregio = "http://purl.org/lobid/nwbib-spatial#n91";
List<JsonNode> n9Sub = subClasses.get(n9).stream()
.filter(json -> json.get("value").textValue().equals(euregio))
.collect(Collectors.toList());
List<JsonNode> n9Sub = new ArrayList<>();
n9Sub.addAll(topAndSub.getLeft());
n9Sub.add(subClasses.get(n9).stream()
.filter(json -> json.get("value").textValue().equals(euregio))
.iterator().next());
subClasses.put(n9, n9Sub);
subClasses.putAll(topAndSub.getRight());
}
Expand Down

0 comments on commit d8e0341

Please sign in to comment.