Gephi Toolkit Javadoc

org.gephi.statistics.api
Interface StatisticsController

All Known Implementing Classes:
StatisticsControllerImpl

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
 void execute(Statistics statistics)
          Executes statistics in the current thread.
 void execute(Statistics statistics, LongTaskListener listener)
          Execute the statistics algorithm in a background thread and notify listener when finished.
 StatisticsBuilder getBuilder(java.lang.Class<? extends Statistics> statistics)
          Finds the builder from the statistics class.
 StatisticsModel getModel()
          Returns the current StatisticsModel, from the current workspace
 StatisticsModel getModel(Workspace workspace)
          Returns the StatisticsModel for workspace
 

Method Detail

execute

void execute(Statistics statistics,
             LongTaskListener listener)
Execute the statistics algorithm in a background thread and notify listener when finished. The statistics should implement LongTask.

Parameters:
statistics - the statistics algorithm instance
listener - a listener that is notified when execution finished
Throws:
java.lang.IllegalArgumentException - if statistics doesn't implement LongTask

execute

void execute(Statistics statistics)
Executes statistics in the current thread.

Parameters:
statistics - the statistics to execute

getBuilder

StatisticsBuilder getBuilder(java.lang.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 current StatisticsModel, from the current workspace

Returns:
the current StatisticsModel

getModel

StatisticsModel getModel(Workspace workspace)
Returns the StatisticsModel for workspace

Parameters:
workspace - the workspace to return the model for
Returns:
the StatisticsModel associated to workspace

Gephi Toolkit Javadoc