.map(DataTreeModification::getRootNode)
.flatMap(topo -> topo.getModifiedChildren().stream())
.flatMap(node -> node.getModifiedChildren().stream())
+ .filter(this::isNep)
.filter(this::checkIfUpdated)
.map(nep -> (OwnedNodeEdgePoint) nep.getDataAfter())
.collect(Collectors.toList());
.map(DataTreeModification::getRootNode)
.flatMap(topo -> topo.getModifiedChildren().stream())
.flatMap(node -> node.getModifiedChildren().stream())
+ .filter(this::isNep)
.filter(this::checkIfDeleted)
.map(nep -> (OwnedNodeEdgePoint) nep.getDataBefore())
.collect(Collectors.toList());
});
}
+ private boolean isNep(DataObjectModification dataObjectModificationNep) {
+ return OwnedNodeEdgePoint.class.isAssignableFrom(dataObjectModificationNep.getDataType());
+ }
+
private boolean checkIfDeleted(DataObjectModification dataObjectModificationNep) {
OwnedNodeEdgePoint b = (OwnedNodeEdgePoint) dataObjectModificationNep.getDataBefore();
OwnedNodeEdgePoint a = (OwnedNodeEdgePoint) dataObjectModificationNep.getDataAfter();