[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 583: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 639: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
Gephi forums •Filter by partition
Page 1 of 1

Filter by partition

Posted: 21 May 2016 00:14
by antropoiese
I'm trying to filter a graph by partition using the toolkit 0.9.1.
Running the example (https://github.com/gephi/gephi-toolkit- ... ering.java) the filter by partition does not work.

Code: Select all

//Filter, keep partition 'Blogarama'. Build partition with 'source' column in the data
NodePartitionFilter partitionFilter = new NodePartitionFilter(graphModel.getNodeTable().getColumn("source"), appearanceModel);
partitionFilter.unselectAll();
partitionFilter.addPart("Blogarama");
Query query2 = filterController.createQuery(partitionFilter);
GraphView view2 = filterController.filter(query2);
graphModel.setVisibleView(view2);    //Set the filter result as the visible view
There is something wrong in the query parameters?

many thanx

Re: Filter by partition

Posted: 01 May 2017 12:39
by Odett171993
Try this...

Code: Select all

	PartitionBuilder pb = new PartitionBuilder();
        FilterBuilder[] fb = pb.getBuilders(workspace);
        FilterBuilder filterBuilder = fb[0];
        PartitionBuilder.NodePartitionFilter partitionFilter = (PartitionBuilder.NodePartitionFilter) filterBuilder.getFilter(workspace);
        partitionFilter.unselectAll();
        partitionFilter.addPart("Blogarama");
        Query query2 = filterController.createQuery(partitionFilter);

        GraphView view2 = filterController.filter(query2);
        graphModel.setVisibleView(view2);  

Re: Filter by partition

Posted: 14 Jun 2017 10:18
by seinecle
Very useful thanks!