Gephi Toolkit Javadoc

org.gephi.data.attributes.api
Interface AttributeController


public interface AttributeController

This controller is the access door to AttributeModel, that contains all attributes data. Attributes are simply any data that could be associated with elements like nodes or edges. This module helps to organize data in columsn and rows in a way they can be accessed in multiple, yet efficient ways.

This controller is a service, and exist in the system as a singleton. It can be retrieved by using the following command:

 AttributeController ac = Lookup.getDefault().lookup(AttributeController.class);
 

Author:
Mathieu Bastian

Method Summary
 AttributeModel getModel()
          Returns the model for the current Workspace.
 AttributeModel getModel(Workspace workspace)
          Returns the model for the given Workspace.
 AttributeModel newModel()
          Create a new model independent from any Workspace.
 

Method Detail

getModel

AttributeModel getModel()
Returns the model for the current Workspace. May return null if there currently no Worksapce active.

The controller maintains the current project status and is responsible of maintaining one AttributeModel instance per Workspace. Hence, the model can also be accessed by using the following code:

 Workspace.getLookup().get(AttributeModel.class);
 

Returns:
the currently active model

getModel

AttributeModel getModel(Workspace workspace)
Returns the model for the given Workspace.

The controller maintains the current project status and is responsible of maintaining one AttributeModel instance per Workspace. Hence, the model can also be accessed by using the following code:

 Workspace.getLookup().get(AttributeModel.class);
 

Returns:
the attribute model for workspace.

newModel

AttributeModel newModel()
Create a new model independent from any Workspace. The model can be used indepedently and then merged in another model.

Returns:
a new independent model
See Also:
AttributeModel.mergeModel(org.gephi.data.attributes.api.AttributeModel)

Gephi Toolkit Javadoc