public class SymbolFct extends java.util.Observable implements ISimFct
| Constructor and Description |
|---|
SymbolFct(Project prj,
SymbolDesc desc,
java.lang.String name)
Initializes this by asking the given description
for the number of allowed symbols.
|
SymbolFct(SymbolFct f)
Initializes this by transforming the given symbol function into
a similarity table.
|
| Modifier and Type | Method and Description |
|---|---|
Similarity |
calculateSimilarity(Attribute attribute,
Attribute attribute2)
Returns the similarity of the given attributes.
|
Similarity |
calculateSimilarity(java.lang.String value1,
java.lang.String value2)
Returns the similarity of the given attributes.
|
void |
clone(AttributeDesc descNEW,
boolean active)
Creates a new function which is the same function
as this but with a different description, namely descNEW.
|
SymbolDesc |
getDesc()
Gets the symbol description of the attributes this function
is defined on
|
MultipleConfig |
getMultipleConfig() |
java.lang.String |
getName()
Returns the name of this function
|
Project |
getProject() |
boolean |
isSymmetric()
Specifies whether this function is symmetric or asymmetric
|
void |
setMultipleConfig(MultipleConfig mc) |
void |
setName(java.lang.String name)
Sets the name of this function to name
|
boolean |
setSimilarity(Attribute att1,
Attribute att2,
Similarity sim)
Sets the similarity of att1 and att2 to sim.
|
boolean |
setSimilarity(java.lang.String symbol1,
java.lang.String symbol2,
double sim)
Sets the similarity of the given symbols to a Similarity.get object
initialized with sim.
|
boolean |
setSimilarity(java.lang.String symbol1,
java.lang.String symbol2,
Similarity sim)
Sets the similarity the given symbols to sim.
|
boolean |
setSimilarity(SymbolAttribute att1,
SymbolAttribute att2,
double sim)
Sets the similarity of att1 and att2 to a Similarity.get object
initialized with sim.
|
void |
setSymmetric(boolean symmetric)
Specifies whether this function is symmetric or not.
|
void |
update(java.util.Observable o,
java.lang.Object arg) |
public SymbolFct(Project prj, SymbolDesc desc, java.lang.String name)
initTable()
to fill the table with default values.desc - the description of the given symbol attributespublic SymbolFct(SymbolFct f)
SimpleAttDesc.deleteSimFct(ISimFct) and then SimpleAttDesc.addFct(ISimFct)f - any symbol functionpublic Similarity calculateSimilarity(Attribute attribute, Attribute attribute2)
calculateSimilarity in interface ISimFctattribute - first attributeattribute2 - second attributejava.lang.Exceptionpublic Similarity calculateSimilarity(java.lang.String value1, java.lang.String value2) throws java.lang.Exception
value1 - first attributevalue2 - second attributejava.lang.Exceptionpublic boolean setSimilarity(SymbolAttribute att1, SymbolAttribute att2, double sim)
setSimilarity(Attribute, Attribute, Similarity)att1 - the first attributeatt2 - the second attributesim - the Similarity.getpublic boolean setSimilarity(java.lang.String symbol1,
java.lang.String symbol2,
double sim)
setSimilarity(Attribute, Attribute, Similarity)symbol1 - the first attribute's valuesymbol2 - the second attribute's valuesim - the Similarity.getpublic boolean setSimilarity(java.lang.String symbol1,
java.lang.String symbol2,
Similarity sim)
setSimilarity(Attribute, Attribute, Similarity)symbol1 - the first attribute's valuesymbol2 - the second attribute's valuesim - the Similarity.getpublic boolean setSimilarity(Attribute att1, Attribute att2, Similarity sim)
att1 - the first attributeatt2 - the second attributesim - the Similarity.getpublic boolean isSymmetric()
ISimFctisSymmetric in interface ISimFctpublic void setSymmetric(boolean symmetric)
setSymmetric in interface ISimFctsymmetric - true, if this function is symmetric, false otherwisepublic SymbolDesc getDesc()
public java.lang.String getName()
ISimFctpublic void setName(java.lang.String name)
ISimFctpublic Project getProject()
getProject in interface ISimFctpublic MultipleConfig getMultipleConfig()
getMultipleConfig in interface ISimFctpublic void setMultipleConfig(MultipleConfig mc)
setMultipleConfig in interface ISimFctpublic void update(java.util.Observable o,
java.lang.Object arg)
update in interface java.util.Observerpublic void clone(AttributeDesc descNEW, boolean active)
ISimFct