|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectunbbayes.controller.MainController
public class MainController
This class is responsible for creating, loading and saving networks supported by UnBBayes.
| Constructor Summary | |
|---|---|
MainController()
Contructs the main controller with the UnBBayes main frame. |
|
| Method Summary | |
|---|---|
void |
loadConfigurations()
Load the configuration file and setting the configurations object in the ConfigurationsController. |
UnBBayesModule |
loadNet(File file,
UnBBayesModule moduleToUse)
Loads the probabilistic network from both .net and .xml format, depending on the file's extension |
ProbabilisticNetwork |
makeProbabilisticNetwork(ArrayList<Node> nodeList)
Method responsible for creating a network based on its variables. |
void |
newPN()
This method is responsible for creating a new probabilistic network. |
void |
saveConfigurations()
|
boolean |
saveNet(File file,
BaseIO ioToUse,
Graph graphToSave)
Saves the probabilistic network using the given IO class. |
boolean |
saveNet(File file,
UnBBayesModule moduleToUse)
Saves the probabilistic network in both .net and .xml format, depending on the file's extension. |
void |
showProbabilisticNetwork(ProbabilisticNetwork net)
Shows the given probabilistic network in edition or compilation mode. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MainController()
| Method Detail |
|---|
public void loadConfigurations()
throws IOException
IOException - Exception try to read the configurations file
public void saveConfigurations()
throws IOException
IOExceptionpublic void newPN()
public boolean saveNet(File file,
UnBBayesModule moduleToUse)
throws NoObjectToBeSavedException,
InvalidFileNameException,
FileNotFoundException,
IOException,
Exception
file - The file where to save the network.moduleToUse - : what module/plugin we shall use in order to store the file
javax.xml.bind.JAXBException
IOException - : it can throw FileExtensionIODelegator.MoreThanOneCompatibleIOException
if the module uses FileExtensionIODelegator and when 2 or more IO class can manage the same file.
FileNotFoundException
NoObjectToBeSavedException
InvalidFileNameException
Exception
public boolean saveNet(File file,
BaseIO ioToUse,
Graph graphToSave)
throws IOException
file - The file where to save the network.ioToUse - : this is the single IO class to be usedgraphToSave -
IOException
public UnBBayesModule loadNet(File file,
UnBBayesModule moduleToUse)
throws IOException
file - : file to loadmoduleToUse - : the module/plugin to use in order to load file.
IOExceptionpublic ProbabilisticNetwork makeProbabilisticNetwork(ArrayList<Node> nodeList)
nodeList - List of nodes to create the network.
public void showProbabilisticNetwork(ProbabilisticNetwork net)
net -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||