org.grinvin.graphs

Interface GraphBundle

All Superinterfaces:
GraphBundleView
Known Implementing Classes:
DefaultGraphBundle, GraphBundleWithModels, LightweightGraphBundle

public interface GraphBundle
extends GraphBundleView

A mutable version of GraphBundleView. Provides methods to store or change information contained in a bundle.

Method Summary

void
addGraphBundleListener(GraphBundleListener listener)
void
addInvariantValue(InvariantValue value)
Add the given InvariantValue as a cached value to this bundle
Annotation
createAnnotation()
Factory method which creates a new (empty) annotation and installs it as the next annotation in this bundle, i.e., the annotation with the next available index.
Embedding
createEmbedding()
Factory method which creates a new (empty) embedding and installs it as the next embedding in this bundle, i.e., the embedding with the next available index.
Graph
createGraph()
Factory method which creates a new (empty) graph for this bundle.
Graph
getGraph()
Abstract graph representation for this graph bundle.
void
invalidate()
Clear all cached values for this bundle (i.e.
void
invalidate(InvariantValue value)
Remove the given InvariantValue from the cache of this bundle.
void
removeGraphBundleListener(GraphBundleListener listener)
void
setGraphIconFactory(GraphIconFactory graphIconFactory)
Set the graph icon factory used for displaying this graph as an icon.
void
setProperties(InternationalizedProperties properties)
Set the internationalized properties for this graph.

Methods inherited from interface org.grinvin.graphs.GraphBundleView

adjacencyList, booleanAdjacencyMatrix, distanceMatrix, eccentricityList, getAnnotation, getAnnotation, getAnnotationCount, getCachedInvariantValue, getDescription, getEmbedding, getEmbedding, getEmbeddingCount, getGraph, getGraphIconFactory, getInvariantValue, getInvariantValues, getInvariants, getName, getProperties

Method Details

addGraphBundleListener

public void addGraphBundleListener(GraphBundleListener listener)

addInvariantValue

public void addInvariantValue(InvariantValue value)
Add the given InvariantValue as a cached value to this bundle
Parameters:
value - The InvariantValue to be added to this bundle.

createAnnotation

public Annotation createAnnotation()
Factory method which creates a new (empty) annotation and installs it as the next annotation in this bundle, i.e., the annotation with the next available index.

This annotation should have the graph returned by getGraph() as a peer. Subsequent calls to GraphBundle with the appropriate index, should return the annotation created by this method.

Returns:
the annotation created or null when the graph bundle does not support annotations.

createEmbedding

public Embedding createEmbedding()
Factory method which creates a new (empty) embedding and installs it as the next embedding in this bundle, i.e., the embedding with the next available index.

This embedding should have the graph returned by getGraph() as a peer. Subsequent calls to GraphBundle with the appropriate index, should return the embedding created by this method.

Returns:
the embedding created or null when the graph bundle does not support embeddings.

createGraph

public Graph createGraph()
Factory method which creates a new (empty) graph for this bundle. Subsequent calls to getGraph() should return this graph.
Returns:
the graph created

getGraph

public Graph getGraph()
Abstract graph representation for this graph bundle.
Specified by:
getGraph in interface GraphBundleView

invalidate

public void invalidate()
Clear all cached values for this bundle (i.e. cached InvariantValues and other cached values such as eigenvalues, adjacency lists,...).

invalidate

public void invalidate(InvariantValue value)
Remove the given InvariantValue from the cache of this bundle.
Parameters:
value - The InvariantValue to be removed from this bundle.

removeGraphBundleListener

public void removeGraphBundleListener(GraphBundleListener listener)

setGraphIconFactory

public void setGraphIconFactory(GraphIconFactory graphIconFactory)
Set the graph icon factory used for displaying this graph as an icon.

setProperties

public void setProperties(InternationalizedProperties properties)
Set the internationalized properties for this graph.