All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class aid.cbr.tools.core.memory.casebase.AbstractCaseBase

java.lang.Object
   |
   +----aid.cbr.tools.core.memory.casebase.AbstractCaseBase

public abstract class AbstractCaseBase
extends Object
implements CaseBase
Implements basic operations that are usually common to all case base.

Version:
$Revision$, $Date$
Author:
M. Jaczynski

Variable Index

 o _caseBaseEvent
 o _propertyChange
 o _vetoableChange

Constructor Index

 o AbstractCaseBase(String)
Creates a case base and assigns its local name.

Method Index

 o addCase(CbrCase)
Adds or moves a case to this case base.
 o addCaseBaseListener(CaseBaseListener)
 o addPropertyChangeListener(PropertyChangeListener)
 o addSubCaseBase(CaseBase)
Adds a sub case base.
 o addSubCaseBase(int, CaseBase)
Adds a sub case base at a given position in the list of sub-case bases.
 o addVetoableChangeListener(VetoableChangeListener)
 o cases()
Returns an unmodifable map object containing all the cases.
 o clear()
Clears the case base.
 o close()
Closes the case base.
 o commitCase(CbrCase)
Commits the changes in a case object.
 o deleteCase(Object)
Deletes a case from this case base.
 o getCase(Object)
Returns the case object given its id.
 o getDefaultReadOnly()
Returns the default opening mode.
 o getMetadata()
Returns the metadata of this case base.
 o getName()
 o isCaseCompatible(CbrCase)
Indiquates if a case can be added to this case base.
 o isOpened()
 o isReadOnly()
 o open()
 o open(boolean)
Opens the case base in the given mode (readonly or read/write).
 o removeAllSubCaseBases()
remove all sub-case bases.
 o removeCaseBaseListener(CaseBaseListener)
 o removePropertyChangeListener(PropertyChangeListener)
 o removeSubCaseBase(CaseBase)
Removes a case base from the list of sub-case bases.
 o removeSubCaseBase(int)
Removes a case base at a given position the the list of sub-case bases.
 o removeVetoableChangeListener(VetoableChangeListener)
 o setDefaultReadOnly(boolean)
Sets the default opening mode.
 o setMetadata(CaseBaseMetadata)
Sets the metadata of this case base.
 o setName(String)
 o subCaseBases()
Returns the list of sub-case bases.

Variables

 o _propertyChange
 protected PropertyChangeSupport _propertyChange
 o _vetoableChange
 protected VetoableChangeSupport _vetoableChange
 o _caseBaseEvent
 protected CaseBaseEventSupport _caseBaseEvent

Constructors

 o AbstractCaseBase
 public AbstractCaseBase(String name)
Creates a case base and assigns its local name.

Parameters:
name - the local name of the case base.

Methods

 o addCaseBaseListener
 public void addCaseBaseListener(CaseBaseListener l)
 o removeCaseBaseListener
 public void removeCaseBaseListener(CaseBaseListener l)
 o addPropertyChangeListener
 public void addPropertyChangeListener(PropertyChangeListener l)
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener l)
 o addVetoableChangeListener
 public void addVetoableChangeListener(VetoableChangeListener l)
 o removeVetoableChangeListener
 public void removeVetoableChangeListener(VetoableChangeListener l)
 o getName
 public String getName()
 o setName
 public void setName(String name)
 o open
 public void open(boolean readOnly) throws CaseBaseAccessException
Opens the case base in the given mode (readonly or read/write). Implements the change of the "opened" property and fires the property change event. it must be called by subclasses.

Parameters:
readOnly - the opening mode
Throws: CaseBaseAccessException
the case base cannot be opened.
 o isReadOnly
 public boolean isReadOnly()
 o isOpened
 public boolean isOpened()
 o close
 public void close() throws CaseBaseAccessException
Closes the case base. Implements the change of the "opened" property and fires the event. It must be called by sub classes.

Throws: CaseBaseAccessException
the case base cannot be closed.
 o isCaseCompatible
 public boolean isCaseCompatible(CbrCase newCase) throws CaseBaseAccessException
Indiquates if a case can be added to this case base. Provides a default implementation and returns always true

Parameters:
newCase - the case to check
Returns:
true
Throws: CaseBaseAccessException
not thrown
 o getDefaultReadOnly
 public boolean getDefaultReadOnly()
Returns the default opening mode.

Returns:
the default mode
 o setDefaultReadOnly
 public void setDefaultReadOnly(boolean defaultReadOnly)
Sets the default opening mode.

Parameters:
defaultReadOnly - the default opening mode.
 o open
 public void open() throws CaseBaseAccessException

All Packages  Class Hierarchy  This Package  Previous  Next  Index