|
||||||||||
| 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.similarity.SymbolFct
de.dfki.mycbr.core.similarity.TaxonomyFct
public class TaxonomyFct
Similarity function for symbol descriptions. The allowed values are structured using a tree. The root is the symbol's description. The children are maintained using a hash map. For each node in the tree (represented by pairs) we save a SymbolAttribute or SymbolDesc respectively and a similarity value of the children
| Constructor Summary | |
|---|---|
TaxonomyFct(Project prj,
SymbolDesc topSymbol,
java.util.List<SymbolAttribute> values,
java.lang.String name)
Initializes this with a new taxonomy as internal data structure. |
|
| Method Summary | |
|---|---|
void |
clone(AttributeDesc descNEW,
boolean active)
Creates a new function which is the same function as this but with a different description, namely descNEW. |
java.util.Collection<java.util.Map.Entry<TaxonomyNode,TaxonomyNode>> |
entrySet()
|
TaxonomyConfig |
getCaseConfig()
|
java.lang.Object |
getCommonAncestor(SymbolAttribute symbolAtt1,
SymbolAttribute symbolAtt2)
Returns the node of the taxonomy which represents the deepest ancestor of the given symbol attributes. |
java.lang.Object |
getParent(TaxonomyNode currentNode)
Returns the parent of the given node. |
TaxonomyConfig |
getQueryConfig()
|
Similarity |
getSimilarity(TaxonomyNode node)
|
Taxonomy |
getTaxonomy()
Gets the internal data structure of this function. |
TaxonomyNode |
getTopSymbol()
Returns the top symbol of the underlying taxonomy. |
void |
setCaseConfig(TaxonomyConfig caseConfig)
|
void |
setNodeSimilarity(TaxonomyNode att,
Similarity sim)
|
void |
setParent(TaxonomyNode symbol,
TaxonomyNode newParent)
Changes the parent of symbol to newParent. |
void |
setQueryConfig(TaxonomyConfig queryConfig)
|
void |
update(java.util.Observable o,
java.lang.Object arg)
Updates the underlying symbol table when the taxonomy changes. |
void |
updateTable()
Updates the similarity for each attribute combination in the underlying table according to the similarity specified by the taxonomy |
| Methods inherited from class de.dfki.mycbr.core.similarity.SymbolFct |
|---|
calculateSimilarity, calculateSimilarity, getDesc, getMultipleConfig, getName, getProject, isSymmetric, setMultipleConfig, setName, setSimilarity, setSimilarity, setSimilarity, setSimilarity, setSymmetric |
| 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 TaxonomyFct(Project prj,
SymbolDesc topSymbol,
java.util.List<SymbolAttribute> values,
java.lang.String name)
topSymbol - the description to which this function belongs tovalues - the allowed symbol for which similarity computations should be
done| Method Detail |
|---|
public void updateTable()
java.lang.Exception
public void setNodeSimilarity(TaxonomyNode att,
Similarity sim)
public Taxonomy getTaxonomy()
public void setQueryConfig(TaxonomyConfig queryConfig)
throws java.lang.Exception
queryConfig - the queryConfig to set
java.lang.Exceptionpublic TaxonomyConfig getQueryConfig()
public void setCaseConfig(TaxonomyConfig caseConfig)
throws java.lang.Exception
caseConfig - the caseConfig to set
java.lang.Exceptionpublic TaxonomyConfig getCaseConfig()
public void setParent(TaxonomyNode symbol,
TaxonomyNode newParent)
symbol - the symbol to become a child of newParentnewParent - the new parent of symbol
java.lang.Exception
public java.lang.Object getCommonAncestor(SymbolAttribute symbolAtt1,
SymbolAttribute symbolAtt2)
symbolAtt1 - first attributesymbolAtt2 - second attribute
public void update(java.util.Observable o,
java.lang.Object arg)
updateTable()
update in interface java.util.Observerupdate in class SymbolFctpublic java.lang.Object getParent(TaxonomyNode currentNode)
Taxonomy.getParent(TaxonomyNode)
currentNode - the node whose parent should be returned
public void clone(AttributeDesc descNEW,
boolean active)
ISimFct
clone in interface ISimFctclone in class SymbolFctpublic TaxonomyNode getTopSymbol()
public Similarity getSimilarity(TaxonomyNode node)
node - the node
public java.util.Collection<java.util.Map.Entry<TaxonomyNode,TaxonomyNode>> entrySet()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||