Class ExecutionResultSet
java.lang.Object
com.googlecode.cqengine.ConcurrentIndexedCollection<ExecutionResult>
de.uni_mannheim.informatik.dws.melt.matching_eval.ExecutionResultSet
- All Implemented Interfaces:
com.googlecode.cqengine.engine.QueryEngine<ExecutionResult>
,com.googlecode.cqengine.IndexedCollection<ExecutionResult>
,Serializable
,Iterable<ExecutionResult>
,Collection<ExecutionResult>
,Set<ExecutionResult>
public class ExecutionResultSet
extends com.googlecode.cqengine.ConcurrentIndexedCollection<ExecutionResult>
implements Serializable
A collection of individual
ExecutionResult
instances that are typically returned by an Executor
.- Author:
- Sven Hertling, Jan Portisch
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final Refiner[]
Constant for an empty refinement.private static final org.slf4j.Logger
private com.googlecode.cqengine.index.hash.HashIndex<String,
ExecutionResult> private com.googlecode.cqengine.index.hash.HashIndex<Set<Refiner>,
ExecutionResult> private static final long
private com.googlecode.cqengine.index.hash.HashIndex<TestCase,
ExecutionResult> private com.googlecode.cqengine.index.hash.HashIndex<Track,
ExecutionResult> Fields inherited from class com.googlecode.cqengine.ConcurrentIndexedCollection
indexEngine, objectStore, persistence
-
Constructor Summary
ConstructorDescriptionConstructorExecutionResultSet
(ExecutionResultSet executionResultSet) Constructor -
Method Summary
Modifier and TypeMethodDescriptionGet a specificExecutionResult
which fulfills the specified parameters (testCase, matcherName) from the ExecutionResultSet.get
(ExecutionResult basisResult, Refiner... refinements) Obtain the distinct matcher names in this execution result set.getDistinctMatchers
(TestCase testCase) Given a distinct test case, return the distinct names of matchers that were run on this particular test case.getDistinctMatchers
(Track track) Obtain the distinct matcher names in this execution result set that were ran on the specified track.Obtain the distinct matcher names in this execution result set in a sorted way.getDistinctMatchersSorted
(TestCase testCase) getDistinctMatchersSorted
(Track track) Get the distinct test cases that used in this ExecutionResultSet.getDistinctTestCases
(Track track) Get the distinct test cases that used in this ExecutionResultSet for the specified track.getDistinctTestCases
(Track track, String matcher) Get the distinct test cases that used in this ExecutionResultSet for the specified track.getDistinctTestCases
(String matcher) getDistinctTestCasesSorted
(Track track) getDistinctTestCasesSorted
(Track track, String matcher) getDistinctTestCasesSorted
(String matcher) Get the distinct tracks that used in this ExecutionResultSet.getDistinctTracks
(String matcher) The distinct tracks on which the specified matcher was run.getDistinctTracksSorted
(String matcher) Returns the first execution result in this resultSet.getGroup
(com.googlecode.cqengine.resultset.ResultSet<ExecutionResult> basisResults, Refiner... refinements) private <T> List<T>
getSortedList
(Iterable<T> iter, Comparator<? super T> c) Helper method for all query distinct which needs sorted elementsprivate static com.googlecode.cqengine.query.Query<ExecutionResult>
private static com.googlecode.cqengine.query.Query<ExecutionResult>
private static com.googlecode.cqengine.query.Query<ExecutionResult>
private static com.googlecode.cqengine.query.Query<ExecutionResult>
private static com.googlecode.cqengine.query.Query<ExecutionResult>
private static com.googlecode.cqengine.query.Query<ExecutionResult>
private static com.googlecode.cqengine.query.Query<ExecutionResult>
private static com.googlecode.cqengine.query.Query<ExecutionResult>
private static com.googlecode.cqengine.query.Query<ExecutionResult>
private static com.googlecode.cqengine.query.Query<ExecutionResult>
Methods inherited from class com.googlecode.cqengine.ConcurrentIndexedCollection
add, addAll, addIndex, addIndex, clear, closeRequestScopeResourcesIfNecessary, contains, containsAll, equals, flagAsReadRequest, getIndexes, getObjectStoreAsSet, getPersistence, hashCode, isEmpty, iterator, openRequestScopeResourcesIfNecessary, remove, removeAll, removeIndex, removeIndex, retainAll, retrieve, retrieve, size, toArray, toArray, toString, update, update
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.Set
spliterator
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
serialVersionUID
private static final long serialVersionUID- See Also:
-
matcherIndex
-
testCaseIndex
-
trackIndex
-
refinementSetIndex
private com.googlecode.cqengine.index.hash.HashIndex<Set<Refiner>,ExecutionResult> refinementSetIndex -
EMPTY_REFINEMENT
Constant for an empty refinement.
-
-
Constructor Details
-
ExecutionResultSet
public ExecutionResultSet()Constructor -
ExecutionResultSet
Constructor- Parameters:
executionResultSet
- All entries will be copied to the new Execution result set.
-
-
Method Details
-
get
Get a specificExecutionResult
which fulfills the specified parameters (testCase, matcherName) from the ExecutionResultSet. Note that refinements will be executed on the fly if they have not been executed before.- Parameters:
testCase
- The test case that shall match.matcherName
- The matcher name shall match.refinements
- The refinements.- Returns:
- The Execution result instance.
-
get
-
getUnrefinedResults
-
getGroup
-
getGroup
-
getGroup
-
getGroup
-
getGroup
public Set<ExecutionResult> getGroup(com.googlecode.cqengine.resultset.ResultSet<ExecutionResult> basisResults, Refiner... refinements) -
getDistinctMatchers
Obtain the distinct matcher names in this execution result set.- Returns:
- Iterable over distinct matcher names.
-
getDistinctMatchersSorted
Obtain the distinct matcher names in this execution result set in a sorted way.- Returns:
- Iterable over distinct matcher names.
-
getDistinctMatchers
Obtain the distinct matcher names in this execution result set that were ran on the specified track.- Parameters:
track
- The track on which the matcher ran.- Returns:
- Iterable over distinct matcher names.
-
getDistinctMatchersSorted
-
getDistinctMatchers
Given a distinct test case, return the distinct names of matchers that were run on this particular test case.- Parameters:
testCase
- The test case for which the matchers that were run shall be retrieved.- Returns:
- A set of unique matcher names.
-
getDistinctMatchersSorted
-
getDistinctTestCases
Get the distinct test cases that used in this ExecutionResultSet.- Returns:
TestCase
instances as iterable.
-
getDistinctTestCasesSorted
-
getDistinctTestCases
-
getDistinctTestCasesSorted
-
getDistinctTestCases
Get the distinct test cases that used in this ExecutionResultSet for the specified track.- Parameters:
track
- The track for which the test cases shall be retrieved.- Returns:
- An iterable over the resulting test cases for the specified track.
-
getDistinctTestCasesSorted
-
getDistinctTestCases
Get the distinct test cases that used in this ExecutionResultSet for the specified track.- Parameters:
track
- The track for which the test cases shall be retrieved.matcher
- The matcher for which the test cases shall be retrieved.- Returns:
- An iterable over the resulting test cases for the specified track.
-
getDistinctTestCasesSorted
-
getDistinctTracks
Get the distinct tracks that used in this ExecutionResultSet.- Returns:
- Tracks as iterable.
-
getDistinctTracksSorted
-
getDistinctTracks
The distinct tracks on which the specified matcher was run.- Parameters:
matcher
- The matcher for which the tracks shall be obtained.- Returns:
- An iterable over the tracks on which the specified matcher was run.
-
getDistinctTracksSorted
-
getSortedList
Helper method for all query distinct which needs sorted elements- Type Parameters:
T
- Type of Iterable- Parameters:
iter
- iteratorc
- comparator (null if default sort order)- Returns:
- sorted list
-
getFirstResult
Returns the first execution result in this resultSet. If it is empty return null.- Returns:
- First result in this resultSet.
-
query
private static com.googlecode.cqengine.query.Query<ExecutionResult> query(TestCase testCase, String matcherName, Refiner[] refinements) -
query
private static com.googlecode.cqengine.query.Query<ExecutionResult> query(Track track, String matcherName, Refiner[] refinements) -
query
private static com.googlecode.cqengine.query.Query<ExecutionResult> query(TestCase testCase, Refiner[] refinements) -
query
private static com.googlecode.cqengine.query.Query<ExecutionResult> query(String matcher, Refiner[] refinements) -
query
private static com.googlecode.cqengine.query.Query<ExecutionResult> query(Track track, Refiner[] refinements) -
query
private static com.googlecode.cqengine.query.Query<ExecutionResult> query(Track track, String matcher) -
query
-
query
-
query
-
query
-