filter duplicate connections in Ecore and Java