|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BaseIO
This is the most basic I/O interface for UnBBayes, which basically loads or stores a Graph from/into a file.
Method Summary | |
---|---|
String |
getName()
Gets the name of this I/O component. |
String[] |
getSupportedFileExtensions(boolean isLoadOnly)
Obtains an array of file extensions supported by this network window. |
String |
getSupportedFilesDescription(boolean isLoadOnly)
Gets a description of supported file extensions, which may be shown to the user through file chooser's file filter to explain what file format are supported. |
Graph |
load(File input)
Loads a new network from the input file. |
void |
save(File output,
Graph net)
Saves a network to the output file. |
void |
setName(String name)
Sets the name of this I/O component. |
boolean |
supports(File file,
boolean isLoadOnly)
Returns true if the file is supported by this IO class. |
Method Detail |
---|
Graph load(File input) throws LoadException, IOException
input
- the input file for the network
LoadException
- If the file doesn't describe a network.
IOException
- If an IO error occursvoid save(File output, Graph net) throws IOException
output
- The output file to savenet
- The network to save.
IOException
boolean supports(File file, boolean isLoadOnly)
file
- : the file to analyze extension.isLoadOnly
- : if set to true, it should consider file extensions for file loading (input).
If set to false, it should consider both saving and loading. Note
that not every I/O class can implement both loading and saving, and this parameter may separate such
special behaviors.
String[] getSupportedFileExtensions(boolean isLoadOnly)
isLoadOnly
- : if set to true, it should consider file extensions for file loading (input).
If set to false, it should consider both saving and loading. Note
that not every module/plugin can implement both loading and saving, and this parameter may separate such
special behaviors.
String getSupportedFilesDescription(boolean isLoadOnly)
isLoadOnly
- : if set to true, it should consider file extensions for file loading (input).
If set to false, it should consider both saving and loading. Note
that not every module/plugin can implement both loading and saving, and this parameter may separate such
special behaviors.void setName(String name)
name
- String getName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |