unbbayes.io
Class OwnerAwareFileExtensionIODelegator

java.lang.Object
  extended by unbbayes.io.FileExtensionIODelegator
      extended by unbbayes.io.OwnerAwareFileExtensionIODelegator
All Implemented Interfaces:
BaseIO

public class OwnerAwareFileExtensionIODelegator
extends FileExtensionIODelegator

This is just a FileExtensionIODelegator with some customization (names, content of delegators and its descriptions)

Author:
Shou Matsumoto

Nested Class Summary
 
Nested classes/interfaces inherited from class unbbayes.io.FileExtensionIODelegator
FileExtensionIODelegator.MoreThanOneCompatibleIOException
 
Constructor Summary
OwnerAwareFileExtensionIODelegator(UnBBayesModule module)
          Default constructor
 
Method Summary
 String getName()
          Gets the name of this I/O component.
 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.
 
Methods inherited from class unbbayes.io.FileExtensionIODelegator
findIOByName, getCompatibleIOs, getDelegators, getNamesFromIOs, getSupportedFileExtensions, load, newInstance, save, setDelegators, setName, supports
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwnerAwareFileExtensionIODelegator

public OwnerAwareFileExtensionIODelegator(UnBBayesModule module)
Default constructor

Parameters:
the - UnBBayesModule owning this IO class. This is used generally in order to extract module names.
Method Detail

getName

public String getName()
Description copied from interface: BaseIO
Gets the name of this I/O component. This name may be displayed to a user when there is a need to choose a specific I/O class to use.

Specified by:
getName in interface BaseIO
Overrides:
getName in class FileExtensionIODelegator
Returns:
the name

getSupportedFilesDescription

public String getSupportedFilesDescription(boolean isLoadOnly)
Description copied from interface: BaseIO
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. E.g. "Net (.net), XMLBIF(.xml), UnBBayes File (.ubf)"

Specified by:
getSupportedFilesDescription in interface BaseIO
Overrides:
getSupportedFilesDescription in class FileExtensionIODelegator
Parameters:
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.


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