de.cesr.more.measures.network
Class MNetworkMeasureManager

java.lang.Object
  extended by de.cesr.more.measures.MAbstractMeasureSupplier
      extended by de.cesr.more.measures.MAbstractMeasureManager
          extended by de.cesr.more.measures.network.MNetworkMeasureManager
All Implemented Interfaces:
MMeasureSelectorListener, MoreMeasureSupplier

public class MNetworkMeasureManager
extends MAbstractMeasureManager

MORe

Date:
16.11.2010

Nested Class Summary
static class MNetworkMeasureManager.ParameterKeys
          Standard keys for measure action parameters
 
Field Summary
protected static MNetworkMeasureManager instance
           
 
Fields inherited from class de.cesr.more.measures.MAbstractMeasureManager
listeners, measureActions, promptForMeasureParameters
 
Fields inherited from class de.cesr.more.measures.MAbstractMeasureSupplier
categories, measures, suppliers
 
Method Summary
<T,E extends MoreEdge<? super T>>
boolean
addMeasureCalculation(MoreNetwork<T,E> network, MMeasureDescription measureDesc, Map<String,Object> params)
           
<T,E extends MoreEdge<? super T>>
boolean
addMeasureCalculation(MoreNetwork<T,E> network, String shortname)
          Takes a short description instead of a MeasureDescription and uses default parameter map.
<T,E extends MoreEdge<? super T>>
boolean
addMeasureCalculation(MoreNetwork<T,E> network, String shortname, Map<String,Object> params)
          Takes a short description instead of a MeasureDescription.
<T,E extends MoreEdge<? super T>>
boolean
addMeasureCalculation(String network, MMeasureDescription measureDesc, Map<String,Object> params)
           
<T,E extends MoreEdge<? super T>>
boolean
addMeasureCalculation(String network, String shortname)
          Takes a short description instead of a MeasureDescription and uses default parameter map.
<T,E extends MoreEdge<? super T>>
boolean
addMeasureCalculation(String network, String shortname, Map<String,Object> params)
          Takes a short description instead of a MeasureDescription.
static MNetworkMeasureManager getInstance()
           
 Set<MMeasureDescription> getMeasureCalculations(MoreNetwork<?,?> network)
          Returns a Set of MeasureDescriptions that are dedicated to be calculated for the given ContextContextJungNetwork.
<T,E extends MoreEdge<? super T>>
boolean
removeMeasureCalculation(MoreNetwork<T,E> network, MMeasureDescription key)
          Removes BasicAction that calculates the measure for the given network for the given measure key from the Schedule to stop computation of that measure.
<T,E extends MoreEdge<? super T>>
boolean
removeMeasureCalculation(MoreNetwork<T,E> network, String shortName)
           
static void reset()
          Sets the static instance of this class to null.
 boolean setMeasureBundle(MMeasureBundle bundle, boolean remove)
          This method is invoked every time the user selects a measure at the MeasureChooser
 
Methods inherited from class de.cesr.more.measures.MAbstractMeasureManager
addMeasureManagerListener, getAddableMeasures, getRemovableMeasures, isPromptForMeasureParameters, printLatexMeasureDescriptions, removeMeasureManagerListener, setPromptForMeasureParameters
 
Methods inherited from class de.cesr.more.measures.MAbstractMeasureSupplier
addMeasureSupplier, equals, findMeasure, getCategories, getMeasureDescriptions, hashCode, removeMeasureSupplier
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

protected static MNetworkMeasureManager instance
Method Detail

getInstance

public static MNetworkMeasureManager getInstance()
Returns:
The current instance of NetworkMeasureUtilities.
Date:
15.08.2008

addMeasureCalculation

public <T,E extends MoreEdge<? super T>> boolean addMeasureCalculation(MoreNetwork<T,E> network,
                                                                       MMeasureDescription measureDesc,
                                                                       Map<String,Object> params)
Type Parameters:
T - Type of nodes)
E - Edge type
Parameters:
network - the network to add the measure for
measureDesc - the measure description of the measure to add
params - parameter map of options for calculation
Returns:
true if adding the measure calculation was successful

