Class MergeExecutor
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.multisource.dispatchers.MergeExecutor
- All Implemented Interfaces:
Callable<MergeResult>
The class which actually runs a merge in
MultiSourceDispatcherIncrementalMerge
.
The source is merged into the target.-
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
private final CopyMode
private final Object
private final String
private static final org.slf4j.Logger
private final int
private final Properties
private final boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncall()
private static org.apache.jena.graph.Node
private static NodeAndReplaced
getNodeAndReplaced
(Alignment alignment, org.apache.jena.graph.Node node) static boolean
hasFirstKgMoreTriples
(Set<Object> firstKG, Set<Object> secondKG, Properties parameters) Returns true if the first KG/model is greater than the second one.static MergeResult
merge
(Object matcher, Set<Object> source, Set<Object> target, Object inputAlignment, Object parameters, boolean addInformationToUnion, int newPos, boolean removeUnusedJenaModels, String labelOfMergeTask) static MergeResult
merge
(Object matcher, Set<Object> source, Set<Object> target, Object inputAlignment, Properties parameters, boolean addInformationToUnion, int newPos, boolean removeUnusedJenaModels, String labelOfMergeTask) 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.private static void
mergeSourceIntoTargetFullInformation
(org.apache.jena.rdf.model.Model source, org.apache.jena.rdf.model.Model target, Alignment alignment) private static void
mergeSourceIntoTargetPartialInformation
(org.apache.jena.rdf.model.Model source, org.apache.jena.rdf.model.Model target, Alignment alignment) static void
removeOntModelFromSet
(Set<Object> set)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
matcherSupplier
-
kgOne
-
kgTwo
-
inputAlignment
-
parameters
-
addInformationToUnion
private final boolean addInformationToUnion -
newPos
private final int newPos -
removeUnusedJenaModels
private final boolean removeUnusedJenaModels -
copyMode
-
labelOfMergeTask
-
-
Constructor Details
-
MergeExecutor
-
-
Method Details
-
call
- Specified by:
call
in interfaceCallable<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
-
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 KGsecondKG
- the second KGparameters
- 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 originatestarget
- the target model where all triples should end upalignment
- 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)
-