use of org.gephi.filters.spi.FilterBuilder in project gephi by gephi.
the class IntraEdgesBuilder method getBuilders.
@Override
public FilterBuilder[] getBuilders(Workspace workspace) {
List<FilterBuilder> builders = new ArrayList<>();
GraphModel gm = Lookup.getDefault().lookup(GraphController.class).getGraphModel(workspace);
Graph graph = gm.getGraph();
AppearanceModel am = Lookup.getDefault().lookup(AppearanceController.class).getModel(workspace);
//Force refresh
am.getNodeFunctions(graph);
for (Column nodeCol : gm.getNodeTable()) {
if (!nodeCol.isProperty()) {
if (am.getNodePartition(graph, nodeCol) != null) {
IntraEdgesFilterBuilder builder = new IntraEdgesFilterBuilder(nodeCol, am);
builders.add(builder);
}
}
}
return builders.toArray(new FilterBuilder[0]);
}
use of org.gephi.filters.spi.FilterBuilder in project gephi by gephi.
the class PartitionBuilder method getBuilders.
@Override
public FilterBuilder[] getBuilders(Workspace workspace) {
List<FilterBuilder> builders = new ArrayList<>();
GraphModel gm = Lookup.getDefault().lookup(GraphController.class).getGraphModel(workspace);
Graph graph = gm.getGraph();
AppearanceModel am = Lookup.getDefault().lookup(AppearanceController.class).getModel(workspace);
//Force refresh
am.getNodeFunctions(graph);
for (Column nodeCol : gm.getNodeTable()) {
if (!nodeCol.isProperty()) {
if (am.getNodePartition(graph, nodeCol) != null) {
PartitionFilterBuilder builder = new PartitionFilterBuilder(nodeCol, am);
builders.add(builder);
}
}
}
for (Column edgeCol : gm.getEdgeTable()) {
if (!edgeCol.isProperty()) {
if (am.getEdgePartition(graph, edgeCol) != null) {
PartitionFilterBuilder builder = new PartitionFilterBuilder(edgeCol, am);
builders.add(builder);
}
}
}
return builders.toArray(new FilterBuilder[0]);
}
use of org.gephi.filters.spi.FilterBuilder in project gephi by gephi.
the class AttributeNonNullBuilder method getBuilders.
@Override
public FilterBuilder[] getBuilders(Workspace workspace) {
List<FilterBuilder> builders = new ArrayList<>();
GraphModel am = Lookup.getDefault().lookup(GraphController.class).getGraphModel(workspace);
for (Column col : am.getNodeTable()) {
if (!col.isProperty()) {
AttributeNonNullFilterBuilder b = new AttributeNonNullFilterBuilder(col);
builders.add(b);
}
}
for (Column col : am.getEdgeTable()) {
if (!col.isProperty()) {
AttributeNonNullFilterBuilder b = new AttributeNonNullFilterBuilder(col);
builders.add(b);
}
}
return builders.toArray(new FilterBuilder[0]);
}
Aggregations