Class MultiSourceDispatcherIncrementalMergeByOrder

All Implemented Interfaces:
IMatcherMultiSourceCaller, MultiSourceDispatcher

public class MultiSourceDispatcherIncrementalMergeByOrder extends MultiSourceDispatcherIncrementalMerge
Matches multiple ontologies / knowledge graphs with an incremental merge approach. This means that two ontologies are merged together and then possibly the union is merged with another ontology and so on. The order how they are merged is defined by subclasses.
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • comparator

      private final Comparator<? super ModelAndIndex> comparator
      the comparator which compares the models and bring them into an order. This order is used dureing merging. It is final because it should not change when using the cache of the superclass.
    • MODEL_SIZE_ASCENDING

      public static final Comparator<ModelAndIndex> MODEL_SIZE_ASCENDING
      Sorted by the number of triples in a model. This means small models/ontologies/knowledge graphs will be merged first.
    • MODEL_SIZE_DECENDING

      public static final Comparator<ModelAndIndex> MODEL_SIZE_DECENDING
      Sorted by the number of triples in a model. This means large models/ontologies/knowledge graphs will be merged first.
    • MODEL_SIZE_ASCENDING_NTRIPLES_FAST

      public static final Comparator<ModelAndIndex> MODEL_SIZE_ASCENDING_NTRIPLES_FAST
      Sorted by the number of triples in a model. This is a fast variant for ntriple files which only counts the number of lines to make it faster. This means small models/ontologies/knowledge graphs will be merged first.
    • MODEL_SIZE_DECENDING_NTRIPLES_FAST

      public static final Comparator<ModelAndIndex> MODEL_SIZE_DECENDING_NTRIPLES_FAST
      Sorted by the number of triples in a model. This is a fast variant for ntriple files which only counts the number of lines to make it faster. This means large models/ontologies/knowledge graphs will be merged first.
    • IDENTITY

      public static final Comparator<ModelAndIndex> IDENTITY
    • IDENTITY_REVERSED

      public static final Comparator<ModelAndIndex> IDENTITY_REVERSED
    • AMOUNT_OF_CLASSES_ASCENDING

      public static final Comparator<ModelAndIndex> AMOUNT_OF_CLASSES_ASCENDING
      Sorted by the number of classes in a model. This means models/ontologies/knowledge graphs with small number of classes will be merged first.
    • AMOUNT_OF_CLASSES_DECENDING

      public static final Comparator<ModelAndIndex> AMOUNT_OF_CLASSES_DECENDING
      Sorted by the number of classes in a model. This means models/ontologies/knowledge graphs with large number of classes will be merged first.
    • AMOUNT_OF_INSTANCES_ASCENDING

      public static final Comparator<ModelAndIndex> AMOUNT_OF_INSTANCES_ASCENDING
      Sorted by the number of instances in a model. This means models/ontologies/knowledge graphs with small number of instances will be merged first.
    • AMOUNT_OF_INSTANCES_DECENDING

      public static final Comparator<ModelAndIndex> AMOUNT_OF_INSTANCES_DECENDING
      Sorted by the number of instances in a model. This means models/ontologies/knowledge graphs with large number of instances will be merged first.
    • UNIQUE_SUBJECTS_ASCENDING

      public static final Comparator<ModelAndIndex> UNIQUE_SUBJECTS_ASCENDING
      Sorted by the number of unique subjects (of a triple /statement) in a model. Smaller gets merged first.
    • UNIQUE_SUBJECTS_DECENDING

      public static final Comparator<ModelAndIndex> UNIQUE_SUBJECTS_DECENDING
      Sorted by the number of unique subjects (of a triple /statement) in a model. Larger gets merged first.
    • RANDOM

      public static final Comparator<ModelAndIndex> RANDOM
      This comparator is only used as a constant to determine if a random ordering should be used. If the comparator is really called, it will throw an exception.
  • Constructor Details

    • MultiSourceDispatcherIncrementalMergeByOrder

      public MultiSourceDispatcherIncrementalMergeByOrder(Object oneToOneMatcher, Comparator<? super ModelAndIndex> comparator)
      Constructor which requires the one to one matcher as well as the comparator which define es merging order. Some comparators are already defined as public static attributes in this class.
      Parameters:
      oneToOneMatcher - the one to one matcher.
      comparator - the comparator to make the merging order of the models explicit. Some comparators are already defined as public static attributes in this class.
    • MultiSourceDispatcherIncrementalMergeByOrder

      public MultiSourceDispatcherIncrementalMergeByOrder(Object oneToOneMatcher)
      Constructor which requires an one to one matcher. The merging order id the identity; meaning that the exact same order a given in the list.
      Parameters:
      oneToOneMatcher - the one to one matcher.
  • Method Details