Based on Mobile Patent Suits (http://bl.ocks.org/mbostock/1153292) implemented in D3.js, add links filter functionality. Create a filter for each type of link and hide links with unselected link type. The node will also be invisible if all the links that the node owns are invisible.