@prefix : <#> .
@prefix earl: <http://www.w3.org/2001/03/earl/0.95#> .
@prefix earl9: <http://www.w3.org/2001/03/earl/0.9#> .
@prefix earldata: <http://www.w3.org/2001/03/earl/0.95datatypes#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix daml: <http://www.daml.org/2001/03/daml+oil#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix doc: <http://www.w3.org/2000/10/swap/pim/doc#> .
@prefix rcs: <http://www.w3.org/2001/03swell/rcs#> .

<> dc:title "EARL (Evaluation And Report Language) 0.95 RDF Schema"; 
   doc:obsoletes <http://www.w3.org/2001/03/earl/0.9>; 
   doc:derivedFrom <http://www.w3.org/2001/03/earl/0.9>; 
   rcs:id "$Id$"; 
   rdfs:seeAlso <http://www.w3.org/2001/03/earl/0.95.rdf>, 
     <http://www.w3.org/2001/03/earl/0.95inferences> .

earl:Evaluation a rdfs:Class; rdfs:label "Evaluation"; 
   rdfs:subClassOf rdf:Statement; 
    daml:intersectionOf 
          ([ daml:onProperty rdf:subject; daml:toClass earl:Assertor ] 
           [ daml:onProperty rdf:predicate; daml:hasValue earl:asserts ] 
           [ daml:onProperty rdf:object; daml:toClass earl:Assertion ]); 
   rdfs:comment """An Evaluation is the most basic unit of EARL as it stands""" .

earl:Assertor a rdfs:Class; rdfs:label "Assertor"; 
   rdfs:subClassOf 
     [ daml:onProperty earl:platform; daml:toClass earl:TestPlatform ],
     [ daml:onProperty earl:asserts; daml:toClass earl:Assertion ]; 
   rdfs:comment """The entity making the assertion (e.g. running the test). This 
                   could be anonymous if for example you want to declare other 
                   context information.""" .

earl:asserts a rdf:Property; rdfs:label "asserts"; 
   rdfs:comment """For earl:asserts(x,y), in general, the assertor (x) 
                             asserts the assertion (y). EARL has specific 
                             classes for these""" .

earl:Assertion a rdf:Class; rdfs:label "Assertion"; 
   rdfs:subClassOf rdf:Statement; 
      daml:intersectionOf 
         ([ daml:onProperty rdf:subject; daml:toClass earl:TestSubject ] 
          [ daml:onProperty rdf:predicate; daml:toClass earl:ResultProperty ] 
          [ daml:onProperty rdf:object; daml:toClass earl:TestCase ]); 
   rdfs:comment """These could be free standing units - used outside of 
                   earl:Evaluation(s) if required""" .

# [ a earl:Evaluation; 
#   rdf:subject [ a earl:Assertor ]; 
#   rdf:predicate earl:asserts; 
#   rdf:object [ a earl:Assertion; 
#                rdf:subject [ a earl:TestSubject ]; 
#                rdf:predicate [ a earl:ResultProperty ]; 
#                rdf:object [ a earl:TestCase ] ] ] .

# earl:Assertor terms

earl:Person a rdfs:Class; rdfs:label "Person"; 
   rdfs:subClassOf earl:Assertor .
earl:operator a rdf:Property; rdfs:label "operator"; 
   rdfs:range earl:Operator .
earl:Operator rdfs:seeAlso earl:Person .

earl:contactInfo a rdf:Property; rdfs:label "contactInfo"; 
   rdfs:domain earl:Assertor; rdfs:range earl:ContactInfo .
earl:email a rdf:Property; rdfs:label "email"; 
   rdfs:subPropertyOf earl:contactInfo; rdfs:range earl:Email;
   rdfs:comment 
     """Generally, for earl:email(x, y) x has an email address of y. This is not 
        a daml:UnambiguousProperty - use foaf:mbox for that purpose""" .
earl:name a rdf:Property; rdfs:label "name"; 
   rdfs:domain earl:Assertor; rdfs:range rdfs:Literal; 
   rdfs:comment "The common proper name for some earl:Assertor" .

earl:platform a rdf:Property; rdfs:label "platform"; 
   rdfs:comment """e.g. the platform on which the test(s) were run, or the 
                   general platform on which something runs""" .
earl:TestPlatform rdfs:comment "The platform on which the test(s) were run" .
earl:Platform rdfs:comment "The general platform on which something runs" .
earl:os rdfs:label "Operating System"; rdfs:subPropertyOf earl:platform .
earl:ccppSetting rdfs:subPropertyOf earl:platform .

# earl:TestSubject terms

earl:TestSubject a rdfs:Class; rdfs:label "TestSubject"; 
   rdfs:subClassOf 
     [ daml:onProperty earl:date; daml:minCardinality "1" ], 
     [ daml:onProperty earl:platform; daml:toClass earl:Platform ] .

earl:WebContent rdfs:subClassOf earl:TestSubject;
   daml:disjointWith earl:Tool, earl:UserAgent .
earl:Tool rdfs:subClassOf earl:TestSubject; 
   daml:disjointWith earl:UserAgent .
earl:UserAgent rdfs:subClassOf earl:TestSubject .

earl:date a daml:DatatypeProperty; rdfs:range earl:Date .
earl:Date daml:disjointUnionOf (earl:DateRange earldata:Date) .

