Class Executor
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_eval.Executor
The Executor runs a matcher or a list of matchers on a single test case or a list of test cases.
Also have a look at other executors like ExecutorParallel or ExecutorSeals.
- Author:
- Sven Hertling, Jan Portisch
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Deletes all system results which are stored usually in the tmp folder.static void
Deletes all matcher result files which starts with "alignment" and are stored in the tmp folder.getMatcherMap
(Object... matchers) getMatcherMapWithName
(Object matcher, String name) static String
getMatcherName
(Class<?> matcherClass) Given a matcher, this method returns its name.static String
getMatcherName
(Object matcherInstance) Given a matcher, this method returns its name.private static String
getNonExistentName
(String matcherName, Set<String> alreadyUsedMatcherNames) static long
private static long
getTimeFromPerformanceCSV
(File performanceCSV) private static boolean
static ExecutionResultSet
loadFromAnatomyResultsFolder
(String pathToFolder) Load raw results from a folder with the structure used by the Anatomy Track of the OAEI.static ExecutionResultSet
loadFromConferenceResultsFolder
(String pathToFolder) Load raw results from a folder with the structure used by the Conference Track of the OAEI.static ExecutionResultSet
Load results that are produced by the MELT evaluatorEvaluatorCSV
in the results folder.static ExecutionResultSet
loadFromEvaluatorCsvResultsFolder
(File folder, LocalTrack localTrack) static ExecutionResultSet
loadFromEvaluatorCsvResultsFolder
(File folder, Set<LocalTrack> localTracks) Load results that are produced by the MELT evaluatorEvaluatorCSV
in the results folder.static ExecutionResultSet
loadFromEvaluatorCsvResultsFolder
(String folderPath) Load results that are produced by the MELT evaluatorEvaluatorCSV
in the results folder.static ExecutionResultSet
loadFromEvaluatorCsvResultsFolder
(String folderPath, LocalTrack localTrack) static ExecutionResultSet
loadFromFolder
(File folder, TestCase testCase) Load raw results from folder structure like: folder - ALIGN.rdf - LogMap.rdf File names are treated as matcher names and they are associated with the given testcase.static ExecutionResultSet
loadFromFolder
(File folder, Track track) Load raw results from folder structure like: folder - testcase name - ALIGN.rdf - LogMap.rdf File names are treated as matcher names and they are associated with the given testcase.static ExecutionResultSet
loadFromFolder
(String pathToFolder, TestCase testCase) Load results directly from a folder.static ExecutionResultSet
loadFromFolder
(String folder, Track track) Load raw results from folder structure like: folder - testcase name - ALIGN.rdf - LogMap.rdf File names are treated as matcher names and they are associated with the given testcase.static ExecutionResultSet
loadFromKnowledgeGraphResultsFolder
(String pathToFolder) Load raw results from a folder with the structure used by the Knowledge Graph Track of the OAEI.static ExecutionResultSet
Run matchers on one test cases.static ExecutionResultSet
Run matchers on one test cases.static ExecutionResultSet
Run matchers on one test cases.static ExecutionResultSet
This method runs the specified matcher on the specified track.static ExecutionResultSet
This method runs the specified matcher on the specified track.static ExecutionResultSet
Run matchers on one track.static ExecutionResultSet
Run matchers on a set of test cases.static ExecutionResultSet
Run matchers on a set of test cases.static ExecutionResultSet
Run matchers on a set of test cases.static ExecutionResult
runMatcherOnTop
(ExecutionResult oldResult, Object newMatcher, String newMatcherName) Runs a matcher on top of another.static ExecutionResultSet
runMatcherOnTop
(ExecutionResult oldResult, Map<String, Object> newMatchers) Runs a matcher on top of another.static ExecutionResultSet
runMatcherOnTop
(ExecutionResultSet oldResults, TestCase testCase, String oldMatcherName, Object newMatcher, String newMatcherName) Runs a matcher on top of another.static ExecutionResultSet
runMatcherOnTop
(ExecutionResultSet oldResults, TestCase testCase, String oldMatcherName, Map<String, Object> newMatchers) Runs a matcher on top of another.static ExecutionResultSet
runMatcherOnTop
(ExecutionResultSet oldResults, String oldMatcherName, Object newMatcher, String newMatcherName) Runs a matcher on top of another.static ExecutionResultSet
runMatcherOnTop
(ExecutionResultSet oldResults, String oldMatcherName, Map<String, Object> newMatchers) Runs a matcher on top of another.static ExecutionResult
Run a single test case with one matcher.static ExecutionResult
Run a single test case with one matcher.static ExecutionResultSet
Run matchers on multiple tracks.static ExecutionResultSet
Run one matcher with a given name on multiple tracks.static ExecutionResultSet
Run multiple matchers on multiple tracks.private static long
tryToGetRuntime
(File logFile)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGERDefault logger. -
FALLBACK_MATCHER_NAME
- See Also:
-
TIME_RUNNING
-
-
Constructor Details
-
Executor
public Executor()
-
-
Method Details
-
runSingle
Run a single test case with one matcher.- Parameters:
testCase
- Test case to be evaluated.matcher
- Matcher to be evaluated.matcherName
- The name of the matcher.- Returns:
- Single Execution Result
-
runSingle
Run a single test case with one matcher.- Parameters:
testCase
- Test case to be evaluated.matcher
- Matcher to be evaluated.- Returns:
- Single Execution Result
-
runTracks
Run one matcher with a given name on multiple tracks.- Parameters:
tracks
- The tracks on which the matchers shall be run.matcher
- The matcher to be run. This class should implement either IMatcher or IOntologyMatchingToolBridge is some way.name
- the name of the matcher to use- Returns:
- The matching result as
ExecutionResultSet
instance.
-
runTracks
Run matchers on multiple tracks.- Parameters:
tracks
- The tracks on which the matchers shall be run.matchers
- The matcher to be run. This class should implement either IMatcher or IOntologyMatchingToolBridge is some way.- Returns:
- The matching result as
ExecutionResultSet
instance.
-
runTracks
Run multiple matchers on multiple tracks.- Parameters:
tracks
- The tracks on which the matchers shall be run.matchers
- The matchers that shall be run. The values in the map (matchers) should implement either IMatcher or IOntologyMatchingToolBridge is some way.- Returns:
- The matching result as
ExecutionResultSet
instance.
-
run
This method runs the specified matcher on the specified track.- Parameters:
track
- Track on which the matcher shall be run.matchers
- The matchers to be run. The classes should implement either IMatcher or IOntologyMatchingToolBridge is some way.- Returns:
- An
ExecutionResultSet
instance.
-
run
This method runs the specified matcher on the specified track.- Parameters:
track
- Track on which the matcher shall be run.matcher
- The matcher to be run. The classes should implement either IMatcher or IOntologyMatchingToolBridge is some way.name
- the name of the matcher to use- Returns:
- An
ExecutionResultSet
instance.
-
run
Run matchers on one track.- Parameters:
track
- The track to be evaluated.matchers
- The matchers to be run on the given track. The values of the map should implement either IMatcher or IOntologyMatchingToolBridge is some way.- Returns:
- ExecutionResultSet instance.
-
run
Run matchers on one test cases.- Parameters:
testCase
- One specific testcase on which all the specified matchers shall be run.matchers
- The matchers to be run. This class should implement either IMatcher or IOntologyMatchingToolBridge is some way.- Returns:
- The result as
ExecutionResultSet
instance.
-
run
Run matchers on one test cases.- Parameters:
testCase
- One specific testcase on which all the specified matchers shall be run.matcher
- The matcher to be run. This class should implement either IMatcher or IOntologyMatchingToolBridge is some way.name
- the name of the matcher to use- Returns:
- The result as
ExecutionResultSet
instance.
-
run
Run matchers on one test cases.- Parameters:
testCase
- One specific testcase on which all the specified matchers shall be run.matchers
- A map of matchers from unique_name to matcher instance.The value of the map should implement either IMatcher or IOntologyMatchingToolBridge is some way.- Returns:
- The result as
ExecutionResultSet
instance.
-
run
Run matchers on a set of test cases.- Parameters:
testCases
- The test cases on which all the specified matcher shall be run.matchers
- The matchers to be run. This class should implement either IMatcher or IOntologyMatchingToolBridge is some way.- Returns:
- The result as
ExecutionResultSet
instance.
-
run
Run matchers on a set of test cases.- Parameters:
testCases
- The test cases on which all the specified matcher shall be run.matcher
- The matcher to be run. This class should implement either IMatcher or IOntologyMatchingToolBridge is some way.name
- the name of the matcher to use- Returns:
- The result as
ExecutionResultSet
instance.
-
run
Run matchers on a set of test cases.- Parameters:
testCases
- The test cases on which all the specified matchers shall be run.matchers
- A map of matchers from unique_name to matcher instance. The matcher class should implement either IMatcher or IOntologyMatchingToolBridge is some way.- Returns:
- The matching result as
ExecutionResultSet
instance.
-
loadFromFolder
Load raw results from folder structure like: folder - ALIGN.rdf - LogMap.rdf File names are treated as matcher names and they are associated with the given testcase.- Parameters:
folder
- The folder where the system results can be found.testCase
- Test case with which the individual system results shall be associated.- Returns:
ExecutionResultSet
instance with the loaded results.
-
tryToGetRuntime
-
loadFromFolder
Load results directly from a folder. The results have to be run on the same testCase. Folder structure like: folder - ALIGN.rdf - LogMap.rdf File names are treated as matcher names and they are associated with the given testcase. This structure is equal to the structure used by the Anatomy Track of the OAEI.- Parameters:
pathToFolder
- The folder where the system results can be found.testCase
- Test case with which the individual system results shall be associated.- Returns:
ExecutionResultSet
instance with the loaded results.
-
loadFromFolder
Load raw results from folder structure like: folder - testcase name - ALIGN.rdf - LogMap.rdf File names are treated as matcher names and they are associated with the given testcase.- Parameters:
folder
- The folder where the system results can be found.track
- Track with which the individual system results shall be associated.- Returns:
ExecutionResultSet
instance with the loaded results.
-
loadFromFolder
Load raw results from folder structure like: folder - testcase name - ALIGN.rdf - LogMap.rdf File names are treated as matcher names and they are associated with the given testcase.- Parameters:
folder
- The folder where the system results can be found.track
- Track with which the individual system results shall be associated.- Returns:
ExecutionResultSet
instance with the loaded results.
-
loadFromAnatomyResultsFolder
Load raw results from a folder with the structure used by the Anatomy Track of the OAEI.- Parameters:
pathToFolder
- Path to the anatomy results folder (can be downloaded from OAEI Web site).- Returns:
ExecutionResultSet
instance with the loaded results.
-
loadFromConferenceResultsFolder
Load raw results from a folder with the structure used by the Conference Track of the OAEI.- Parameters:
pathToFolder
- The path to the folder where the alignments of the conference folder reside.- Returns:
ExecutionResultSet
instance with the loaded results.
-
loadFromKnowledgeGraphResultsFolder
Load raw results from a folder with the structure used by the Knowledge Graph Track of the OAEI.- Parameters:
pathToFolder
- The path to the unzipped folder where the folders of the knowledge graph track reside.- Returns:
ExecutionResultSet
instance with the loaded results.
-
loadFromEvaluatorCsvResultsFolder
Load results that are produced by the MELT evaluatorEvaluatorCSV
in the results folder.- Parameters:
folderPath
- Path to the results folder (the one with the time code e.g. results/results_2020-03-02_08-47-40)- Returns:
ExecutionResultSet
instance with the loaded results.
-
loadFromEvaluatorCsvResultsFolder
Load results that are produced by the MELT evaluatorEvaluatorCSV
in the results folder.- Parameters:
folder
- Path to the results folder (the one with the time code e.g. results/results_2020-03-02_08-47-40)- Returns:
ExecutionResultSet
instance with the loaded results.
-
loadFromEvaluatorCsvResultsFolder
public static ExecutionResultSet loadFromEvaluatorCsvResultsFolder(String folderPath, LocalTrack localTrack) -
loadFromEvaluatorCsvResultsFolder
public static ExecutionResultSet loadFromEvaluatorCsvResultsFolder(File folder, LocalTrack localTrack) -
loadFromEvaluatorCsvResultsFolder
public static ExecutionResultSet loadFromEvaluatorCsvResultsFolder(File folder, Set<LocalTrack> localTracks) Load results that are produced by the MELT evaluatorEvaluatorCSV
in the results folder.- Parameters:
folder
- Path to the results folder (the one with the time code e.g. results/results_2020-03-02_08-47-40)localTracks
- A set of local tracks contained in the evaluation directory.- Returns:
ExecutionResultSet
instance with the loaded results.
-
getTimeFromPerformanceCSV
-
getMatcherMapWithName
-
getMatcherMap
-
isMatcher
-
getNonExistentName
-
getMatcherName
Given a matcher, this method returns its name. It will first check if there is a specific toString method (e.g. not defined by Object class. If this is not the case then, it will return the simple name of the class. If this also does not exist(e.g. lamda definition), then it will return a fallback matcher name.- Parameters:
matcherInstance
- the matcher instance whose name shall be retrieved.- Returns:
- The name as String.
-
getMatcherName
Given a matcher, this method returns its name. It will first check if there is a specific toString method (e.g. not defined by Object class. If this is not the case then, it will return the simple name of the class. If this also does not exist(e.g. lamda definition), then it will return a fallback matcher name.- Parameters:
matcherClass
- the matcher class whose name shall be retrieved.- Returns:
- The name as String.
-
deleteOriginalSystemResults
Deletes all system results which are stored usually in the tmp folder. This will not delete anything in the results folder.- Parameters:
er
- the execution results where all system alignments should be removed.- Returns:
true
if and only if all results are successfully deleted;false
otherwise
-
deleteTempFiles
public static void deleteTempFiles()Deletes all matcher result files which starts with "alignment" and are stored in the tmp folder. Does not delete the whole tmp folder but onl files which are produced by oaei matchers. -
getSummedRuntimeOfAllUnrefinedResults
-
runMatcherOnTop
public static ExecutionResultSet runMatcherOnTop(ExecutionResultSet oldResults, String oldMatcherName, Object newMatcher, String newMatcherName) Runs a matcher on top of another. This means that the previous matchings do not need to be recalculated. This will run the matcher on all testcases.- Parameters:
oldResults
- the results from the previous runs already containing result from the oldMatcherName.oldMatcherName
- the matcher name which should exist in previous resultsnewMatcher
- the new matchernewMatcherName
- the new matcher name- Returns:
- the execution results together with the new matcher
-
runMatcherOnTop
public static ExecutionResultSet runMatcherOnTop(ExecutionResultSet oldResults, String oldMatcherName, Map<String, Object> newMatchers) Runs a matcher on top of another. This means that the previous matchings do not need to be recalculated. This will run the matcher on all testcases.- Parameters:
oldResults
- the results from the previous runs already containing result from the oldMatcherName.oldMatcherName
- the matcher name which should exist in previous resultsnewMatchers
- the new matchers as a map where the key is the matcher name and value the actual matcher- Returns:
- the execution results together with the new matcher
-
runMatcherOnTop
public static ExecutionResultSet runMatcherOnTop(ExecutionResultSet oldResults, TestCase testCase, String oldMatcherName, Object newMatcher, String newMatcherName) Runs a matcher on top of another. This means that the previous matchings do not need to be recalculated. This will run the matcher only on the specified test case.- Parameters:
oldResults
- the results from the previous runs already containing result from the oldMatcherName.testCase
- the testcase on which the matchers should be executed.oldMatcherName
- the matcher name which should exist in previous resultsnewMatcher
- the new matchernewMatcherName
- the new matcher name- Returns:
- the execution results together with the new matcher
-
runMatcherOnTop
public static ExecutionResultSet runMatcherOnTop(ExecutionResultSet oldResults, TestCase testCase, String oldMatcherName, Map<String, Object> newMatchers) Runs a matcher on top of another. This means that the previous matchings do not need to be recalculated. This will run the matcher only on the specified test case.- Parameters:
oldResults
- the results from the previous runs already containing result from the oldMatcherName.testCase
- the testcase on which the matchers should be executed.oldMatcherName
- the matcher name which should exist in previous resultsnewMatchers
- the new matchers as a map where the key is the matcher name and value the actual matcher- Returns:
- the execution results together with the new matcher
-
runMatcherOnTop
public static ExecutionResultSet runMatcherOnTop(ExecutionResult oldResult, Map<String, Object> newMatchers) Runs a matcher on top of another. This means that the previous matchings do not need to be recalculated. This will run the matcher on exactly one execution result.- Parameters:
oldResult
- the old resultnewMatchers
- the new matchers as a map where the key is the matcher name and value the actual matcher- Returns:
- the execution results together with the new matcher
-
runMatcherOnTop
public static ExecutionResult runMatcherOnTop(ExecutionResult oldResult, Object newMatcher, String newMatcherName) Runs a matcher on top of another. This means that the previous matchings do not need to be recalculated. This will run the matcher on exactly one execution result.- Parameters:
oldResult
- the old resultnewMatcher
- the new matchernewMatcherName
- the new matcher name- Returns:
- the execution results together with the new matcher
-