java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.multisource.dispatchers.MergeExecutor
All Implemented Interfaces:
Callable<MergeResult>

public class MergeExecutor extends Object implements Callable<MergeResult>
The class which actually runs a merge in MultiSourceDispatcherIncrementalMerge. The source is merged into the target.
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • matcherSupplier

      private final Supplier<Object> matcherSupplier
    • kgOne

      private final Set<Object> kgOne
    • kgTwo

      private final Set<Object> kgTwo
    • inputAlignment

      private final Object inputAlignment
    • parameters

      private final Properties parameters
    • addInformationToUnion

      private final boolean addInformationToUnion
    • newPos

      private final int newPos
    • removeUnusedJenaModels

      private final boolean removeUnusedJenaModels
    • copyMode

      private final CopyMode copyMode
    • labelOfMergeTask

      private final String labelOfMergeTask
  • Constructor Details

  • Method Details

    • call

      public MergeResult call() throws Exception
      Specified by:
      call in interface Callable<MergeResult>
      Throws:
      Exception
    • merge

      public static MergeResult merge(Object matcher, Set<Object> source, Set<Object> target, Object inputAlignment, Object parameters, boolean addInformationToUnion, int newPos, boolean removeUnusedJenaModels, String labelOfMergeTask) throws Exception
      Throws:
      Exception
    • merge

      public static MergeResult merge(Object matcher, Set<Object> source, Set<Object> target, Object inputAlignment, Properties parameters, boolean addInformationToUnion, int newPos, boolean removeUnusedJenaModels, String labelOfMergeTask) throws Exception
      Throws:
      Exception
    • removeOntModelFromSet

      public static void removeOntModelFromSet(Set<Object> set)
    • hasFirstKgMoreTriples

      public static boolean hasFirstKgMoreTriples(Set<Object> firstKG, Set<Object> secondKG, Properties parameters) throws TypeTransformationException
      Returns true if the first KG/model is greater than the second one. Internally it will transform the KG to a jena model and compare it with the size (triple number).
      Parameters:
      firstKG - the first KG
      secondKG - the second KG
      parameters - the parameters
      Returns:
      true if the first KG/model is greater than the second one
      Throws:
      TypeTransformationException - in case the transformation did not work out.
    • mergeSourceIntoTarget

      public static void mergeSourceIntoTarget(org.apache.jena.rdf.model.Model source, org.apache.jena.rdf.model.Model target, Alignment alignment, boolean addInformationToUnion)
      Merges all triples from the source model into the target model.
      Parameters:
      source - the source where all triples originates
      target - the target model where all triples should end up
      alignment - the alignment which is used.
      addInformationToUnion - if true, all information will be added to the merged ontology
    • mergeSourceIntoTargetFullInformation

      private static void mergeSourceIntoTargetFullInformation(org.apache.jena.rdf.model.Model source, org.apache.jena.rdf.model.Model target, Alignment alignment)
    • mergeSourceIntoTargetPartialInformation

      private static void mergeSourceIntoTargetPartialInformation(org.apache.jena.rdf.model.Model source, org.apache.jena.rdf.model.Model target, Alignment alignment)
    • getNode

      private static org.apache.jena.graph.Node getNode(Alignment alignment, org.apache.jena.graph.Node node)
    • getNodeAndReplaced

      private static NodeAndReplaced getNodeAndReplaced(Alignment alignment, org.apache.jena.graph.Node node)