All Implemented Interfaces:
Filter, IMatcher<org.apache.jena.ontology.OntModel,Alignment,Properties>, eu.sealsproject.platform.res.domain.omt.IOntologyMatchingToolBridge, eu.sealsproject.platform.res.tool.api.IPlugin, eu.sealsproject.platform.res.tool.api.IToolBridge

public class CommonPropertiesFilter extends BaseFilterWithSetComparison implements Filter
Filter which deletes instance mappings if they have no matched properties in common.
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
      Default logger
    • excludeSameURIMapping

      private boolean excludeSameURIMapping
      If true, this excludes correspondences which maps to the same URI. e.g. rdf:type = rdf:type
    • minPropertyConfidence

      private double minPropertyConfidence
      The minimum confidence for which a property mapping is counted.
  • Constructor Details

    • CommonPropertiesFilter

      public CommonPropertiesFilter(double threshold, SetSimilarity setSimilarity, boolean excludeSameURIMapping, double minPropertyConfidence)
      Constructor with all necessary parameters.
      Parameters:
      threshold - The threshold which should be larger or equal to be a valid match.
      setSimilarity - The set similarity to choose when computing similarity value between the two distinct property sets.
      excludeSameURIMapping - If true, this excludes correspodences which maps to the same URI e.g. rdf:type = rdf:type
      minPropertyConfidence - The minimum confidence for which a property mapping is counted.
    • CommonPropertiesFilter

      public CommonPropertiesFilter(double threshold, SetSimilarity setSimilarity)
      Constructor with reduced parameters. Only threshold and setSimilarity is used.
      Parameters:
      threshold - The threshold which should be larger or equal to be a valid match.
      setSimilarity - The set similarity to choose when computing similarity value between the two distinct property sets.
    • CommonPropertiesFilter

      public CommonPropertiesFilter(double minNumberOfCommonProperties)
      Constructor with reduced parameters. It count all Property mappings in the alignment (regardless of their confidence - at least non negative) and excludes correspondences which maps to the same URI e.g. rdf:type = rdf:type
      Parameters:
      minNumberOfCommonProperties - Minimum number of properties which two instances has to have to be a valid and non filtered match.
    • CommonPropertiesFilter

      public CommonPropertiesFilter()
      Constructor with default parameters. It count all Property mappings in the alignment (regardless of their confidence - at least non negative) and excludes correspondences which maps to the same URI e.g. rdf:type = rdf:type. Furthermore it needs to have at least one overlapping property.
  • Method Details

    • match

      public Alignment match(org.apache.jena.ontology.OntModel source, org.apache.jena.ontology.OntModel target, Alignment inputAlignment, Properties properties) throws Exception
      Description copied from class: MatcherYAAAJena
      Aligns two ontologies specified via a Jena OntModel, with an input alignment as Alignment object, and returns the mapping of the resulting alignment. Note: This method might be called multiple times in a row when using the evaluation framework. Make sure to return a mapping which is specific to the given inputs.
      Specified by:
      match in interface IMatcher<org.apache.jena.ontology.OntModel,Alignment,Properties>
      Specified by:
      match in class MatcherYAAAJena
      Parameters:
      source - This OntModel represents the source ontology.
      target - This OntModel represents the target ontology.
      inputAlignment - This mapping represents the input alignment.
      properties - Additional properties.
      Returns:
      The resulting alignment of the matching process.
      Throws:
      Exception - Any exception which occurs during matching.
    • filter

      public Alignment filter(org.apache.jena.ontology.OntModel source, org.apache.jena.ontology.OntModel target, Alignment inputAlignment)
    • sharedProperties

      public static double sharedProperties(org.apache.jena.ontology.Individual individualSource, org.apache.jena.ontology.Individual individualTarget, Alignment inputAlignment, boolean excludeSameURIMapping, double minPropertyConfidence, SetSimilarity setComparator)
      Return the number of overlapping distinct properties.
      Parameters:
      individualSource - the individual source
      individualTarget - the individual target
      inputAlignment - the input alignment to check for property matches
      excludeSameURIMapping - if true, this excludes correspodences which maps to the same URI e.g. rdf:type = rdf:type
      minPropertyConfidence - the minmum confidence for which a property mapping is counted.
      setComparator - comparator for the two sets of distinct properties.
      Returns:
      number of distinct properties
    • getDistinctProperties

      private static Set<String> getDistinctProperties(org.apache.jena.ontology.Individual resource)
    • toString

      public String toString()
      Overrides:
      toString in class Object