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 Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • matcherIndex

      private com.googlecode.cqengine.index.hash.HashIndex<String,ExecutionResult> matcherIndex
    • testCaseIndex

      private com.googlecode.cqengine.index.hash.HashIndex<TestCase,ExecutionResult> testCaseIndex
    • trackIndex

      private com.googlecode.cqengine.index.hash.HashIndex<Track,ExecutionResult> trackIndex
    • refinementSetIndex

      private com.googlecode.cqengine.index.hash.HashIndex<Set<Refiner>,ExecutionResult> refinementSetIndex
    • EMPTY_REFINEMENT

      private static final Refiner[] EMPTY_REFINEMENT
      Constant for an empty refinement.
  • Constructor Details

    • ExecutionResultSet

      public ExecutionResultSet()
      Constructor
    • ExecutionResultSet

      public ExecutionResultSet(ExecutionResultSet executionResultSet)
      Constructor
      Parameters:
      executionResultSet - All entries will be copied to the new Execution result set.
  • Method Details

    • get

      public ExecutionResult get(TestCase testCase, String matcherName, Refiner... refinements)
      Get a specific ExecutionResult 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

      public ExecutionResult get(ExecutionResult basisResult, Refiner... refinements)
    • getUnrefinedResults

      public Set<ExecutionResult> getUnrefinedResults()
    • getGroup

      public Set<ExecutionResult> getGroup(TestCase testCase, Refiner... refinements)
    • getGroup

      public Set<ExecutionResult> getGroup(String matcher, Refiner... refinements)
    • getGroup

      public Set<ExecutionResult> getGroup(Track track, Refiner... refinements)
    • getGroup

      public Set<ExecutionResult> getGroup(Track track, String matcher, Refiner... refinements)
    • getGroup

      public Set<ExecutionResult> getGroup(com.googlecode.cqengine.resultset.ResultSet<ExecutionResult> basisResults, Refiner... refinements)
    • getDistinctMatchers

      public Iterable<String> getDistinctMatchers()
      Obtain the distinct matcher names in this execution result set.
      Returns:
      Iterable over distinct matcher names.
    • getDistinctMatchersSorted

      public List<String> getDistinctMatchersSorted()
      Obtain the distinct matcher names in this execution result set in a sorted way.
      Returns:
      Iterable over distinct matcher names.
    • getDistinctMatchers

      public Iterable<String> getDistinctMatchers(Track track)
      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

      public List<String> getDistinctMatchersSorted(Track track)
    • getDistinctMatchers

      public Iterable<String> getDistinctMatchers(TestCase testCase)
      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

      public List<String> getDistinctMatchersSorted(TestCase testCase)
    • getDistinctTestCases

      public Iterable<TestCase> getDistinctTestCases()
      Get the distinct test cases that used in this ExecutionResultSet.
      Returns:
      TestCase instances as iterable.
    • getDistinctTestCasesSorted

      public List<TestCase> getDistinctTestCasesSorted()
    • getDistinctTestCases

      public Iterable<TestCase> getDistinctTestCases(String matcher)
    • getDistinctTestCasesSorted

      public List<TestCase> getDistinctTestCasesSorted(String matcher)
    • getDistinctTestCases

      public Iterable<TestCase> getDistinctTestCases(Track track)
      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

      public List<TestCase> getDistinctTestCasesSorted(Track track)
    • getDistinctTestCases

      public Iterable<TestCase> getDistinctTestCases(Track track, String matcher)
      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

      public List<TestCase> getDistinctTestCasesSorted(Track track, String matcher)
    • getDistinctTracks

      public Iterable<Track> getDistinctTracks()
      Get the distinct tracks that used in this ExecutionResultSet.
      Returns:
      Tracks as iterable.
    • getDistinctTracksSorted

      public List<Track> getDistinctTracksSorted()
    • getDistinctTracks

      public Iterable<Track> getDistinctTracks(String matcher)
      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

      public List<Track> getDistinctTracksSorted(String matcher)
    • getSortedList

      private <T> List<T> getSortedList(Iterable<T> iter, Comparator<? super T> c)
      Helper method for all query distinct which needs sorted elements
      Type Parameters:
      T - Type of Iterable
      Parameters:
      iter - iterator
      c - comparator (null if default sort order)
      Returns:
      sorted list
    • getFirstResult

      public ExecutionResult 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

      private static com.googlecode.cqengine.query.Query<ExecutionResult> query(Refiner[] refinements)
    • query

      private static com.googlecode.cqengine.query.Query<ExecutionResult> query(String matcher)
    • query

      private static com.googlecode.cqengine.query.Query<ExecutionResult> query(Track track)
    • query

      private static com.googlecode.cqengine.query.Query<ExecutionResult> query(TestCase testCase)