View view = (View) getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(
getEditingDomain(), null);
cmd.setTransactionNestingEnabled(false);
for (Iterator it = view.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge) it.next();
if (eu.admire.visual.pmml.neuralnetwork._40.diagram.part.PMMLVisualIDRegistry
.getVisualID(incomingLink) == eu.admire.visual.pmml.neuralnetwork._40.diagram.edit.parts.ConTypeEditPart.VISUAL_ID) {
DestroyElementRequest r = new DestroyElementRequest(
incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(r));
cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
continue;
}
if (eu.admire.visual.pmml.neuralnetwork._40.diagram.part.PMMLVisualIDRegistry
.getVisualID(incomingLink) == eu.admire.visual.pmml.neuralnetwork._40.diagram.edit.parts.NeuralOutputType2EditPart.VISUAL_ID) {
DestroyElementRequest r = new DestroyElementRequest(
incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(r));
cmd.add(new DeleteCommand(getEditingDomain(), incomingLink));
continue;
}
}
for (Iterator it = view.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge) it.next();
if (eu.admire.visual.pmml.neuralnetwork._40.diagram.part.PMMLVisualIDRegistry
.getVisualID(outgoingLink) == eu.admire.visual.pmml.neuralnetwork._40.diagram.edit.parts.ConTypeEditPart.VISUAL_ID) {
DestroyElementRequest r = new DestroyElementRequest(
outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(r));
cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink));
continue;
}
}