java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_base.typetransformer.GenericMatcherCaller

public class GenericMatcherCaller extends Object
This matcher caller expects some matcher object and all other paramters as objects as well and call it with appropriate type transformers such that the call can actually happen.
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
  • Constructor Details

    • GenericMatcherCaller

      public GenericMatcherCaller()
  • Method Details

    • runMatcher

      public static AlignmentAndParameters runMatcher(Object matcher, Object sourceOntology, Object targetOntology) throws Exception
      Calls a matcher object with the provided arguments.
      Parameters:
      matcher - the matcher can be:
      • an object / instance which implements/extends IMatcher, IMatcherCaller, or IOntologyMatchingToolBridge
      • a class object: a class which implements one of the above interfaces/classes - a new instance of this class will be created.
      • a string: the fully qualified name of a class which implements one of the above interfaces/classes like de.uni_mannheim.informatik.dws.melt.matching_base.MyMatcher - a new instance of this class will be created.
      sourceOntology - this object represents the source ontology
      targetOntology - this object represents the taregt ontology
      Returns:
      the object which is returned by the matcher. This can be any arbitrary object, but you can call the TypeTransformerRegistry to get the representation you want.
      Throws:
      Exception - in case something goes wrong
    • runMatcher

      public static AlignmentAndParameters runMatcher(Object matcher, Object sourceOntology, Object targetOntology, Object inputAlignment) throws Exception
      Calls a matcher object with the provided arguments.
      Parameters:
      matcher - the matcher can be:
      • an object / instance which implements/extends IMatcher, IMatcherCaller, or IOntologyMatchingToolBridge
      • a class object: a class which implements one of the above interfaces/classes - a new instance of this class will be created.
      • a string: the fully qualified name of a class which implements one of the above interfaces/classes like de.uni_mannheim.informatik.dws.melt.matching_base.MyMatcher - a new instance of this class will be created.
      sourceOntology - this object represents the source ontology
      targetOntology - this object represents the taregt ontology
      inputAlignment - the object which represents an input alignment. Can be null.
      Returns:
      the object which is returned by the matcher. This can be any arbitrary object, but you can call the TypeTransformerRegistry to get the representation you want.
      Throws:
      Exception - in case something goes wrong
    • runMatcher

      public static AlignmentAndParameters runMatcher(Object matcher, Object sourceOntology, Object targetOntology, Object inputAlignment, Object parameters) throws Exception
      Calls a matcher object with the provided arguments.
      Parameters:
      matcher - the matcher can be:
      • an object / instance which implements/extends IMatcher, IMatcherCaller, or IOntologyMatchingToolBridge
      • a class object: a class which implements one of the above interfaces/classes - a new instance of this class will be created.
      • a string: the fully qualified name of a class which implements one of the above interfaces/classes like de.uni_mannheim.informatik.dws.melt.matching_base.MyMatcher - a new instance of this class will be created.
      sourceOntology - this object represents the source ontology
      targetOntology - this object represents the taregt ontology
      inputAlignment - the object which represents an input alignment. Can be null.
      parameters - an objetc which represents parameters. Can be null.
      Returns:
      the object which is returned by the matcher. This can be any arbitrary object, but you can call the TypeTransformerRegistry to get the representation you want.
      Throws:
      Exception - in case something goes wrong
    • runMatcherMultipleRepresentations

      public static AlignmentAndParameters runMatcherMultipleRepresentations(Object matcher, Set<Object> sourceOntology, Set<Object> targetOntology) throws Exception
      Calls a matcher object with the provided arguments.
      Parameters:
      matcher - the matcher can be:
      • an object / instance which implements/extends IMatcher, IMatcherCaller, or IOntologyMatchingToolBridge
      • a class object: a class which implements one of the above interfaces/classes - a new instance of this class will be created.
      • a string: the fully qualified name of a class which implements one of the above interfaces/classes like de.uni_mannheim.informatik.dws.melt.matching_base.MyMatcher - a new instance of this class will be created.
      sourceOntology - this is an iterable of objects which all represents the same source ontology / knowledge graph
      targetOntology - this is an iterable of objects which all represents the same target ontology / knowledge graph
      Returns:
      the object which is returned by the matcher. This can be any arbitrary object, but you can call the TypeTransformerRegistry to get the representation you want.
      Throws:
      Exception - in case something goes wrong
    • runMatcherMultipleRepresentations

      public static AlignmentAndParameters runMatcherMultipleRepresentations(Object matcher, Set<Object> sourceOntology, Set<Object> targetOntology, Object inputAlignment) throws Exception
      Calls a matcher object with the provided arguments.
      Parameters:
      matcher - the matcher can be:
      • an object / instance which implements/extends IMatcher, IMatcherCaller, or IOntologyMatchingToolBridge
      • a class object: a class which implements one of the above interfaces/classes - a new instance of this class will be created.
      • a string: the fully qualified name of a class which implements one of the above interfaces/classes like de.uni_mannheim.informatik.dws.melt.matching_base.MyMatcher - a new instance of this class will be created.
      sourceOntology - this is an iterable of objects which all represents the same source ontology / knowledge graph
      targetOntology - this is an iterable of objects which all represents the same target ontology / knowledge graph
      inputAlignment - the object which represents an input alignment. Can be null.
      Returns:
      the object which is returned by the matcher. This can be any arbitrary object, but you can call the TypeTransformerRegistry to get the representation you want.
      Throws:
      Exception - in case something goes wrong
    • runMatcherMultipleRepresentations

      public static AlignmentAndParameters runMatcherMultipleRepresentations(Object matcher, Set<Object> sourceOntology, Set<Object> targetOntology, Object inputAlignment, Object parameters) throws Exception
      Calls a matcher object with the provided arguments.
      Parameters:
      matcher - the matcher can be:
      • an object / instance which implements/extends IMatcher, IMatcherCaller, or IOntologyMatchingToolBridge
      • a class object: a class which implements one of the above interfaces/classes - a new instance of this class will be created.
      • a string: the fully qualified name of a class which implements one of the above interfaces/classes like de.uni_mannheim.informatik.dws.melt.matching_base.MyMatcher - a new instance of this class will be created.
      sourceOntology - this is an iterable of objects which all represents the same source ontology / knowledge graph
      targetOntology - this is an iterable of objects which all represents the same target ontology / knowledge graph
      inputAlignment - the object which represents an input alignment. Can be null.
      parameters - An object which represents parameters. Can be null.
      Returns:
      the object which is returned by the matcher. This can be any arbitrary object, but you can call the TypeTransformerRegistry to get the representation you want.
      Throws:
      Exception - in case something goes wrong
    • runIOntologyMatchingToolBridge

      private static AlignmentAndParameters runIOntologyMatchingToolBridge(eu.sealsproject.platform.res.domain.omt.IOntologyMatchingToolBridge matcher, Set<Object> sourceOntology, Set<Object> targetOntology, Object inputAlignment, Object parameters) throws Exception
      Runs a matcher which implements the IOntologyMatchingToolBridge interface.
      Parameters:
      matcher - the matcher object
      sourceOntology - the source ontology / knowledge graph
      targetOntology - the taregt ontology / knowledge graph
      inputAlignment - the input alignment
      parameters - the parameters
      Returns:
      alignment and parameters
      Throws:
      Exception - in case somethign goes wrong
    • runIMatcher

      private static AlignmentAndParameters runIMatcher(IMatcher matcher, Set<Object> sourceOntology, Set<Object> targetOntology, Object inputAlignment, Object parameters) throws Exception
      Runs a matcher which implements the IMatcher interface.
      Parameters:
      matcher - the matcher object
      sourceOntology - the source ontology / knowledge graph
      targetOntology - the taregt ontology / knowledge graph
      inputAlignment - the input alignment
      parameters - the parameters
      Returns:
      alignment and parameters
      Throws:
      Exception - in case something goes wrong.
    • getIMatcherMethod

      private static Method getIMatcherMethod(Class<?> clazz)
      Search the method declared in the IMatcher interface. It starts from the given class and moves on to the superclasses.
      Parameters:
      clazz - the given class to start searching
      Returns:
      the method from the IMatcher or null if non is found
    • runIMatcherCaller

      private static AlignmentAndParameters runIMatcherCaller(IMatcherCaller matcher, Set<Object> sourceOntology, Set<Object> targetOntology, Object inputAlignment, Object parameters) throws Exception
      Runs a matcher which implements the IMatcherCaller interface.
      Parameters:
      matcher - the matcher object
      sourceOntology - the set of different representations of source ontology / knowledge graph
      targetOntology - the set of different representations of taregt ontology / knowledge graph
      inputAlignment - the input alignment
      parameters - the parameters
      Returns:
      alignment and parameters
      Throws:
      Exception - in case somethign goes wrong