diff --git a/src/main/java/org/folio/linked/data/service/resource/impl/ResourceEdgeServiceImpl.java b/src/main/java/org/folio/linked/data/service/resource/impl/ResourceEdgeServiceImpl.java index 6fb6a012..75bc9bc2 100644 --- a/src/main/java/org/folio/linked/data/service/resource/impl/ResourceEdgeServiceImpl.java +++ b/src/main/java/org/folio/linked/data/service/resource/impl/ResourceEdgeServiceImpl.java @@ -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); @@ -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/"); + } }