Skip to content

Commit

Permalink
Add isExcludedEdge method
Browse files Browse the repository at this point in the history
  • Loading branch information
pkjacob committed Nov 26, 2024
1 parent 8994c90 commit 3ffee9e
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public void copyOutgoingEdges(Resource from, Resource to) {

from.getOutgoingEdges()
.stream()
.filter(this::isExcludedEdge)
.filter(this::hasNoMapper)
.map(edge -> new ResourceEdge(to, edge.getTarget(), edge.getPredicate()))
.forEach(to::addOutgoingEdge);
Expand All @@ -44,4 +45,8 @@ private boolean shouldNotCopyOutgoingEdges(Resource from, Resource to) {
return !(from.isOfType(INSTANCE) && to.isOfType(INSTANCE)
|| from.isOfType(WORK) && to.isOfType(WORK));
}

private boolean isExcludedEdge(ResourceEdge edge) {
return edge.getPredicate().getUri().startsWith("http://bibfra.me/vocab/relation/");
}
}

0 comments on commit 3ffee9e

Please sign in to comment.