de.dfki.mycbr.core.model
Class SpecialDesc

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.SymbolDesc
                  extended by de.dfki.mycbr.core.model.SpecialDesc
All Implemented Interfaces:
IExplainable, TaxonomyNode, java.util.Observer

public class SpecialDesc
extends SymbolDesc

Special values are values that can be used for any attribute description. Here you can define the allowed values of the special value description of this project.

Author:
myCBR Team

Constructor Summary
SpecialDesc(Project p, java.util.HashSet<java.lang.String> allowedValues)
          For initializing special value desc.
 
Method Summary
 SpecialFct addSpecialFct(java.lang.String name, boolean active)
          Creates a new SymbolFct for the given description.
 Attribute getAttribute(java.lang.String value)
          Returns SymbolAttribute object representing the specified value.
static SpecialDesc getDefault()
           
 java.lang.Integer getIndexOf(SpecialAttribute att)
           
 void removeSymbol(java.lang.String value)
          Removes the given string from the list of allowed symbols.
 
Methods inherited from class de.dfki.mycbr.core.model.SymbolDesc
addOrderedSymbolFct, addSymbol, addSymbolFct, addTaxonomyFct, canOverride, fits, fitsSingle, getAllowedValues, getIndexOf, getNodes, getSymbolAttributes, isAllowedValue, renameValue
 
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, 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

SpecialDesc

public SpecialDesc(Project p,
                   java.util.HashSet<java.lang.String> allowedValues)
            throws java.lang.Exception
For initializing special value desc.

Parameters:
p - the project this description belongs to
allowedValues - the values which can be used for attributes of this description
Throws:
java.lang.Exception - if something goes wrong during creation of special value function
Method Detail

getDefault

public static SpecialDesc getDefault()

getAttribute

public final Attribute getAttribute(java.lang.String value)
Returns SymbolAttribute object representing the specified value.

Overrides:
getAttribute in class SymbolDesc
Parameters:
value - the string representing the value that should be returned
Returns:
value representing the specified string, null if there is none.

getIndexOf

public final java.lang.Integer getIndexOf(SpecialAttribute att)
Parameters:
att - the attribute whose index should be returned
Returns:
the index of the given attribute or null if it does not belong to this

removeSymbol

public final void removeSymbol(java.lang.String value)
Removes the given string from the list of allowed symbols.

Overrides:
removeSymbol in class SymbolDesc
Parameters:
value - the value which should be removed as allowed value of this

addSpecialFct

public final SpecialFct addSpecialFct(java.lang.String name,
                                      boolean active)
Creates a new SymbolFct for the given description.

Parameters:
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 symbol function