@SuppressWarnings("unchecked")
public void onSequenceEnd() {
if (diagramModel.getInteractions().size() < 3) {
System.out.println("All interactions filtered for path: " + fileNumber);
} else {
InteractionDiagram diagram = diagramFactory
.createInteractionDiagram(diagramModel, instanceFilter,
interactionFilter);
InteractionDiagramFileWriter writer = diagramFactory
.createInteractionDiagramFileWriter();
writer.write(getFileName(writer), diagram);