for (final NodeLinkModel link : nodeLinks.getLinks()) {
links.remove(link);
}
final NodeModel notDeletedClone = notDeletedClone(model);
if(notDeletedClone != null){
nodeLinks.replaceSource(model, notDeletedClone);
for (final NodeLinkModel link : nodeLinks.getLinks()) {
links.add(link);
}
}
}