Interface SimilarityModel

    • Method Detail

      • overwriteMatchingDataClasses

        void overwriteMatchingDataClasses​(Model other)
        Checks for each measure if it contains a DataClass reference that is present in the given 'other' Model. If so, it replaces that reference.
        Parameters:
        other - The Model whose dataclasses should be referenced
      • createSimilarityMeasure

        SimilarityMeasure createSimilarityMeasure​(String name,
                                                  DataClass dataClass)
        Creates a new SimilarityMeasure  that is not automatically registered. The registration must be done with the addSimilarityMeasure(SimilarityMeasure, String) method.
        Parameters:
        name - Each similarity measure contains a static field "NAME" that contains the name of the similarity measure, e.g., SMAggregateAverage.NAME. If this field does not exists, the similarity measure can not be instantiated.
        dataClass - The DataClass for that the similarity measure should be created.
        Returns:
        The new SimilarityMeasure  or null if the name does not relate to a similarity measure or the similarity measure does not fit to the data class
      • createAndRegisterSimilarityMeasure

        SimilarityMeasure createAndRegisterSimilarityMeasure​(String uniqueName,
                                                             String measureTemplateName,
                                                             DataClass dataClass)
                                                      throws NameAlreadyExistsException
        Creates a new SimilarityMeasure  and registers
        Parameters:
        uniqueName - a new unique name to identify the new measure
        measureTemplateName - Each similarity measure contains a static field "NAME" that contains the name of the similarity measure, e.g., SMAggregateAverage.NAME. If this field does not exists, the similarity measure can not be instantiated.
        dataClass - The DataClass for that the similarity measure should be created.
        Returns:
        The new SimilarityMeasure  or null if the name does not relate to a similarity * measure or the similarity measure does not fit to the data class
        Throws:
        NameAlreadyExistsException - is thrown if the given name is already defined for the data class.
      • getSimilarityMeasures

        List<SimilarityMeasure> getSimilarityMeasures()
        Returns:
        all available similarity measures also including system similarity measures
      • getSimilarityMeasure

        SimilarityMeasure getSimilarityMeasure​(DataClass dataClass)
        Returns a suitable similarity measure for the given data class. Default measures are preferred over other suitable measures.
        Parameters:
        dataClass - The data class for that a suitable SimilarityMeasure should be retrieved.
        Returns:
        A SimilarityMeasure for the given data class.
      • getPossibleSimilarityMeasureFor

        String[] getPossibleSimilarityMeasureFor​(DataClass dataClass)
        Computes all similarity measure that are possible for the given data class without any order.
        Parameters:
        dataClass - The data class for that the available SimilarityMeasures should be retrieved.
        Returns:
        An array of available SimilarityMeasure names for the given data class.
      • getPossibleSimilarityMeasureFor

        String[] getPossibleSimilarityMeasureFor​(DataClass dataClass,
                                                 String simName)
        Computes all similarity measure that are possible for the given data class / order combination. This does not includes similarity measures that are also possible without the order.
        Parameters:
        dataClass - The data class for that the available SimilarityMeasures should be retrieved.
        simName - The name of the similarity that should be used.
        Returns:
        An array of SimilarityMeasure names for the given data class and order.
      • getSimilarityNamesFor

        String[] getSimilarityNamesFor​(DataClass dataClass)
        Parameters:
        dataClass - The data class for that the registered SimilarityMeasure names should be retrieved.
        Returns:
        An array of names of the registered SimilarityMeasures for the given data class.
      • removeSimilarityMeasure

        SimilarityMeasure removeSimilarityMeasure​(DataClass dataClass,
                                                  String name)
        Removes the similarity measure with the given name for the given data class.
        Parameters:
        dataClass - The data class whos similarity measure should be removed.
        name - The name of the similarity measure that should be removed.
        Returns:
        The removed similarity measure or null if the measure was not found.
      • removeSimilarityMeasure

        SimilarityMeasure removeSimilarityMeasure​(SimilarityMeasure measure)
        Removes the given similarity measure.
        Parameters:
        measure - The similarity measure that should be removed;
        Returns:
        The removed similarity measure or null if the measure was not found.
      • isDefaultSimilarityMeasure

        boolean isDefaultSimilarityMeasure​(SimilarityMeasure similarityMeasure)
        Parameters:
        similarityMeasure - The similarity measure
        Returns:
        Returns true, if given measure is defined as default.
      • addParameter

        void addParameter​(String name,
                          String value)
        Adds the given name and value to the similarity parameter list. If the name is already used, the previous value will be overwritten with the given value.
        Parameters:
        name - The name of the parameter
        value - The value of the parameter
      • removeParameter

        void removeParameter​(String name)
        The parameter with the given name will be removed from the internal parameter-list
        Parameters:
        name -
      • getParameter

        String getParameter​(String name)
        The value with the given parameter name will be returned.
        Parameters:
        name -
        Returns:
        The requested value
      • getAllParameters

        Map<String,​String> getAllParameters()
        Returns a complete list of all parameters in the system. This is a copy of the internal map, so modifications to this map do not harm the internal map.
        Returns: