Gephi Toolkit Javadoc

org.gephi.ranking.api
Interface RankingModel

All Known Implementing Classes:
RankingModelImpl

public interface RankingModel

Model for ranking data.

That includes the list of rankings currently available, separated in categories with different element types. It can returns all rankings for nodes or edges, or any element type.

Rankings are builds thanks to RankingBuilder implementation. Implement a new RankingBuider service to create new rankings.

The model also hosts the currently defined interpolator.

Author:
Mathieu Bastian
See Also:
Ranking, Transformer

Method Summary
 void addRankingListener(RankingListener listener)
          Add listener as a ranking listener of this model
 Ranking getAutoTransformerRanking(Transformer transformer)
          If transformer is an auto transformer, returns the ranking associated to it.
 Ranking[] getEdgeRankings()
          Get all rankings for edge elements.
 Interpolator getInterpolator()
          Returns the current interpolator.
 Ranking[] getNodeRankings()
          Get all rankings for node elements.
 Ranking getRanking(java.lang.String elementType, java.lang.String name)
          Return the specific ranking for elementType and with the given name.
 Ranking[] getRankings(java.lang.String elementType)
          Get all rankings for elementType elements.
 Transformer getTransformer(java.lang.String elementType, java.lang.String name)
          Returns the specific transformer for elementType and with the given name.
 Transformer[] getTransformers(java.lang.String elementType)
          Return all transformers specific to elementType.
 Workspace getWorkspace()
          Return the workspace this model is associated with
 void removeRankingListener(RankingListener listener)
          Remove listener as a ranking listener of this model
 boolean useLocalScale()
          Returns true if rankings are using the currently visible graph as a scale.
 

Method Detail

getNodeRankings

Ranking[] getNodeRankings()
Get all rankings for node elements. Rankings are classified with the type of element they are manipulating. Rankings specific to node elements are defined by the Ranking.NODE_ELEMENT.

Returns:
All rankings for node elements

getEdgeRankings

Ranking[] getEdgeRankings()
Get all rankings for edge elements. Rankings are classified with the type of element they are manipulating. Rankings specific to edge elements are defined by the Ranking.EDGE_ELEMENT.

Returns:
All rankings for edge elements

getRankings

Ranking[] getRankings(java.lang.String elementType)
Get all rankings for elementType elements. Rankings are classified with the type of element they are manipulating. If elementType equals Ranking.NODE_ELEMENT this is equivalent to getNodeRankings() method

Parameters:
elementType - the element type of the rankings
Returns:
All rankings for elementType

getRanking

Ranking getRanking(java.lang.String elementType,
                   java.lang.String name)
Return the specific ranking for elementType and with the given name. Returns null if not found.

Default ranking names can be found in the Ranking interface. For attribute rankings, simply use the column identifier.

Parameters:
elementType - the element type of the ranking
name - the name of the ranking
Returns:
the found ranking or null if not found

getTransformers

Transformer[] getTransformers(java.lang.String elementType)
Return all transformers specific to elementType. A transformer defines his ability to transformer different element types.

Parameters:
elementType - the element type of the transformers
Returns:
all transformers working with elementType

getTransformer

Transformer getTransformer(java.lang.String elementType,
                           java.lang.String name)
Returns the specific transformer for elementType and with the given name. Returns null if not found.

Default transformers name can be found in the Transformer interface.

Parameters:
elementType - the element type of the transformer
name - the name of the transformer
Returns:
the transformer defined as name and elementType or null if not found

getInterpolator

Interpolator getInterpolator()
Returns the current interpolator. The default interpolator is a simple linear interpolation.

Returns:
the current interpolator

getWorkspace

Workspace getWorkspace()
Return the workspace this model is associated with

Returns:
the workspace of this model

useLocalScale

boolean useLocalScale()
Returns true if rankings are using the currently visible graph as a scale. If false the complete graph is used to determine minimum and maximum values, the ranking scale.

Returns:
true if using a local scale, false if global scale

getAutoTransformerRanking

Ranking getAutoTransformerRanking(Transformer transformer)
If transformer is an auto transformer, returns the ranking associated to it.

Parameters:
transformer - the transformer to obtain the ranking from
Returns:
the ranking associated to transformer or null

addRankingListener

void addRankingListener(RankingListener listener)
Add listener as a ranking listener of this model

Parameters:
listener - the listener to add

removeRankingListener

void removeRankingListener(RankingListener listener)
Remove listener as a ranking listener of this model

Parameters:
listener - the listener to remove

Gephi Toolkit Javadoc