de.dfki.mycbr.core
Interface ICaseBase

All Superinterfaces:
java.util.Observer
All Known Implementing Classes:
DefaultCaseBase

public interface ICaseBase
extends java.util.Observer

Methods to be implemented by case bases of the current project.

Author:
myCBR Team

Nested Class Summary
static class ICaseBase.Meta
           
 
Method Summary
 void addCase(Instance caze)
           
 Instance containsCase(java.lang.String name)
          Returns true, if the case base contains a case with the given name.
 java.util.Collection<Instance> getCases()
          Returns all cases known for this case base.
 java.lang.String getName()
          Returns the name of the case base.
 Project getProject()
          Returns the project this case base belongs to
 boolean removeCase(java.lang.String name)
          Removes the case with the given name.
 void setName(java.lang.String name)
          Sets the name of this case base to name.
 
Methods inherited from interface java.util.Observer
update
 

Method Detail

getName

java.lang.String getName()
Returns the name of the case base. The case base is identified by its name

Returns:
the unique name of the case base

setName

void setName(java.lang.String name)
             throws java.lang.Exception
Sets the name of this case base to name. The name has to be unique, use commands to check uniqueness because case base does not know about the names of other case bases

Parameters:
name - the unique name of the case base
Throws:
java.lang.Exception - when there is a case base with that name

containsCase

Instance containsCase(java.lang.String name)
Returns true, if the case base contains a case with the given name.

Parameters:
name - the name of the case to be found
Returns:
the instance, if there is a case with this name, null otherwise.

removeCase

boolean removeCase(java.lang.String name)
Removes the case with the given name. Does nothing if there is none. There can at most be one case with the given name, since cases are identified by their name.

Parameters:
name - the name of the case to be deleted

getCases

java.util.Collection<Instance> getCases()
Returns all cases known for this case base.

Returns:
all cases contained in this case base.

addCase

void addCase(Instance caze)
Parameters:
caze - the case to be added

getProject

Project getProject()
Returns the project this case base belongs to

Returns:
the project this case base belongs to