com.cra.bnet.io
Class AbstractBnetFormat

java.lang.Object
  |
  +--com.cra.bnet.io.AbstractBnetFormat
All Implemented Interfaces:
BnetFormat
Direct Known Subclasses:
HuginFormat, NeticaFormat, XbnFormat

public abstract class AbstractBnetFormat
extends Object
implements BnetFormat

Skeletal implementation of the BnetFormat interface. This class just takes care of the error description so concrete implmenentations of BnetFormat don't have to.


Constructor Summary
protected AbstractBnetFormat()
          Empty constructor.
 
Method Summary
 String getError()
          Returns a description of the last error that occurred while reading or writing a Bayesian network.
protected  void setError(String error)
          Sets the error to the specified error.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.cra.bnet.io.BnetFormat
getDescription, getExtension, isValid, read, write
 

Constructor Detail

AbstractBnetFormat

protected AbstractBnetFormat()
Empty constructor.

Method Detail

getError

public String getError()
Returns a description of the last error that occurred while reading or writing a Bayesian network. If no errors occurred, this method returns null.

Specified by:
getError in interface BnetFormat
Returns:
a description of the last error that occurred or null if no error occurred.

setError

protected void setError(String error)
Sets the error to the specified error. This method is for subclasses to use so they don't have to store the error string.

Parameters:
error - description of the error.