public class AmalgamationFct
extends java.util.Observable
implements java.util.Observer
| Constructor and Description |
|---|
AmalgamationFct(AmalgamationConfig type,
Concept c,
java.lang.String name)
Initializes this with the given type, description and inheritance
similarity.
|
| Modifier and Type | Method and Description |
|---|---|
Similarity |
calculateSimilarity(Attribute value1,
Attribute value2)
Returns the similarity of the given SimpleAttribute objects.
|
java.lang.Object |
getActiveFct(AttributeDesc att)
Gets the active similarity function for this attribute description.
|
Concept |
getConcept() |
java.lang.String |
getName()
Returns the name of this function.
|
Project |
getProject() |
AmalgamationConfig |
getType()
The type for the amalgamation.
|
java.lang.Number |
getWeight(AttributeDesc desc) |
java.lang.Boolean |
isActive(AttributeDesc att)
Attributes may be inactive, meaning that they appear in the model but
should not be used for similarity computations.
|
void |
remove(AttributeDesc desc) |
void |
setActive(AttributeDesc att,
boolean active)
Sets this attribute to active or inactive.
|
void |
setActiveFct(AttributeDesc att,
java.lang.Object activeSim)
Sets the active similarity function for this attribute description to
activeSim.
|
void |
setName(java.lang.String name)
Sets the name of this function to name.
|
void |
setType(AmalgamationConfig type)
Sets the type of this function to type.
|
void |
setWeight(AttributeDesc attDesc,
java.lang.Number weight)
Sets the weight of the given attribute to weight.
|
void |
setWeight(java.lang.String name,
java.lang.Number weight)
Sets the weight of the given attribute to weight.
|
void |
update(java.util.Observable arg0,
java.lang.Object arg1) |
public AmalgamationFct(AmalgamationConfig type, Concept c, java.lang.String name)
type - the amalgamation type (e.g. minimum, maximum, euclidean or
weighted sum)c - the concept to which this function can be
applied.name - the name of this functionpublic Concept getConcept()
public Similarity calculateSimilarity(Attribute value1, Attribute value2) throws java.lang.Exception
value1 - the query attributevalue2 - the case attributejava.lang.Exceptionpublic AmalgamationConfig getType()
AmalgamationConfigpublic void setType(AmalgamationConfig type)
type - AmalgamationConfigpublic java.lang.String getName()
public void setName(java.lang.String name)
name - the new name of this function.public void setWeight(AttributeDesc attDesc, java.lang.Number weight)
attDesc - the description of the attribute whose weight should be setweight - the new weight of the attributepublic void setWeight(java.lang.String name,
java.lang.Number weight)
name - the name of the attribute description whose weight should be setweight - the new weight of the attributepublic Project getProject()
public java.lang.Boolean isActive(AttributeDesc att)
public void setActive(AttributeDesc att, boolean active)
active - true, if this attribute is used for similarity computations,
false otherwisepublic void setActiveFct(AttributeDesc att, java.lang.Object activeSim)
activeSim - the activeSim to setpublic java.lang.Object getActiveFct(AttributeDesc att)
public void remove(AttributeDesc desc)
public java.lang.Number getWeight(AttributeDesc desc)
public void update(java.util.Observable arg0,
java.lang.Object arg1)
update in interface java.util.Observer