|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
de.dfki.mycbr.core.model.Concept
public class Concept
Concepts define the entities in the model. You can build up inheritance hierarchies. Concepts have a set of attribute descriptions and a set of amalgamation functions. The active amalgamation function defines how to calculate the overall similarity of two instances of this concept. There is a set of instances associated with each concept (via a concept range). These instances are used to build up the case base.
| Constructor Summary | |
|---|---|
Concept(java.lang.String ID,
Project project,
Concept superConcept)
Initializes this with the given name. |
|
| Method Summary | |
|---|---|
AmalgamationFct |
addAmalgamationFct(AmalgamationConfig amalgam,
java.lang.String name,
boolean active)
Creates a new AmalgamationFct for the given description. |
void |
addAttributeDesc(AttributeDesc desc)
Adds given description as attribute description to current c description. |
boolean |
addInstance(Instance i)
Adds the given instance to this concept's range. |
Instance |
addInstance(java.lang.String name)
Adds a new instance to this concept's range. |
void |
addPartOfRelation(ConceptDesc desc)
Adds desc as a part of relation of this concept. |
boolean |
addSubConcept(Concept c,
boolean isNew)
Adds the given concept as sub concept of this. |
boolean |
canOverride(Concept c)
|
Instance |
copyInstance(Instance original,
java.lang.String newName)
|
void |
delete()
Deletes the concept with the given ID from this model |
void |
deleteAmalgamFct(AmalgamationFct f)
Deletes the given function from the list of known functions for the given description. |
void |
deletePartOfRelation(ConceptDesc desc)
Removes the given description as part-of relation. |
AmalgamationFct |
getActiveAmalgamFct()
Get the value of activeSimFcts |
java.util.HashMap<java.lang.String,AttributeDesc> |
getAllAttributeDescs()
Gets the attribute descriptions of this c including inherited attributes. |
java.util.Collection<Instance> |
getAllInstances()
Get all instances known for this concept including instances of sub concepts. |
java.util.HashMap<java.lang.String,Concept> |
getAllSubConcepts()
Gets all sub c descriptions by inheritance. |
AttributeDesc |
getAttributeDesc(java.lang.String name)
Returns the attribute description with the given name visible in this concept. |
java.util.HashMap<java.lang.String,AttributeDesc> |
getAttributeDescs()
Gets the attribute descriptions of this c Be aware that the inherited attribute descriptions are not returned by this method. |
java.util.Vector<AttributeDesc> |
getAttributesOfSubDescsForName(java.lang.String name)
Searches for an attribute with the given name. |
java.util.List<AmalgamationFct> |
getAvailableAmalgamFcts()
Returns the available similarity functions for the specified description |
java.util.Collection<Instance> |
getDirectInstances()
Returns the instances of this concept. |
Explainable |
getExpType()
|
AmalgamationFct |
getFct(java.lang.String name)
|
Instance |
getInstance(java.lang.String name)
Returns the instance of this with name name and null if there is none. |
java.lang.String |
getName()
|
java.util.Vector<ConceptDesc> |
getPartOfRelations()
Returns all part-of relation known for this concept. |
Project |
getProject()
Returns the current project. |
Instance |
getQueryInstance()
Returns a new instance that can be used as a query object for retrieval. |
java.util.HashMap<java.lang.String,Concept> |
getSubConcepts()
Gets the sub c descriptions by inheritance. |
Concept |
getSuperConcept()
|
boolean |
hasAttributeDesc(java.lang.String name)
|
boolean |
hasDirectAttributeDesc(java.lang.String name)
|
boolean |
removeAttributeDesc(java.lang.String name)
Removes the attribute given by name from the attributes of this c. |
void |
removeInstance(java.lang.String name)
|
Concept |
removeSubConcept(java.lang.String name)
Removes the sub concept with name name. |
void |
renameAmalgamationFct(java.lang.String nameOLD,
java.lang.String nameNEW)
Should be called when name of an sub concept changes. |
void |
renameAttDesc(java.lang.String name,
java.lang.String name2)
Sets the name of the attribute description given by name to name2. |
void |
renameInstance(java.lang.String name,
java.lang.String name2)
Renames the instance with name name. |
void |
renameSubConcept(java.lang.String nameOLD,
java.lang.String nameNEW)
Should be called when name of an sub concept changes. |
void |
setActiveAmalgamFct(AmalgamationFct amalgam)
Set the active amalgamation function for this. |
void |
setAllInstancesMultiple(AttributeDesc desc)
|
void |
setAllInstancesSingle(AttributeDesc desc)
|
void |
setName(java.lang.String id)
Rename this c if possible. |
void |
setSuperConcept(Concept c,
boolean isNew)
Moves this concept in the inheritance hierarchy. |
void |
update(java.util.Observable o,
java.lang.Object arg)
|
| Methods inherited from class java.util.Observable |
|---|
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Concept(java.lang.String ID,
Project project,
Concept superConcept)
throws java.lang.Exception
ID - the ID to be used for this description.
java.lang.Exception| Method Detail |
|---|
public java.util.HashMap<java.lang.String,Concept> getSubConcepts()
public java.util.HashMap<java.lang.String,Concept> getAllSubConcepts()
public AmalgamationFct getFct(java.lang.String name)
public Concept removeSubConcept(java.lang.String name)
name - the name of the sub concept to be removed
public void renameSubConcept(java.lang.String nameOLD,
java.lang.String nameNEW)
nameOLD - the name of the sub concept to be renamednameNEW - the new namepublic Concept getSuperConcept()
public void removeInstance(java.lang.String name)
public void setSuperConcept(Concept c,
boolean isNew)
c - the new super concept of this
public boolean addSubConcept(Concept c,
boolean isNew)
c - the concept to be added as sub concept
public void setName(java.lang.String id)
throws java.lang.Exception
id - the new ID for this concept
java.lang.Exceptionpublic java.util.HashMap<java.lang.String,AttributeDesc> getAttributeDescs()
getAllAttributeDescs()
public java.util.HashMap<java.lang.String,AttributeDesc> getAllAttributeDescs()
public void addAttributeDesc(AttributeDesc desc)
throws java.lang.Exception
desc - the attribute description to be added to this description
java.lang.Exceptionpublic boolean hasDirectAttributeDesc(java.lang.String name)
public boolean hasAttributeDesc(java.lang.String name)
public java.util.Vector<AttributeDesc> getAttributesOfSubDescsForName(java.lang.String name)
public boolean removeAttributeDesc(java.lang.String name)
name -
public boolean canOverride(Concept c)
public Project getProject()
public java.util.Collection<Instance> getDirectInstances()
public java.util.Collection<Instance> getAllInstances()
public void addPartOfRelation(ConceptDesc desc)
desc - the description which has a part-of relation to thispublic java.util.Vector<ConceptDesc> getPartOfRelations()
public void deletePartOfRelation(ConceptDesc desc)
desc - the part-of relation to be removedpublic void delete()
public Instance getInstance(java.lang.String name)
name -
public Instance getQueryInstance()
public Instance addInstance(java.lang.String name)
throws java.lang.Exception
name - the name of the new instance
java.lang.Exception - if name is null or empty
public Instance copyInstance(Instance original,
java.lang.String newName)
throws java.lang.Exception
java.lang.Exceptionpublic boolean addInstance(Instance i)
i - the new instance
public void renameInstance(java.lang.String name,
java.lang.String name2)
name - name of the instance to be renamedname2 - new name of the instancepublic void deleteAmalgamFct(AmalgamationFct f)
f - the function to be deleted
public AmalgamationFct addAmalgamationFct(AmalgamationConfig amalgam,
java.lang.String name,
boolean active)
name - the description for which a new function should be created
public AmalgamationFct getActiveAmalgamFct()
public void setActiveAmalgamFct(AmalgamationFct amalgam)
amalgam - the new amalgamation functionpublic java.util.List<AmalgamationFct> getAvailableAmalgamFcts()
public void renameAmalgamationFct(java.lang.String nameOLD,
java.lang.String nameNEW)
nameOLD - the name of the sub concept to be renamednameNEW - the new namepublic AttributeDesc getAttributeDesc(java.lang.String name)
name - the name of the attribute description to be returned
public void renameAttDesc(java.lang.String name,
java.lang.String name2)
name - name2 - public java.lang.String getName()
getName in interface IExplainablepublic Explainable getExpType()
getExpType in interface IExplainable
public void update(java.util.Observable o,
java.lang.Object arg)
update in interface java.util.Observerpublic void setAllInstancesMultiple(AttributeDesc desc)
desc - the description that now uses multiple attributes as valuespublic void setAllInstancesSingle(AttributeDesc desc)
desc - the description that now uses single attributes as values
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||