Class GenericMatcherCaller
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_base.typetransformer.GenericMatcherCaller
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static Method
getIMatcherMethod
(Class<?> clazz) Search the method declared in the IMatcher interface.private static AlignmentAndParameters
runIMatcher
(IMatcher matcher, Set<Object> sourceOntology, Set<Object> targetOntology, Object inputAlignment, Object parameters) Runs a matcher which implements theIMatcher
interface.private static AlignmentAndParameters
runIMatcherCaller
(IMatcherCaller matcher, Set<Object> sourceOntology, Set<Object> targetOntology, Object inputAlignment, Object parameters) Runs a matcher which implements theIMatcherCaller
interface.private static AlignmentAndParameters
runIOntologyMatchingToolBridge
(eu.sealsproject.platform.res.domain.omt.IOntologyMatchingToolBridge matcher, Set<Object> sourceOntology, Set<Object> targetOntology, Object inputAlignment, Object parameters) Runs a matcher which implements theIOntologyMatchingToolBridge
interface.static AlignmentAndParameters
runMatcher
(Object matcher, Object sourceOntology, Object targetOntology) Calls a matcher object with the provided arguments.static AlignmentAndParameters
runMatcher
(Object matcher, Object sourceOntology, Object targetOntology, Object inputAlignment) Calls a matcher object with the provided arguments.static AlignmentAndParameters
runMatcher
(Object matcher, Object sourceOntology, Object targetOntology, Object inputAlignment, Object parameters) Calls a matcher object with the provided arguments.static AlignmentAndParameters
runMatcherMultipleRepresentations
(Object matcher, Set<Object> sourceOntology, Set<Object> targetOntology) Calls a matcher object with the provided arguments.static AlignmentAndParameters
runMatcherMultipleRepresentations
(Object matcher, Set<Object> sourceOntology, Set<Object> targetOntology, Object inputAlignment) Calls a matcher object with the provided arguments.static AlignmentAndParameters
runMatcherMultipleRepresentations
(Object matcher, Set<Object> sourceOntology, Set<Object> targetOntology, Object inputAlignment, Object parameters) Calls a matcher object with the provided arguments.
-
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
, orIOntologyMatchingToolBridge
- 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.
- an object / instance which implements/extends
sourceOntology
- this object represents the source ontologytargetOntology
- 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
, orIOntologyMatchingToolBridge
- 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.
- an object / instance which implements/extends
sourceOntology
- this object represents the source ontologytargetOntology
- this object represents the taregt ontologyinputAlignment
- 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
, orIOntologyMatchingToolBridge
- 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.
- an object / instance which implements/extends
sourceOntology
- this object represents the source ontologytargetOntology
- this object represents the taregt ontologyinputAlignment
- 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
, orIOntologyMatchingToolBridge
- 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.
- an object / instance which implements/extends
sourceOntology
- this is an iterable of objects which all represents the same source ontology / knowledge graphtargetOntology
- 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
, orIOntologyMatchingToolBridge
- 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.
- an object / instance which implements/extends
sourceOntology
- this is an iterable of objects which all represents the same source ontology / knowledge graphtargetOntology
- this is an iterable of objects which all represents the same target ontology / knowledge graphinputAlignment
- 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
, orIOntologyMatchingToolBridge
- 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.
- an object / instance which implements/extends
sourceOntology
- this is an iterable of objects which all represents the same source ontology / knowledge graphtargetOntology
- this is an iterable of objects which all represents the same target ontology / knowledge graphinputAlignment
- 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 theIOntologyMatchingToolBridge
interface.- Parameters:
matcher
- the matcher objectsourceOntology
- the source ontology / knowledge graphtargetOntology
- the taregt ontology / knowledge graphinputAlignment
- the input alignmentparameters
- 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 theIMatcher
interface.- Parameters:
matcher
- the matcher objectsourceOntology
- the source ontology / knowledge graphtargetOntology
- the taregt ontology / knowledge graphinputAlignment
- the input alignmentparameters
- the parameters- Returns:
- alignment and parameters
- Throws:
Exception
- in case something goes wrong.
-
getIMatcherMethod
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 theIMatcherCaller
interface.- Parameters:
matcher
- the matcher objectsourceOntology
- the set of different representations of source ontology / knowledge graphtargetOntology
- the set of different representations of taregt ontology / knowledge graphinputAlignment
- the input alignmentparameters
- the parameters- Returns:
- alignment and parameters
- Throws:
Exception
- in case somethign goes wrong
-