unbbayes.util.extension.manager
Class CoreCPFPluginManager

java.lang.Object
  extended by unbbayes.util.extension.manager.CoreCPFPluginManager

public class CoreCPFPluginManager
extends Object

This plugin manager manipulates the panels for Conditional Probability Function. This is done virtually by doing the same of CorePluginNodeManager, but only for pre-existing nodes.

Author:
Shou Matsumoto

Field Summary
static String PARAMETER_CLASS
          Name of the extension point parameter for node's class (e.g.
static String PARAMETER_DESCRIPTION
          Name of the extension point parameter for this new node type's description (used as tool tip text)
static String PARAMETER_ICON
          Name of the extension point parameter for icons of the split button
static String PARAMETER_NAME
          Name of the extension point parameter for the name of this new node type (e.g.
static String PARAMETER_PANEL_BUILDER
          Name of the extension point parameter for a subclass/implementation of IProbabilityFunctionPanelBuilder @see IProbabilityFunctionPanelBuilder
 
Constructor Summary
protected CoreCPFPluginManager()
          Default constructor is protected, so that it is easier to extend.
 
Method Summary
 Collection<INodeClassDataTransferObject> getAllLoadedPluginNodes()
           
 String getMainExtensionPointID()
          ID of the plugin where we can find panel declarations
protected  Map<String,Collection<INodeClassDataTransferObject>> getNodeNameToDtoMap()
          this is a map to store the informations associated to nodes and its CPF
 Collection<INodeClassDataTransferObject> getPluginInformation(String nodeClassName)
          Obtains all plugin informations associated with nodeClassName
 UnBBayesPluginContextHolder getUnbbayesPluginContextHolder()
           
 void loadPlugin()
          This is equivalent to reloadPlugin()
static CoreCPFPluginManager newInstance()
          Obtains a singleton instance of CoreCPFPluginManager
 void reloadPlugin()
          UnBBayesPluginContextHolder will be used to load the plugins and fill the plugin informations that can be obtained by {@link #getPluginInformation(String)
protected  void setMainExtensionPointID(String mainExtensionPointID)
          ID of the plugin where we can find panel declarations
protected  void setNodeNameToDtoMap(Map<String,Collection<INodeClassDataTransferObject>> nodeNameToDtoMap)
          this is a map to store the informations associated to nodes and its CPF
 void setUnbbayesPluginContextHolder(UnBBayesPluginContextHolder unbbayesPluginContextHolder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAMETER_CLASS

public static final String PARAMETER_CLASS
Name of the extension point parameter for node's class (e.g. ProbabilisticNode, DecisionNode, UtilityNode, ContinuousNode)...

See Also:
Constant Field Values

PARAMETER_NAME

public static final String PARAMETER_NAME
Name of the extension point parameter for the name of this new node type (e.g. "Continuous Node", "Decision Node")

See Also:
Constant Field Values

PARAMETER_DESCRIPTION

public static final String PARAMETER_DESCRIPTION
Name of the extension point parameter for this new node type's description (used as tool tip text)

See Also:
Constant Field Values

PARAMETER_ICON

public static final String PARAMETER_ICON
Name of the extension point parameter for icons of the split button

See Also:
Constant Field Values

PARAMETER_PANEL_BUILDER

public static final String PARAMETER_PANEL_BUILDER
Name of the extension point parameter for a subclass/implementation of IProbabilityFunctionPanelBuilder @see IProbabilityFunctionPanelBuilder

See Also:
Constant Field Values
Constructor Detail

CoreCPFPluginManager

protected CoreCPFPluginManager()
Default constructor is protected, so that it is easier to extend. Use newInstance() in order to create a new instance.

Method Detail

newInstance

public static CoreCPFPluginManager newInstance()
Obtains a singleton instance of CoreCPFPluginManager

Returns:

getUnbbayesPluginContextHolder

public UnBBayesPluginContextHolder getUnbbayesPluginContextHolder()
Returns:
the unbbayesPluginContextHolder

setUnbbayesPluginContextHolder

public void setUnbbayesPluginContextHolder(UnBBayesPluginContextHolder unbbayesPluginContextHolder)
Parameters:
unbbayesPluginContextHolder - the unbbayesPluginContextHolder to set

getAllLoadedPluginNodes

public Collection<INodeClassDataTransferObject> getAllLoadedPluginNodes()

getPluginInformation

public Collection<INodeClassDataTransferObject> getPluginInformation(String nodeClassName)
Obtains all plugin informations associated with nodeClassName

Parameters:
nodeClassName -
Returns:
a non-null collection
See Also:
getNodeNameToDtoMap()

loadPlugin

public void loadPlugin()
                throws IOException
This is equivalent to reloadPlugin()

Throws:
IOException - : thrown by reloadPlugin()
See Also:
reloadPlugin()

reloadPlugin

public void reloadPlugin()
                  throws IOException
UnBBayesPluginContextHolder will be used to load the plugins and fill the plugin informations that can be obtained by {@link #getPluginInformation(String)

Throws:
IOException - : when UnBBayesPluginContextHolder.publishPlugins() fails

setMainExtensionPointID

protected void setMainExtensionPointID(String mainExtensionPointID)
ID of the plugin where we can find panel declarations

Parameters:
mainExtensionPointID -

getNodeNameToDtoMap

protected Map<String,Collection<INodeClassDataTransferObject>> getNodeNameToDtoMap()
this is a map to store the informations associated to nodes and its CPF

Returns:
the nodeNameToDtoMap

setNodeNameToDtoMap

protected void setNodeNameToDtoMap(Map<String,Collection<INodeClassDataTransferObject>> nodeNameToDtoMap)
this is a map to store the informations associated to nodes and its CPF

Parameters:
nodeNameToDtoMap - the nodeNameToDtoMap to set

getMainExtensionPointID

public String getMainExtensionPointID()
ID of the plugin where we can find panel declarations

Returns:
the mainExtensionPointID


Copyright © 2001-2010 University of Brasilia - UnB. All Rights Reserved.