de.dfki.mycbr.core.model
Class StringDesc

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

public class StringDesc
extends SimpleAttDesc

Description for string attributes. This description does not define restrictions for its values, since all strings are allowed.

Author:
myCBR Team

Constructor Summary
StringDesc(Concept owner, java.lang.String name)
          Initializes this with the given name.
 
Method Summary
 StringFct addStringFct(StringConfig config, java.lang.String name, boolean active)
          Creates a new StringFct for the given description.
 boolean canOverride(AttributeDesc desc)
          Checks whether this can override the given description.
 StringAttribute getStringAttribute(java.lang.String string)
          Returns StringAttribute object representing the specified string.
 
Methods inherited from class de.dfki.mycbr.core.model.SimpleAttDesc
addFct, deleteAllFcts, deleteSimFct, getFct, getSimFcts, renameFct
 
Methods inherited from class de.dfki.mycbr.core.model.AttributeDesc
delete, fits, fitsSingle, getAttribute, getExpType, getName, getOwner, isMultiple, setMultiple, setName, setOwner, toString, update
 
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

StringDesc

public StringDesc(Concept owner,
                  java.lang.String name)
           throws java.lang.Exception
Initializes this with the given name.

Parameters:
owner - the owner of this description
name - the name of this description
Throws:
java.lang.Exception - if the owner already has a description for this name
Method Detail

getStringAttribute

public final StringAttribute getStringAttribute(java.lang.String string)
Returns StringAttribute object representing the specified string.

Parameters:
string - the string representing the value that should be returned
Returns:
value representing the specified string.

addStringFct

public final StringFct addStringFct(StringConfig config,
                                    java.lang.String name,
                                    boolean active)
Creates a new StringFct for the given description.

Parameters:
config - the configuration for the function to be created
name - the name of the new function
active - if true, the new function will be used in all amalgamation functions known for the owner of this
Returns:
the new StringFct for this

canOverride

public final boolean canOverride(AttributeDesc desc)
Checks whether this can override the given description.

Specified by:
canOverride in class SimpleAttDesc
Parameters:
desc - the description to be overridden.
Returns:
true, if the given description can be overridden by this, false otherwise