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 SimilarHierarchyFilter extends MatcherYAAAJena implements Filter
Check if already matched individuals have a similar hierarchy (class hierarchy). For different computation methods see SimilarHierarchyFilterApproach.
  • Field Details

    • LOGGER

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

      protected org.apache.jena.rdf.model.Property instanceToHierarchyProperty
      Property connecting the instance to the hierarchy (usually rdf:type).
    • hierarchyProperty

      protected org.apache.jena.rdf.model.Property hierarchyProperty
      Property connecting the hierarchy together (usually rdfs:subClassOf).
    • hierarchyMatcher

      protected MatcherYAAAJena hierarchyMatcher
      A matcher which selects or creates some correspondences which forms an alignment for the hierarchy nodes.
    • approach

      protected SimilarHierarchyFilterApproach approach
      Which approach to determine the confidence.
    • threshold

      protected double threshold
      The threshold to compare with the calculated confidence.
  • Constructor Details

    • SimilarHierarchyFilter

      public SimilarHierarchyFilter()
    • SimilarHierarchyFilter

      public SimilarHierarchyFilter(org.apache.jena.rdf.model.Property instanceToHierarchyProperty, org.apache.jena.rdf.model.Property hierarchyProperty, MatcherYAAAJena hierarchyMatcher, SimilarHierarchyFilterApproach approach, double threshold)
  • 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.
    • getNormalizedHierarchyLevels

      public Map<String,Double> getNormalizedHierarchyLevels(org.apache.jena.ontology.Individual i)
      Returns the hierarchy levels computed by the agony algorithm.
      Parameters:
      i - the individual to start with.
      Returns:
      map from hierarchical element uri to the normalized hierarchy level
    • getNormalizedDepths

      public Map<String,Double> getNormalizedDepths(org.apache.jena.ontology.Individual i)
    • inverseAndNormalizeMapValues

      private Map<String,Double> inverseAndNormalizeMapValues(Map<org.apache.jena.rdf.model.Resource,Integer> map)
    • getObjectAsResource

      protected List<org.apache.jena.rdf.model.Resource> getObjectAsResource(org.apache.jena.rdf.model.StmtIterator i)
    • toString

      public String toString()
      Overrides:
      toString in class Object