public final class DefaultCaseBase extends java.util.Observable implements ICaseBase
de.dfki.mycbr.core.casebase.ICaseBase.Meta| Constructor and Description |
|---|
DefaultCaseBase(Project p,
java.lang.String cbName,
int count) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCase(Instance caze)
Adds a new case to the list of known cases for the given description.
|
Instance |
containsCase(java.lang.String caseName)
Tells whether this case base contains a case with the given name.
|
java.lang.String |
getAuthor() |
java.util.Collection<Instance> |
getCases()
Returns the list of cases known for this case base
|
java.util.Date |
getDate() |
java.text.DateFormat |
getDateFormat() |
java.lang.String |
getName()
Returns the unique name of this case base.
|
Project |
getProject()
Returns the project this case base belongs to
|
boolean |
removeCase(Instance c)
Removes the given c attribute from the list of known cases.
|
boolean |
removeCase(java.lang.String caseName)
Removes the first case with the given name.
|
void |
setAuthor(java.lang.String author) |
void |
setDate(java.util.Date date) |
void |
setName(java.lang.String cbName)
Sets the name of this case base to the given name.
|
void |
update(java.util.Observable arg0,
java.lang.Object arg1)
This observes all cases.
|
public DefaultCaseBase(Project p, java.lang.String cbName, int count) throws java.lang.Exception
cbName - the name of the case basep - the project this cb should belong tocount - the number of cases expected for this case basejava.lang.Exception - if name is null or empty or if the given project is null or
already has a case base with this namepublic java.util.Collection<Instance> getCases()
public void addCase(Instance caze)
public boolean removeCase(Instance c)
c - the case to be removedpublic java.lang.String getName()
public void setName(java.lang.String cbName)
throws java.lang.Exception
public Instance containsCase(java.lang.String caseName)
containsCase in interface ICaseBasecaseName - the name of the case to be checked forpublic boolean removeCase(java.lang.String caseName)
removeCase in interface ICaseBasecaseName - the name of the case to be removedpublic void update(java.util.Observable arg0,
java.lang.Object arg1)
update in interface java.util.Observerarg0 - observablearg1 - objectpublic void setAuthor(java.lang.String author)
author - the author to setpublic java.lang.String getAuthor()
public void setDate(java.util.Date date)
date - the date to setpublic java.util.Date getDate()
public java.text.DateFormat getDateFormat()
public Project getProject()
ICaseBasegetProject in interface ICaseBase