001package org.w3.ldp.testsuite.vocab;
002
003import com.hp.hpl.jena.rdf.model.Property;
004import com.hp.hpl.jena.rdf.model.Resource;
005import com.hp.hpl.jena.rdf.model.ResourceFactory;
006import org.openrdf.model.vocabulary.EARL;
007
008public class Earl {
009
010        /* List of Earl Resources */
011        public final static Resource TestResult = resource(EARL.TESTRESULT
012                        .toString());
013        public final static Resource TestCase = resource(EARL.NAMESPACE
014                        + "TestCase");
015
016        public final static Resource TestSubject = resource(EARL.TEST_SUBJECT
017                        .toString());
018        public final static Resource Assertion = resource(EARL.ASSERTION.toString());
019
020        public final static Resource Assertor = resource(EARL.ASSERTOR.toString());
021
022        public final static Resource Software = resource(EARL.SOFTWARE.toString());
023
024        /* List of Earl Properties */
025        public final static Property automatic = property(EARL.AUTOMATIC.toString());
026        public final static Property manual = property(EARL.MANUAL.toString());
027        public final static Property notTested = property(EARL.NOTTESTED.toString());
028
029        public final static Property testResult = property(EARL.RESULT.toString());
030        public final static Property testSubject = property(EARL.SUBJECT.toString());
031
032        public final static Property outcome = property(EARL.OUTCOME.toString());
033
034        public final static Property test = property(EARL.TEST.toString());
035
036        public final static Property mode = property(EARL.MODE.toString());
037        public final static Property auto = property(EARL.AUTOMATIC.toString());
038
039        public final static Property assertedBy = property(EARL.ASSERTEDBY
040                        .toString());
041
042        // Note, this string values from org.openrdf...EARL are wrong compared to
043        // the spec at http://www.w3.org/TR/EARL10-Schema/#OutcomeValue
044        public final static Property passed = property(EARL.NAMESPACE + "passed");
045        public final static Property failed = property(EARL.NAMESPACE + "failed");
046        public final static Property untested = property(EARL.NAMESPACE + "untested");
047        public final static Property inapplicable = property(EARL.NAMESPACE + "inapplicable");
048        public final static Property cantTess = property(EARL.NAMESPACE + "cantTell");
049        
050        protected static final Property property(String name) {
051                return ResourceFactory.createProperty(name);
052        }
053
054        protected static final Resource resource(String name) {
055                return ResourceFactory.createResource(name);
056        }
057
058}