Class MultiSourceDispatcherIncrementalMergeByOrder
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_base.multisource.MatcherMultiSourceURL
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.multisource.dispatchers.MultiSourceDispatcherIncrementalMerge
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.multisource.dispatchers.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 Summary
Modifier and TypeFieldDescriptionstatic final Comparator<ModelAndIndex>
Sorted by the number of classes in a model.static final Comparator<ModelAndIndex>
Sorted by the number of classes in a model.static final Comparator<ModelAndIndex>
Sorted by the number of instances in a model.static final Comparator<ModelAndIndex>
Sorted by the number of instances in a model.private final Comparator<? super ModelAndIndex>
the comparator which compares the models and bring them into an order.static final Comparator<ModelAndIndex>
static final Comparator<ModelAndIndex>
private static final org.slf4j.Logger
static final Comparator<ModelAndIndex>
Sorted by the number of triples in a model.static final Comparator<ModelAndIndex>
Sorted by the number of triples in a model.static final Comparator<ModelAndIndex>
Sorted by the number of triples in a model.static final Comparator<ModelAndIndex>
Sorted by the number of triples in a model.static final Comparator<ModelAndIndex>
This comparator is only used as a constant to determine if a random ordering should be used.static final Comparator<ModelAndIndex>
Sorted by the number of unique subjects (of a triple /statement) in a model.static final Comparator<ModelAndIndex>
Sorted by the number of unique subjects (of a triple /statement) in a model. -
Constructor Summary
ConstructorDescriptionMultiSourceDispatcherIncrementalMergeByOrder
(Object oneToOneMatcher) Constructor which requires an one to one matcher.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. -
Method Summary
Modifier and TypeMethodDescriptiongetMergeTree
(List<Set<Object>> models, Object parameters) Returns the merging tree (which ontologies are merged in which order).protected boolean
isLeftModelGreater
(Set<Object> leftOntology, Set<Object> rightOntology, Properties p) private static long
iteratorSize
(Iterator<?> i) Methods inherited from class de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.multisource.dispatchers.MultiSourceDispatcherIncrementalMerge
getCacheFile, getCopyMode, getIntermediateAlignments, getMatcherSupplier, getNumberOfThreads, getSerializedTreeFile, isAddingInformationToUnion, isRemoveUnusedJenaModels, isSavingIntermediateAlignments, match, match, needsTransitiveClosureForEvaluation, setAddingInformationToUnion, setCacheFile, setCopyMode, setGoldStandard, setGoldStandard, setMatcherSupplier, setNumberOfThreads, setNumberOfThreadsToCpuCores, setRemoveUnusedJenaModels, setSavingIntermediateAlignments, setSerializedTreeFile
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
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
Sorted by the number of triples in a model. This means small models/ontologies/knowledge graphs will be merged first. -
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
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
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
-
IDENTITY_REVERSED
-
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
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
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
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
Sorted by the number of unique subjects (of a triple /statement) in a model. Smaller gets merged first. -
UNIQUE_SUBJECTS_DECENDING
Sorted by the number of unique subjects (of a triple /statement) in a model. Larger gets merged first. -
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
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
-
getMergeTree
Description copied from class:MultiSourceDispatcherIncrementalMerge
Returns the merging tree (which ontologies are merged in which order). Have a look at the return description to see the merging tree format.- Specified by:
getMergeTree
in classMultiSourceDispatcherIncrementalMerge
- Parameters:
models
- the modelsparameters
- object representing additional parameters.- Returns:
- mergingTree for n models, this is a n-1 by 2 matrix where row i describes the merging of clusters at step i of the clustering. If an element j in the row is less than n, then observation j was merged at this stage. If j ≥ n then the merge was with the cluster formed at the (earlier) stage j-n of the algorithm.
-
isLeftModelGreater
protected boolean isLeftModelGreater(Set<Object> leftOntology, Set<Object> rightOntology, Properties p) throws TypeTransformationException - Overrides:
isLeftModelGreater
in classMultiSourceDispatcherIncrementalMerge
- Throws:
TypeTransformationException
-
iteratorSize
-