de.dfki.mycbr.core.model
Class ConceptDesc

java.lang.Object
  extended by java.util.Observable
      extended by de.dfki.mycbr.core.model.AttributeDesc
          extended by de.dfki.mycbr.core.model.ConceptDesc
All Implemented Interfaces:
IExplainable, java.util.Observer

public class ConceptDesc
extends AttributeDesc

The vocabulary of a myCBR project consists of several attribute descriptions which describe a tree like structure as a class hierarchy (with composition and inheritance). The classes in this hierarchy are represented by objects of type c description. Each c description contains several other attribute descriptions (like integer, float, boolean descriptions ...). Concept description can have sub/super c description (representing inheritance) and can have c descriptions as attribute descriptions themselves (representing composition).

Author:
myCBR Team

Constructor Summary
ConceptDesc(Concept owner, java.lang.String name, Concept concept)
          Creates a new attribute description of type concept.
 
Method Summary
 boolean canOverride(AttributeDesc desc)
          Checks whether this attribute description can override the given attribute description
 void deleteAllFcts()
           
 boolean fits(Attribute att)
          Checks whether the given attribute fits this.
 boolean fitsSingle(Attribute att)
          Checks whether a single attribute fits the constraints for this.
 Concept getConcept()
           
 MultipleConfig getMultipleConfig(AmalgamationFct f)
           
 void setConcept(Concept c)
           
 void setMultipleConfig(AmalgamationFct f, MultipleConfig mc)
           
 void update(java.util.Observable o, java.lang.Object arg)
           
 
Methods inherited from class de.dfki.mycbr.core.model.AttributeDesc
delete, getAttribute, getExpType, getName, getOwner, isMultiple, setMultiple, setName, setOwner, toString
 
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, wait, wait, wait
 

Constructor Detail

ConceptDesc

public ConceptDesc(Concept owner,
                   java.lang.String name,
                   Concept concept)
            throws java.lang.Exception
Creates a new attribute description of type concept. This description belongs to the given owner and specifies a part-of relation with respect to concept.

Parameters:
owner -
name -
concept -
Throws:
java.lang.Exception
Method Detail

getConcept

public Concept getConcept()

canOverride

public boolean canOverride(AttributeDesc desc)
Description copied from class: AttributeDesc
Checks whether this attribute description can override the given attribute description

Specified by:
canOverride in class AttributeDesc

setConcept

public void setConcept(Concept c)

fits

public boolean fits(Attribute att)
Description copied from class: AttributeDesc
Checks whether the given attribute fits this. Be aware that if this is multiple then single values will not fit. For checking whether single values fit this description without taking multiple values into account call AttributeDesc.fitsSingle(Attribute)

Overrides:
fits in class AttributeDesc
Parameters:
att -
Returns:
true if the given attribute fits this description

fitsSingle

public boolean fitsSingle(Attribute att)
Description copied from class: AttributeDesc
Checks whether a single attribute fits the constraints for this. Returns true, if att is a valid SpecialAttribute or if att can be used as a single value of a multiple attribute. If this is not multiple calls AttributeDesc.fits(Attribute)

Overrides:
fitsSingle in class AttributeDesc
Parameters:
att - the attribute which should be checked
Returns:
true, when att can be used as value of this or in multiple attribute

deleteAllFcts

public void deleteAllFcts()
Specified by:
deleteAllFcts in class AttributeDesc

getMultipleConfig

public MultipleConfig getMultipleConfig(AmalgamationFct f)

setMultipleConfig

public void setMultipleConfig(AmalgamationFct f,
                              MultipleConfig mc)

update

public void update(java.util.Observable o,
                   java.lang.Object arg)
Specified by:
update in interface java.util.Observer
Overrides:
update in class AttributeDesc