|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectunbbayes.io.XMLBIFIO
public class XMLBIFIO
Manipulates I/O of XMLBIF file format.
Field Summary | |
---|---|
static String[] |
SUPPORTED_EXTENSIONS
Supported file extension with no dots. |
Constructor Summary | |
---|---|
XMLBIFIO()
|
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. |
ProbabilisticNetwork |
load(File input)
Loads a new Probabilistic network from the input file. |
void |
save(File output,
Graph graph)
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. |
boolean |
supports(String extension,
boolean isLoadOnly)
Checks if file extension is compatible to what this i/o expects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String[] SUPPORTED_EXTENSIONS
Constructor Detail |
---|
public XMLBIFIO()
Method Detail |
---|
public ProbabilisticNetwork load(File input) throws LoadException, IOException
load
in interface BaseIO
input
- the input file for the network
LoadException
- If the file doesn't describes a network.
IOException
- If an IO error occurspublic void save(File output, Graph graph) throws IOException
save
in interface BaseIO
output
- The output file to savegraph
- The network to save.
IOException
public boolean supports(String extension, boolean isLoadOnly)
extension
- isLoadOnly
-
supports(File, boolean)
public String[] getSupportedFileExtensions(boolean isLoadOnly)
BaseIO
getSupportedFileExtensions
in interface BaseIO
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.
public String getSupportedFilesDescription(boolean isLoadOnly)
BaseIO
getSupportedFilesDescription
in interface BaseIO
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.public boolean supports(File file, boolean isLoadOnly)
BaseIO
supports
in interface BaseIO
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.
public String getName()
BaseIO
getName
in interface BaseIO
public void setName(String name)
BaseIO
setName
in interface BaseIO
name
- the name to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |