Package org.gephi.statistics.api
Interface StatisticsController
-
public interface StatisticsControllerController 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 voidexecute(Statistics statistics)Executesstatisticsin the current thread.voidexecute(Statistics statistics, LongTaskListener listener)Execute the statistics algorithm in a background thread and notifylistenerwhen finished.StatisticsBuildergetBuilder(Class<? extends Statistics> statistics)Finds the builder from the statistics class.StatisticsModelgetModel()Returns the model of the currently selectedWorkspace.StatisticsModelgetModel(Workspace workspace)Returns the model in the givenWorkspace.
-
-
-
Method Detail
-
getModel
StatisticsModel getModel()
Returns the model of the currently selectedWorkspace.
-
getModel
StatisticsModel getModel(Workspace workspace)
Returns the model in the givenWorkspace.- Parameters:
workspace- the workspace to lookup
-
execute
void execute(Statistics statistics, LongTaskListener listener)
Execute the statistics algorithm in a background thread and notifylistenerwhen finished. Thestatisticsshould implementLongTask.- Parameters:
statistics- the statistics algorithm instancelistener- a listener that is notified when execution finished- Throws:
IllegalArgumentException- ifstatisticsdoesn't implementLongTask
-
execute
void execute(Statistics statistics)
Executesstatisticsin 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
nullif not found
-
-