Class MatcherCLI
java.lang.Object
eu.sealsproject.platform.res.tool.impl.AbstractPlugin
de.uni_mannheim.informatik.dws.melt.matching_base.MatcherURL
de.uni_mannheim.informatik.dws.melt.matching_base.external.cli.MatcherCLI
- All Implemented Interfaces:
IMatcher<URL,
,URL, URL> eu.sealsproject.platform.res.domain.omt.IOntologyMatchingToolBridge
,eu.sealsproject.platform.res.tool.api.IPlugin
,eu.sealsproject.platform.res.tool.api.IToolBridge
- Direct Known Subclasses:
MatcherCLIFromFile
Matcher for running external matchers (require the subclass to create a command to execute).
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract String
The command which should be executed as one string (containing potentially multiple arguments).The line is splitted by whitespace but quotations are respected.getSubsitiutionMap
(URL source, URL target, URL inputAlignment, URL parameters) protected boolean
if set to true, all logging should go to stderr and the result of the process (url or alignment api format) should go to stdout.Match two ontologies / knowledge graphs together and returns an alignment.Aligns two ontologies/knowledge graphs given as the first and second parameter.Methods inherited from class de.uni_mannheim.informatik.dws.melt.matching_base.MatcherURL
align, align, canExecute, getType
Methods inherited from class eu.sealsproject.platform.res.tool.impl.AbstractPlugin
getId, getVersion, setId, setVersion
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface eu.sealsproject.platform.res.tool.api.IPlugin
getId, getVersion
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
MatcherCLI
public MatcherCLI()
-
-
Method Details
-
isUsingStdOut
protected boolean isUsingStdOut()if set to true, all logging should go to stderr and the result of the process (url or alignment api format) should go to stdout. if set to false, all logging should go to stdout and the result of the process (url or alignment api format) should go to stderr.- Returns:
- true, all logging should go to stderr and the result of the process (url or alignment api format) should go to stdout, false otherwise
-
match
Description copied from class:MatcherURL
Match two ontologies / knowledge graphs together and returns an alignment.- Specified by:
match
in classMatcherURL
- Parameters:
source
- The source ontology / knowledge graphtarget
- The target ontology / knowledge graphinputAlignment
- The input alignment as URL (alignment API format)- Returns:
- An alignment as URL (most often as file URL) the format is again the alignment API format.
- Throws:
Exception
- in case something went wrong.
-
getCommand
The command which should be executed as one string (containing potentially multiple arguments).The line is splitted by whitespace but quotations are respected. An argument line can contain scopes (scopes are only printed if all variables in a scope can be replaced). The following varaibles are replaced:- ${source} with source URI
- ${target} with target URI
- ${inputAlignment} with inputAlignment URI
- ${parameters} with parameters URI
- system properties like ${line.separator} or ${file.separator} ${java.io.tmpdir}
- environment variables like ${PATH}
- JVM arguments like ${Xmx} which is replaced by e.g. -Xmx10G
ExternalProcess.addSubstitutionForSystemProperties()
,ExternalProcess.addSubstitutionForEnvironmentVariables()
andExternalProcess.addSubstitutionForJVMArguments()
. The String can also contain scopes which are created with $[...]. The scope is only printed if all variables in the scope can be replaced. This is good for named arguments like: $[-i ${inputAlignment}] then only -i is printed if the input alignment is set.- Returns:
- the string which represents the command to execute.
- Throws:
Exception
- in case something goes from when generating the command
-
getSubsitiutionMap
-
match
Description copied from interface:IMatcher
Aligns two ontologies/knowledge graphs given as the first and second parameter. An additional input alignment can be given as well as parameters which further define how and what to match. In case inputAlignment or parameters is not used, making them to the Object class, will required no additional transformations of these objects (no overhead).- Specified by:
match
in interfaceIMatcher<URL,
URL, URL> - Parameters:
source
- this object represents the source ontology/knowledge graphtarget
- this object represents the target ontology/knowledge graphinputAlignment
- this object represents the input alignment.parameters
- object representing additional parameters. Only add to this object and do not create a new Object likeparameters= new ...()
because otherwise the parameters are lost (java ist call by value). Sensible classes areProperties
(preferred),Map<String, Object>
or any similar data structure. Some already specified keys (strings) can be found atParameterConfigKeys
.- Returns:
- the resulting alignment of the matching process.
- Throws:
Exception
- any exception which occurs during matching
-