Class SMAggregateImpl
java.lang.Object
de.uni_trier.wi2.procake.similarity.impl.SimilarityMeasureImpl
de.uni_trier.wi2.procake.similarity.base.aggregate.impl.SMAggregateImpl
- All Implemented Interfaces:
SMAggregate
,SimilarityMeasure
- Direct Known Subclasses:
SMAggregateWeightedImpl
Implementation of
SMAggregate
.- Author:
- Rainer Maximini
-
Field Summary
Fields inherited from interface de.uni_trier.wi2.procake.similarity.SimilarityMeasure
LOG_ORDER_NAME_NOT_FOUND
Fields inherited from interface de.uni_trier.wi2.procake.similarity.base.aggregate.SMAggregate
DEFAULT_IGNORE_NULL_ATTRIBUTES_IN_QUERY, LOG_ATTRIBUTE_NAME_NOT_FOUND, LOG_ATTRIBUTE_NOT_FOUND, PROPERTY_USER_WEIGHT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected SimilarityImpl
computeAttributeSimilarity
(SimilarityValuator valuator, DataObject queryObject, DataObject caseObject, String attName) getSimilaritiesToUse
(String attributeName) getSimilarityToUse
(String attributeName) protected void
Initialize measure based on existing instanceboolean
boolean
isSimilarityFor
(DataClass dataclass, String orderName) void
setIgnoreNullAttributesInQuery
(boolean ignoreNullAttributesInQuery) void
setSimilarityToUse
(String attributeName, String similarityToUse) In general, the element objects of the collection are compared with their default similarity measure.Methods inherited from class de.uni_trier.wi2.procake.similarity.impl.SimilarityMeasureImpl
getDataClass, getName, initialize, isAggregate, isForceOverride, isInterval, isNumeric, isObject, isReusable, isSet, isTable, isTaxonomy, isText, setDataClass, setForceOverride, setName, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface de.uni_trier.wi2.procake.similarity.SimilarityMeasure
compute, getDataClass, getName, getSystemName, isForceOverride, isReusable, setForceOverride
-
Constructor Details
-
SMAggregateImpl
public SMAggregateImpl()
-
-
Method Details
-
getSimilaritiesToUse
- Specified by:
getSimilaritiesToUse
in interfaceSMAggregate
- Returns:
- The defined names of the
SimilarityMeasure
s that should be used for the elements. - See Also:
-
getSimilarityToUse
- Specified by:
getSimilarityToUse
in interfaceSMAggregate
- Parameters:
attributeName
- The name of the attribute for which the specific similarity should be returned.- Returns:
- The name of the similarity measure, that should be used for this attribute. Can be null.
-
isSimilarityFor
- Specified by:
isSimilarityFor
in classSimilarityMeasureImpl
-
setSimilarityToUse
Description copied from interface:SMAggregate
In general, the element objects of the collection are compared with their default similarity measure. But in some situations it can be necessary to use another similarity measure for the elements of a collection. Therefore, it exists the possibility to specify a similarity measure name that should be used instead. For eachDataObject
a similarity measure with that name should exist. Otherwise, the comparision of objects are ignored.Summarizing:
- If the
newValue
isnull
the default measures of the objects are used. This is the default behaviour. - If the
newValue
is the name of a similarity measure, for each data class whose objects can be occured in the collection a similarity measure with this name must exist. Attention, this also include the common super classes of the objects.
- Specified by:
setSimilarityToUse
in interfaceSMAggregate
- Parameters:
attributeName
- The name of the element object.similarityToUse
- The name of the similarity measure that should be used for the elements.
- If the
-
getSimilaritiesToUse
- Specified by:
getSimilaritiesToUse
in interfaceSMAggregate
- Parameters:
attributeName
- The name of the element object.- Returns:
- The defined name of the
SimilarityMeasure
that should be used for the element.
-
computeAttributeSimilarity
protected SimilarityImpl computeAttributeSimilarity(SimilarityValuator valuator, DataObject queryObject, DataObject caseObject, String attName) -
isIgnoreNullAttributesInQuery
public boolean isIgnoreNullAttributesInQuery()- Specified by:
isIgnoreNullAttributesInQuery
in interfaceSMAggregate
- Returns:
-
setIgnoreNullAttributesInQuery
public void setIgnoreNullAttributesInQuery(boolean ignoreNullAttributesInQuery) - Specified by:
setIgnoreNullAttributesInQuery
in interfaceSMAggregate
-
initializeBasedOn
Description copied from class:SimilarityMeasureImpl
Initialize measure based on existing instance- Overrides:
initializeBasedOn
in classSimilarityMeasureImpl
- Parameters:
base
- similarity measure to base on
-