Package org.gephi.statistics.api
Interface StatisticsController
-
public interface StatisticsController
Controller for executing Statistics/Metrics algorithms.This controller is a service and can therefore be found in Lookup:
StatisticsController sc = Lookup.getDefault().lookup(StatisticsController.class);
- Author:
- Patrick J. McSweeney, Mathieu Bastian
- See Also:
StatisticsBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
execute(Statistics statistics)
Executesstatistics
in the current thread.void
execute(Statistics statistics, LongTaskListener listener)
Execute the statistics algorithm in a background thread and notifylistener
when finished.StatisticsBuilder
getBuilder(Class<? extends Statistics> statistics)
Finds the builder from the statistics class.StatisticsModel
getModel()
Returns the currentStatisticsModel
, from the current workspaceStatisticsModel
getModel(Workspace workspace)
Returns theStatisticsModel
forworkspace
-
-
-
Method Detail
-
execute
void execute(Statistics statistics, LongTaskListener listener)
Execute the statistics algorithm in a background thread and notifylistener
when finished. Thestatistics
should implementLongTask
.- Parameters:
statistics
- the statistics algorithm instancelistener
- a listener that is notified when execution finished- Throws:
IllegalArgumentException
- ifstatistics
doesn't implementLongTask
-
execute
void execute(Statistics statistics)
Executesstatistics
in the current thread.- Parameters:
statistics
- the statistics to execute
-
getBuilder
StatisticsBuilder getBuilder(Class<? extends Statistics> statistics)
Finds the builder from the statistics class.- Parameters:
statistics
- the statistics class- Returns:
- the builder, or
null
if not found
-
getModel
StatisticsModel getModel()
Returns the currentStatisticsModel
, from the current workspace- Returns:
- the current
StatisticsModel
-
getModel
StatisticsModel getModel(Workspace workspace)
Returns theStatisticsModel
forworkspace
- Parameters:
workspace
- the workspace to return the model for- Returns:
- the
StatisticsModel
associated toworkspace
-
-