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
-
_caseBaseEvent
-
-
_propertyChange
-
-
_vetoableChange
-
-
AbstractCaseBase(String)
- Creates a case base and assigns its local name.
-
addCase(CbrCase)
- Adds or moves a case to this case base.
-
addCaseBaseListener(CaseBaseListener)
-
-
addPropertyChangeListener(PropertyChangeListener)
-
-
addSubCaseBase(CaseBase)
- Adds a sub case base.
-
addSubCaseBase(int, CaseBase)
- Adds a sub case base at a given position in the list of sub-case bases.
-
addVetoableChangeListener(VetoableChangeListener)
-
-
cases()
- Returns an unmodifable map object containing all the cases.
-
clear()
- Clears the case base.
-
close()
- Closes the case base.
-
commitCase(CbrCase)
- Commits the changes in a case object.
-
deleteCase(Object)
- Deletes a case from this case base.
-
getCase(Object)
- Returns the case object given its id.
-
getDefaultReadOnly()
- Returns the default opening mode.
-
getMetadata()
- Returns the metadata of this case base.
-
getName()
-
-
isCaseCompatible(CbrCase)
- Indiquates if a case can be added to this case base.
-
isOpened()
-
-
isReadOnly()
-
-
open()
-
-
open(boolean)
- Opens the case base in the given mode (readonly or read/write).
-
removeAllSubCaseBases()
- remove all sub-case bases.
-
removeCaseBaseListener(CaseBaseListener)
-
-
removePropertyChangeListener(PropertyChangeListener)
-
-
removeSubCaseBase(CaseBase)
- Removes a case base from the list of sub-case bases.
-
removeSubCaseBase(int)
- Removes a case base at a given position the the list of sub-case bases.
-
removeVetoableChangeListener(VetoableChangeListener)
-
-
setDefaultReadOnly(boolean)
- Sets the default opening mode.
-
setMetadata(CaseBaseMetadata)
- Sets the metadata of this case base.
-
setName(String)
-
-
subCaseBases()
- Returns the list of sub-case bases.
_propertyChange
protected PropertyChangeSupport _propertyChange
_vetoableChange
protected VetoableChangeSupport _vetoableChange
_caseBaseEvent
protected CaseBaseEventSupport _caseBaseEvent
AbstractCaseBase
public AbstractCaseBase(String name)
- Creates a case base and assigns its local name.
- Parameters:
- name - the local name of the case base.
addCaseBaseListener
public void addCaseBaseListener(CaseBaseListener l)
removeCaseBaseListener
public void removeCaseBaseListener(CaseBaseListener l)
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener l)
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener l)
addVetoableChangeListener
public void addVetoableChangeListener(VetoableChangeListener l)
removeVetoableChangeListener
public void removeVetoableChangeListener(VetoableChangeListener l)
getName
public String getName()
setName
public void setName(String name)
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.
isReadOnly
public boolean isReadOnly()
isOpened
public boolean isOpened()
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.
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
getDefaultReadOnly
public boolean getDefaultReadOnly()
- Returns the default opening mode.
- Returns:
- the default mode
setDefaultReadOnly
public void setDefaultReadOnly(boolean defaultReadOnly)
- Sets the default opening mode.
- Parameters:
- defaultReadOnly - the default opening mode.
open
public void open() throws CaseBaseAccessException
All Packages Class Hierarchy This Package Previous Next Index