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

public abstract class SMAggregateImpl extends SimilarityMeasureImpl implements SMAggregate
Implementation of SMAggregate.
Author:
Rainer Maximini
  • Constructor Details

    • SMAggregateImpl

      public SMAggregateImpl()
  • Method Details

    • getSimilaritiesToUse

      public HashMap getSimilaritiesToUse()
      Specified by:
      getSimilaritiesToUse in interface SMAggregate
      Returns:
      The defined names of the SimilarityMeasures that should be used for the elements.
      See Also:
    • getSimilarityToUse

      public String getSimilarityToUse(String attributeName)
      Specified by:
      getSimilarityToUse in interface SMAggregate
      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

      public boolean isSimilarityFor(DataClass dataclass, String orderName)
      Specified by:
      isSimilarityFor in class SimilarityMeasureImpl
    • setSimilarityToUse

      public void setSimilarityToUse(String attributeName, String similarityToUse)
      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 each DataObject a similarity measure with that name should exist. Otherwise, the comparision of objects are ignored.

      Summarizing:

      • If the newValue is null 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 interface SMAggregate
      Parameters:
      attributeName - The name of the element object.
      similarityToUse - The name of the similarity measure that should be used for the elements.
    • getSimilaritiesToUse

      public String getSimilaritiesToUse(String attributeName)
      Specified by:
      getSimilaritiesToUse in interface SMAggregate
      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 interface SMAggregate
      Returns:
    • setIgnoreNullAttributesInQuery

      public void setIgnoreNullAttributesInQuery(boolean ignoreNullAttributesInQuery)
      Specified by:
      setIgnoreNullAttributesInQuery in interface SMAggregate
    • initializeBasedOn

      protected void initializeBasedOn(SimilarityMeasure base)
      Description copied from class: SimilarityMeasureImpl
      Initialize measure based on existing instance
      Overrides:
      initializeBasedOn in class SimilarityMeasureImpl
      Parameters:
      base - similarity measure to base on