public LinkTriple [] NodeFilter( Component parent, LinkTriple [] inList ) {
		GridBagConstraints c = new GridBagConstraints();

		final JDialog frame = new JDialog();
		JPanel panel = new JPanel();
		panel.setLayout( new GridBagLayout() );

		panel.add(new Label("Edge Types"), c);
		c.gridx = 1;
		panel.add(new Label("Node Types"), c);

		c.gridy = 1;
		c.gridx = 0;

		//Edge List
		DefaultListModel edgeTypeListModel = new DefaultListModel();
		for ( LinkTriple t : inList ) {
			if ( !edgeTypeListModel.contains( t.pred.toString() ) )
				edgeTypeListModel.addElement( t.pred.toString() );
		}
		JList edgeTypeList = new JList( edgeTypeListModel );
		edgeTypeList.setVisibleRowCount(-1);
		//edgeTypeList.setVisibleRowCount(20);
		edgeTypeList.setSelectionInterval(0,edgeTypeListModel.getSize()-1);
		JScrollPane edgeTypeScrollPane = new JScrollPane(edgeTypeList);
		edgeTypeScrollPane.setPreferredSize(new Dimension(300, 200) );
		c.gridx=0;
		panel.add( edgeTypeScrollPane, c );

		//Node type List
		DefaultListModel nodeTypeListModel = new DefaultListModel();
		for ( LinkTriple t : inList ) {
			if ( !nodeTypeListModel.contains( t.obj.getType() ) )
				nodeTypeListModel.addElement( t.obj.getType() );
			if ( !nodeTypeListModel.contains( t.subj.getType() ) )
				nodeTypeListModel.addElement( t.subj.getType() );
		}
		JList nodeTypeList = new JList( nodeTypeListModel );
		nodeTypeList.setVisibleRowCount(-1);
		//nodeTypeList.setVisibleRowCount(20);
		nodeTypeList.setSelectionInterval(0,nodeTypeListModel.getSize()-1);
		JScrollPane nodeTypeScrollPane = new JScrollPane(nodeTypeList);
		nodeTypeScrollPane.setPreferredSize(new Dimension(300, 200) );
		c.gridx=1;
		panel.add( nodeTypeScrollPane, c );

		Button okButton = new Button("OK");
		okButton.addActionListener( new ActionListener() {					
			@Override
			public void actionPerformed(ActionEvent e) {
				frame.setVisible(false);
			}
		}); 
		c.gridx=0;
		c.gridy = 3;
		panel.add( okButton, c );

		frame.add( panel );
		frame.setLocationRelativeTo(null);
		frame.setSize(600,300);
		frame.setModal(true);		
		frame.pack();
		frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);		
		frame.setVisible(true);

		Map<String, Boolean> nodeTypeHash = new HashMap<String, Boolean>();
		for (Object o : nodeTypeList.getSelectedValues() ) {
			String s = (String)o;
			nodeTypeHash.put(s, true);
		}
		List<LinkTriple> outList = new LinkedList<LinkTriple>();

		for ( LinkTriple link : inList ) {
			if ( nodeTypeHash.containsKey( link.pred.getType() ) 
					&& nodeTypeHash.containsKey( link.subj.getType() ) 
			) {
				outList.add(link);
			}
		}

		return outList.toArray( new LinkTriple[0] );
	}