addMeasureCalculation

public <T,E extends MoreEdge<? super T>> boolean addMeasureCalculation(String network,
                                                                       MMeasureDescription measureDesc,
                                                                       Map<String,Object> params)

addMeasureCalculation

public <T,E extends MoreEdge<? super T>> boolean addMeasureCalculation(String network,
                                                                       String shortname,
                                                                       Map<String,Object> params)
Takes a short description instead of a MeasureDescription.

See Also:
MNodeMeasureManager#addMeasureCalculation(ContextContextJungNetwork, de.cesr.more.measures.node.MNodeMeasureManager.sh.soneta.measures.NetworkMeasureUtilities.MeasureDescription, Map)

addMeasureCalculation

public <T,E extends MoreEdge<? super T>> boolean addMeasureCalculation(MoreNetwork<T,E> network,
                                                                       String shortname,
                                                                       Map<String,Object> params)
Takes a short description instead of a MeasureDescription.

See Also:
MNodeMeasureManager#addMeasureCalculation(ContextContextJungNetwork, de.cesr.more.measures.node.MNodeMeasureManager.sh.soneta.measures.NetworkMeasureUtilities.MeasureDescription, Map)

addMeasureCalculation

public <T,E extends MoreEdge<? super T>> boolean addMeasureCalculation(MoreNetwork<T,E> network,
                                                                       String shortname)
Takes a short description instead of a MeasureDescription and uses default parameter map.

See Also:
MNodeMeasureManager#addMeasureCalculation(ContextContextJungNetwork, de.cesr.more.measures.node.MNodeMeasureManager.sh.soneta.measures.NetworkMeasureUtilities.MeasureDescription, Map)

addMeasureCalculation

public <T,E extends MoreEdge<? super T>> boolean addMeasureCalculation(String network,
                                                                       String shortname)
Takes a short description instead of a MeasureDescription and uses default parameter map.

See Also:
MNodeMeasureManager#addMeasureCalculation(ContextContextJungNetwork, de.cesr.more.measures.node.MNodeMeasureManager.sh.soneta.measures.NetworkMeasureUtilities.MeasureDescription, Map)

getMeasureCalculations

public Set<MMeasureDescription> getMeasureCalculations(MoreNetwork<?,?> network)
Returns a Set of MeasureDescriptions that are dedicated to be calculated for the given ContextContextJungNetwork.

Overrides:
getMeasureCalculations in class MAbstractMeasureManager
Type Parameters:
T - Parameter of ContextContextContextJungNetwork (type of nodes)
Parameters:
network -
Returns:
set of Measures
Date:
21.06.2008

removeMeasureCalculation

public <T,E extends MoreEdge<? super T>> boolean removeMeasureCalculation(MoreNetwork<T,E> network,
                                                                          MMeasureDescription key)
Removes BasicAction that calculates the measure for the given network for the given measure key from the Schedule to stop computation of that measure. Furthermore its sets the associated measures at the node to Double.NaN or null respectively.

Type Parameters:
T - Type of elements in the given ContextContextContextJungNetwork that should implement NetworkMeasureSupport
Parameters:
network - The network the measure is associated with
key - The key for the measure to remove from calculation
Returns:
true, if there was a measure that could be removed
Date:
24.05.2008

removeMeasureCalculation

public <T,E extends MoreEdge<? super T>> boolean removeMeasureCalculation(MoreNetwork<T,E> network,
                                                                          String shortName)

setMeasureBundle

public boolean setMeasureBundle(MMeasureBundle bundle,
                                boolean remove)
Description copied from interface: MMeasureSelectorListener
This method is invoked every time the user selects a measure at the MeasureChooser

Parameters:
bundle - the measure bundle that was selected
remove - true if the selected measure shall be removed from this collection
Returns:
true, if the measure could be set (and has not been existing before) or removed (and has been existing)
See Also:
edu.MMeasureSelectorListener.sh.soneta.gui.MeasureChooserListener#setMeasureBundle(edu.MMeasureBundle.sh.soneta.measures.MeasureBundle, boolean)

reset

public static void reset()
Sets the static instance of this class to null.