Gephi Toolkit Javadoc

org.gephi.dynamic.api
Interface DynamicModel


public interface DynamicModel

Model that maintains the dynamic states of the application, which include the minimum and the maximum bounds, as well as the current visible interval.

The min and the max are used to know what are the limits of the time in the current data. The visible interval is typically configured by a timeline component to select a range of time. The model also maintains what is the current time format, either DOUBLE or DATE. Internally, all times are double, but it can be converted to dates for user display. In addition the model stores the current estimators used to compute dynamic values.

The model is listening to graph and attributes events to track all intervals and deduce minimum and maximum. It thows MIN_CHANGED or MAX_CHANGED events when these values are changed.

The model can also build DynamicGraph objets on demand. These objects can work independently to states of this model.

Author:
Cezary Bartosiak, Mathieu Bastian
See Also:
DynamicController

Nested Class Summary
static class DynamicModel.TimeFormat
          The way the time is represented, either a simple real value (DOUBLE), a date or a datetime.
 
Field Summary
static java.lang.String TIMEINTERVAL_COLUMN
          The name of the column containing time intervals.
 
Method Summary
 DynamicGraph createDynamicGraph(Graph graph)
          Builds a new DynamicGraph from the given Graph instance.
 DynamicGraph createDynamicGraph(Graph graph, Interval interval)
          Builds a new DynamicGraph from the given Graph instance wrapping the given Interval.
 Estimator getEstimator()
          Returns the current ESTIMATOR, used to get values from DynamicType.
 double getMax()
          Returns the maximum of the time intervals defined in elements (i.e.
 double getMin()
          Returns the minimum of the time intervals defined in elements (i.e.
 Estimator getNumberEstimator()
          Returns the current number ESTIMATOR, used to get values from number DynamicType, like DynamicInteger.
 DynamicModel.TimeFormat getTimeFormat()
          Gets the current time format for this model.
 TimeInterval getVisibleInterval()
          Returns the time interval wrapped by the DynamicGraph of the current workspace.
 boolean hasDynamicEdges()
          Returns true if the graph in the current workspace has dynamic edges.
 boolean hasDynamicNodes()
          Returns true if the graph in the current workspace has dynamic nodes.
 boolean isDynamicGraph()
          Returns true if the graph in the current workspace is dynamic, i.e.
 

Field Detail

TIMEINTERVAL_COLUMN

static final java.lang.String TIMEINTERVAL_COLUMN
The name of the column containing time intervals.

See Also:
Constant Field Values
Method Detail

createDynamicGraph

DynamicGraph createDynamicGraph(Graph graph)
Builds a new DynamicGraph from the given Graph instance.

Parameters:
graph - the underlying graph
Returns:
a new a new DynamicGraph.

createDynamicGraph

DynamicGraph createDynamicGraph(Graph graph,
                                Interval interval)
Builds a new DynamicGraph from the given Graph instance wrapping the given Interval.

Parameters:
graph - the underlying graph
interval - the interval to filter the graph
Returns:
a new a new DynamicGraph.

getVisibleInterval

TimeInterval getVisibleInterval()
Returns the time interval wrapped by the DynamicGraph of the current workspace.

Returns:
the time interval wrapped by the DynamicGraph of the current workspace.

getMin

double getMin()
Returns the minimum of the time intervals defined in elements (i.e. nodes and edges) in the current workspace. This minimum is updated when data change and excludes Double.NEGATIVE_INFINITY.

Returns:
the minimum time in the current workspace

getMax

double getMax()
Returns the maximum of the time intervals defined in elements (i.e. nodes and edges) in the current workspace. This maximum is updated when data change and excludes Double.POSITIVE_INFINITY.

Returns:
the maximum time in the current workspace

getTimeFormat

DynamicModel.TimeFormat getTimeFormat()
Gets the current time format for this model. Though all time values are stored in double numbers, the time format inform how this values should be converted to display to users.

Returns:
the current time format

getEstimator

Estimator getEstimator()
Returns the current ESTIMATOR, used to get values from DynamicType. Default is Estimator.FIRST.

See the getNumberEstimator() method for number types.

Returns:
the current estimator

getNumberEstimator

Estimator getNumberEstimator()
Returns the current number ESTIMATOR, used to get values from number DynamicType, like DynamicInteger. Default is Estimator.AVERAGE.

See the getEstimator() method for non-number types.

Returns:
the current number estimator

isDynamicGraph

boolean isDynamicGraph()
Returns true if the graph in the current workspace is dynamic, i.e. when the graph has either dynamic topology, attributes or both.

Returns:
true if the graph is dynamic, false otherwise

hasDynamicNodes

boolean hasDynamicNodes()
Returns true if the graph in the current workspace has dynamic nodes. In other words if nodes are added or removed dynamically.

Returns:
true if the graph has dynamic nodes

hasDynamicEdges

boolean hasDynamicEdges()
Returns true if the graph in the current workspace has dynamic edges. In other words if edges are added or removed dynamically.

Returns:
true if the graph has dynamic edges

Gephi Toolkit Javadoc