@prefix earl: <http://www.w3.org/WAI/ER/EARL/nmg-strawman#> .
@prefix e95: <http://www.w3.org/2001/03/earl/1.0-test#> .
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
@prefix r: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

# this file deals with intermediate rules, so that they don't turn up in the filtered results.

# get the testmode in the right place - fromAV.n3 converts to earl and filters.

{ ?x a e95:Assertion ; 
	e95:AssertedBy ?asserts .
        ?asserts a e95:Assertor ;
        e95:testmode ?mymode ;
 } =>

	{ ?x a e95:Assertion ;
		earl:mode ?mymode ;
 } .

# get the results ready for processing

#simple results first...
{ ?Assertion a e95:Assertion ;
        r:predicate ?theResults ;
} =>

        { ?Assertion earl:result ?theResults ;
 } .

#and compound results

{ ?Assertion a e95:Assertion ;
        r:predicate [
		e95:note ?resNote ;
		e95:testResult ?theResults ] 
} =>

        { ?Assertion earl:result ?theResults ;
		earl:message ?resNote 
 } .

