| java.lang.Object com.hp.hpl.jena.reasoner.test.WGReasonerTester
WGReasonerTester | public class WGReasonerTester (Code) | | A utility to support execution of the RDFCode working group entailment
tests as specified in
http://www.w3.org/TR/2003/WD-rdf-testcases-20030123/.
The manifest file defines a set of tests. Only the positive and negative
entailment tests are handled by this utility. Each test defines a set
of data files to load. For normal positive entailment tests we check each
triple in the conclusions file to ensure it is included in the inferred
graph. For postive entailment tests which are supposed to entail the
false document we run an additional validation check. For
negative entailment tests which tests all triples in the non-conclusions file
and check that at least one trile is missing.
author: Dave Reynolds version: $Revision: 1.30 $ on $Date: 2008/01/02 12:08:31 $ |
BASE_URI | final public static String BASE_URI(Code) | | The base URI in which the files are purported to reside
|
DEFAULT_BASE_DIR | final public static String DEFAULT_BASE_DIR(Code) | | Default location for the test data
|
FAIL | final public static int FAIL(Code) | | |
FalseDocument | final public static Resource FalseDocument(Code) | | The constant used to indicate an invalid document
|
INCOMPLETE | final public static int INCOMPLETE(Code) | | |
NOT_APPLICABLE | final public static int NOT_APPLICABLE(Code) | | |
NS | final public static String NS(Code) | | The namespace for the test specification schema
|
NegativeEntailmentTest | final public static Resource NegativeEntailmentTest(Code) | | The rdf class for positive tests
|
PASS | final public static int PASS(Code) | | |
PositiveEntailmentTest | final public static Resource PositiveEntailmentTest(Code) | | The rdf class for positive tests
|
baseDir | final protected String baseDir(Code) | | The base directory in which the test data is actually stored
|
blockedTests | final public static String[] blockedTests(Code) | | List of tests block because they are only intended for non-dt aware processors
|
conclusionDocumentP | final public static Property conclusionDocumentP(Code) | | The predicate defining the conclusion from the test
|
descriptionP | final public static Property descriptionP(Code) | | The predicate defining the description of the test
|
entailmentRulesP | final public static Property entailmentRulesP(Code) | | The predicate defining the rule sets used
|
logger | protected static Log logger(Code) | | |
premiseDocumentP | final public static Property premiseDocumentP(Code) | | The predicate defining a premise for the test
|
statusP | final public static Property statusP(Code) | | The predicate defining the status of the test
|
testManifest | protected Model testManifest(Code) | | The rdf defining all the tests to be run
|
WGReasonerTester | public WGReasonerTester(String manifest, String baseDir) throws IOException(Code) | | Constructor.
Parameters: manifest - the name of the manifest file defining thesetests - relative to baseDir Parameters: baseDir - override default base directory for the tests and manifest |
WGReasonerTester | public WGReasonerTester(String manifest) throws IOException(Code) | | Constructor.
Parameters: manifest - the name of the manifest file defining thesetests - relative to baseDir |
getTypeOfLastTest | public Resource getTypeOfLastTest()(Code) | | Return the type of the last test run. Nasty hack to enable calling test harness
to interpret the success/fail boolen differently according to test type.
|
graphToQuery | public static Query graphToQuery(Graph graph)(Code) | | Translate a conclusions graph into a query pattern
|
listTests | public List listTests()(Code) | | Return a list of all test names defined in the manifest for this test harness.
|
loadFile | public Model loadFile(String file) throws IOException(Code) | | Utility to load a file in rdf/nt/n3 format as a Model.
Files are assumed to be relative to the BASE_URI.
Parameters: file - the file name, relative to baseDir the loaded Model |
runTest | public boolean runTest(String uri, ReasonerFactory reasonerF, TestCase testcase, Resource configuration) throws IOException(Code) | | Run a single designated test.
Parameters: uri - the uri of the test, as defined in the manifest file Parameters: reasonerF - the factory for the reasoner to be tested Parameters: testcase - the JUnit test case which is requesting this test Parameters: configuration - optional configuration information true if the test passes throws: IOException - if one of the test files can't be found throws: RDFException - if the test can't be found or fails internally |
runTestDetailedResponse | public int runTestDetailedResponse(String uri, ReasonerFactory reasonerF, TestCase testcase, Resource configuration) throws IOException(Code) | | Run a single designated test.
Parameters: uri - the uri of the test, as defined in the manifest file Parameters: reasonerF - the factory for the reasoner to be tested Parameters: testcase - the JUnit test case which is requesting this test Parameters: configuration - optional configuration information true if the test passes throws: IOException - if one of the test files can't be found throws: RDFException - if the test can't be found or fails internally |
runTests | public boolean runTests(ReasonerFactory reasonerF, TestCase testcase, Resource configuration) throws IOException(Code) | | Run all the tests in the manifest
Parameters: reasonerF - the factory for the reasoner to be tested Parameters: testcase - the JUnit test case which is requesting this test Parameters: configuration - optional configuration information true if all the tests pass throws: IOException - if one of the test files can't be found throws: RDFException - if the test can't be found or fails internally |
|
|