earl:DateRange daml:intersectionOf 
     ([ daml:onProperty earl:fromDate; daml:hasClass earldata:Date ] 
      [ daml:onProperty earl:toDate; daml:hasClass earldata:Date ]) .
earl:fromDate a daml:UniqueProperty .
earl:toDate a daml:UniqueProperty .

earl:testSubject a daml:UniqueProperty; rdfs:label "testSubject"; 
   rdfs:domain earl:TestSubject; 
   rdfs:range rdfs:Resource .

earl:sameSubjectAs rdfs:seeAlso daml:equivalentTo; 
   rdfs:domain earl:TestSubject; rdf:range earl:TestSubject; 
   rdfs:comment """For earl:sameSubjectAs(x, y), x is defined as being the same 
                   subject being evaluated (in an assertion) as y. In other 
                   words, there is some property of sameness between the two - 
                   the exact semantics of which are not defined here, but may 
                   be useful to individual processors."""; 
   daml:inverseOf earl:sameSubjectAs .

earl:lastModified rdfs:domain earl:TestSubject; 
   rdfs:range earl:Date; 
   rdfs:subPropertyOf earl:date .
earl:released rdfs:domain earl:TestSubject; 
   rdfs:range earl:Date; 
   rdfs:subPropertyOf earl:date .
earl:snapshot rdfs:domain earl:TestSubject .
earl:version a rdf:Property; 
   rdfs:comment "For earl:version(x, y), read: x is of version y" .

# earl:ResultProperty terms

earl:ResultProperty rdfs:subClassOf rdf:Property .

earl:validity a rdf:Property; rdfs:label "validity"; 
   rdfs:domain earl:ResultProperty; rdfs:range earl:ValidityState .
earl:Pass a earl:ValidityState .
earl:Fail a earl:ValidityState .
earl:NotTested a earl:ValidityState .
earl:NotApplicable a earl:ValidityState .
earl:CannotTell a earl:ValidityState .

earl:confidence rdfs:domain earl:ResultProperty; 
   rdfs:range earl:ConfidenceLevel .
earl:High a earl:ConfidenceLevel .
earl:Medium a earl:ConfidenceLevel .
earl:Low a earl:ConfidenceLevel .

earl:ResultProperty rdfs:subClassOf 
   [ daml:onProperty earl:note; daml:toClass rdfs:Resource ] .

# e.g.

earl:passes a earl:ResultProperty; rdfs:label "passes"; 
   earl:validity earl:Pass;
   earl:confidence earl:High .
earl:fails a earl:ResultProperty; rdfs:label "fails"; 
   earl:validity earl:Fail;
   earl:confidence earl:High .

# earl:TestCase terms

earl:TestCase a rdfs:Class; rdfs:label "TestCase" .

earl:testMode a rdf:Property; 
   rdfs:domain earl:TestCase; rdfs:range earl:TestMode .
earl:Manual a earl:TestMode .
earl:Auto a earl:TestMode .
earl:Heuristic a earl:TestMode .
earl:repairInfo 
   rdfs:range earl:RepairInfo .
earl:RepairInfo rdfs:subClassOf 
   [ daml:onProperty earl:expectedResult; daml:toClass earl:ExpectedResult ] .
earl:purpose 
   rdfs:domain earl:TestCase; rdfs:range rdfs:Literal .
earl:testId 
   rdfs:range earl:TestId;
   rdfs:comment """Points to a particular example of a technology against which 
                   one checked the particular subject (which in EARL would be 
                   an earl:TestSubject)""" .
earl:testSuite 
   rdfs:range earl:TestSuite;
   rdfs:comment """Points to a suite of technologies against which one checked 
                   the particular subject (which in EARL would be an 
                   earl:TestSubject), e.g., the W3C's SVG Test Suite""" .

earl:testCriteria 
   rdfs:domain earl:TestCase; 
   rdfs:range earl:TestCriteria .
earl:TestCriteria daml:unionOf 
     ([ daml:onProperty earl:level; daml:minCardinality "1" ] 
      [ daml:onProperty earl:excludes; daml:minCardinality "1" ]) .
earl:suite 
   rdfs:domain 
     [ daml:disjointUnionOf 
               (earl:TestCase earl:TestCriteria earl:Exclusion) ]; 
   rdfs:range earl:Suite; 
   rdfs:comment """A suite of checkpoints, guidelines, or any other form of 
                   rules that an earl:TestSubject can be evaluated against. 
                   e.g. WCAG 1.0""" .
earl:id 
   rdfs:domain 
     [ daml:disjointUnionOf 
               (earl:TestCase earl:TestCriteria earl:Exclusion) ]; 
   rdfs:range earl:Id; rdfs:comment "A single guideline, checkpoint, etc." .
earl:Suite daml:disjointWith earl:Id .
earl:excludes 
   rdfs:domain earl:TestCriteria; 
   rdfs:range earl:Exclusion .
earl:level 
   rdfs:domain 
     [ daml:disjointUnionOf (earl:TestCriteria earl:Exclusion) ]; 
   rdfs:comment """This is a generic level of test criteria, for example, 
                   the priorities/levels in WCAG. These shouldn't be a 
                   string literal""" .

earl:operatorInstructions 
   rdfs:domain earl:TestCase; rdfs:range rdfs:Literal .
earl:reproducableStep 
   rdfs:domain earl:TestCase; rdfs:range rdfs:Literal .

earl:EARL rdfs:label "EARL (Evaluation And Report Language)"; 
   earl:version "0.95" .


