public class TaxonomyFct extends SymbolFct
| Constructor and Description |
|---|
TaxonomyFct(Project prj,
SymbolDesc topSymbol,
java.util.List<SymbolAttribute> values,
java.lang.String name)
Initializes this with a new taxonomy as internal data structure.
|
| Modifier and Type | Method and Description |
|---|---|
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
|
calculateSimilarity, calculateSimilarity, getDesc, getMultipleConfig, getName, getProject, isSymmetric, setMultipleConfig, setName, setSimilarity, setSimilarity, setSimilarity, setSimilarity, setSymmetricpublic 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
donepublic void updateTable()
java.lang.Exceptionpublic void setNodeSimilarity(TaxonomyNode att, Similarity sim)
public Taxonomy getTaxonomy()
public void setQueryConfig(TaxonomyConfig queryConfig) throws java.lang.Exception
queryConfig - the queryConfig to setjava.lang.Exceptionpublic TaxonomyConfig getQueryConfig()
public void setCaseConfig(TaxonomyConfig caseConfig) throws java.lang.Exception
caseConfig - the caseConfig to setjava.lang.Exceptionpublic TaxonomyConfig getCaseConfig()
public void setParent(TaxonomyNode symbol, TaxonomyNode newParent)
symbol - the symbol to become a child of newParentnewParent - the new parent of symboljava.lang.Exceptionpublic java.lang.Object getCommonAncestor(SymbolAttribute symbolAtt1, SymbolAttribute symbolAtt2)
symbolAtt1 - first attributesymbolAtt2 - second attributepublic void update(java.util.Observable o,
java.lang.Object arg)
updateTable()public java.lang.Object getParent(TaxonomyNode currentNode)
Taxonomy.getParent(TaxonomyNode)currentNode - the node whose parent should be returnedpublic void clone(AttributeDesc descNEW, boolean active)
ISimFctpublic TaxonomyNode getTopSymbol()
public Similarity getSimilarity(TaxonomyNode node)
node - the nodepublic java.util.Collection<java.util.Map.Entry<TaxonomyNode,TaxonomyNode>> entrySet()