Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.hp.hpl.jena.reasoner.rulesys.test
Class WebOntTestHarness  view WebOntTestHarness download WebOntTestHarness.java

java.lang.Object
  extended bycom.hp.hpl.jena.reasoner.rulesys.test.WebOntTestHarness

public class WebOntTestHarness
extends java.lang.Object

Test harness for running the WebOnt working group tests relevant to the OWL rule reasoner. See also TestOWLRules which runs the core WG tests as part of the routine unit tests.

Version:
$Revision: 1.24 $ on $Date: 2005/02/21 12:18:14 $

Field Summary
static boolean approvedOnly
          Set to true to use approved tests only
static java.lang.String BASE_RESULTS_URI
          The base URI for the results file
static java.lang.String BASE_TESTDIR
          The base directory for the working group test files to use
static java.lang.String BASE_URI
          The base URI in which the files are purported to reside
static java.lang.String[] BLOCKED_TESTS
          List of tests that are blocked because they test language features beyond Lite
static boolean includeModified
          Set to true to include modified test versions
(package private)  com.hp.hpl.jena.rdf.model.Resource jena2
          The resource which acts as a description for the Jena2 instance being tested
(package private)  long lastTestDuration
          The time cost in ms of the last test to be run
(package private)  int passCount
          Number of tests passed
static boolean printProfile
          Set to true to print LP engine profile information
(package private)  com.hp.hpl.jena.reasoner.Reasoner reasoner
          The reasoner being tested
static java.lang.String[] STATUS_FLAGS
          The list of status values to include.
static java.lang.String[] TEST_DIRS
          The list of subdirectories to process (omits the rdf/rdfs dirs)
(package private)  int testCount
          The number of tests run
(package private)  com.hp.hpl.jena.rdf.model.Model testDefinitions
          The total set of known tests
(package private)  com.hp.hpl.jena.rdf.model.Model testResults
          The model describing the results of the run
 
Constructor Summary
WebOntTestHarness()
           
 
Method Summary
 void comprehensionAxioms(com.hp.hpl.jena.rdf.model.Model premises, com.hp.hpl.jena.rdf.model.Model conclusions)
          Example the conclusions graph for introduction of restrictions which require a comprehension rewrite and declare new (anon) classes for those restrictions.
 boolean doRunTest(com.hp.hpl.jena.rdf.model.Resource test)
          Run a single test of any sort, return true if the test succeeds.
 java.util.List findTestsOfType(com.hp.hpl.jena.rdf.model.Resource testType)
          Return a list of all tests of the given type, according to the current filters
 com.hp.hpl.jena.rdf.model.Model getDoc(com.hp.hpl.jena.rdf.model.Resource test, com.hp.hpl.jena.rdf.model.Property docType)
          Load the premises or conclusions for the test.
 com.hp.hpl.jena.rdf.model.Model getDoc(com.hp.hpl.jena.rdf.model.Resource test, com.hp.hpl.jena.rdf.model.Property docType, boolean processImports)
          Load the premises or conclusions for the test, optional performing import processing.
 void initResults()
          Initialize the result model.
static com.hp.hpl.jena.rdf.model.Model loadAllTestDefinitions()
          Load all of the known manifest files into a single model
static com.hp.hpl.jena.rdf.model.Model loadFile(java.lang.String file, com.hp.hpl.jena.rdf.model.Model model)
          Utility to load a file into a model a Model.
static void main(java.lang.String[] args)
           
private  com.hp.hpl.jena.rdf.model.Resource mapList(com.hp.hpl.jena.rdf.model.Model target, com.hp.hpl.jena.rdf.model.Resource list, java.util.Map map)
          Helper.
 void runTest(com.hp.hpl.jena.rdf.model.Resource test)
          Run a single test of any sort, performing any appropriate logging and error reporting.
 void runTest(java.lang.String test)
          Run a single test of any sort, performing any appropriate logging and error reporting.
 void runTests()
          Run all relevant tests.
 void runTests(java.util.List tests)
          Run all tests in the given list.
 boolean testEntailment(com.hp.hpl.jena.graph.Graph conclusions, com.hp.hpl.jena.graph.Graph result)
          Test a conclusions graph against a result graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

includeModified

public static boolean includeModified
Set to true to include modified test versions


approvedOnly

public static boolean approvedOnly
Set to true to use approved tests only


printProfile

public static boolean printProfile
Set to true to print LP engine profile information


reasoner

com.hp.hpl.jena.reasoner.Reasoner reasoner
The reasoner being tested


testDefinitions

com.hp.hpl.jena.rdf.model.Model testDefinitions
The total set of known tests


testCount

int testCount
The number of tests run


lastTestDuration

long lastTestDuration
The time cost in ms of the last test to be run


passCount

int passCount
Number of tests passed


testResults

com.hp.hpl.jena.rdf.model.Model testResults
The model describing the results of the run


jena2

com.hp.hpl.jena.rdf.model.Resource jena2
The resource which acts as a description for the Jena2 instance being tested


BASE_TESTDIR

public static final java.lang.String BASE_TESTDIR
The base directory for the working group test files to use

See Also:
Constant Field Values

BASE_URI

public static java.lang.String BASE_URI
The base URI in which the files are purported to reside


BASE_RESULTS_URI

public static java.lang.String BASE_RESULTS_URI
The base URI for the results file


TEST_DIRS

public static final java.lang.String[] TEST_DIRS
The list of subdirectories to process (omits the rdf/rdfs dirs)


BLOCKED_TESTS

public static final java.lang.String[] BLOCKED_TESTS
List of tests that are blocked because they test language features beyond Lite


STATUS_FLAGS

public static final java.lang.String[] STATUS_FLAGS
The list of status values to include. If approvedOnly then only the first entry is allowed

Constructor Detail

WebOntTestHarness

public WebOntTestHarness()
Method Detail

loadAllTestDefinitions

public static com.hp.hpl.jena.rdf.model.Model loadAllTestDefinitions()
Load all of the known manifest files into a single model


initResults

public void initResults()
Initialize the result model.


main

public static void main(java.lang.String[] args)
                 throws java.io.IOException

runTests

public void runTests()
Run all relevant tests.


runTests

public void runTests(java.util.List tests)
Run all tests in the given list.


runTest

public void runTest(java.lang.String test)
Run a single test of any sort, performing any appropriate logging and error reporting.


runTest

public void runTest(com.hp.hpl.jena.rdf.model.Resource test)
Run a single test of any sort, performing any appropriate logging and error reporting.


doRunTest

public boolean doRunTest(com.hp.hpl.jena.rdf.model.Resource test)
                  throws java.io.IOException
Run a single test of any sort, return true if the test succeeds.


getDoc

public com.hp.hpl.jena.rdf.model.Model getDoc(com.hp.hpl.jena.rdf.model.Resource test,
                                              com.hp.hpl.jena.rdf.model.Property docType,
                                              boolean processImports)
                                       throws java.io.IOException
Load the premises or conclusions for the test, optional performing import processing.


getDoc

public com.hp.hpl.jena.rdf.model.Model getDoc(com.hp.hpl.jena.rdf.model.Resource test,
                                              com.hp.hpl.jena.rdf.model.Property docType)
                                       throws java.io.IOException
Load the premises or conclusions for the test.


loadFile

public static com.hp.hpl.jena.rdf.model.Model loadFile(java.lang.String file,
                                                       com.hp.hpl.jena.rdf.model.Model model)
                                                throws java.io.IOException
Utility to load a file into a model a Model. Files are assumed to be relative to the BASE_URI.


testEntailment

public boolean testEntailment(com.hp.hpl.jena.graph.Graph conclusions,
                              com.hp.hpl.jena.graph.Graph result)
Test a conclusions graph against a result graph. This works by translating the conclusions graph into a find query which contains one variable for each distinct bNode in the conclusions graph.


comprehensionAxioms

public void comprehensionAxioms(com.hp.hpl.jena.rdf.model.Model premises,
                                com.hp.hpl.jena.rdf.model.Model conclusions)
Example the conclusions graph for introduction of restrictions which require a comprehension rewrite and declare new (anon) classes for those restrictions.


mapList

private com.hp.hpl.jena.rdf.model.Resource mapList(com.hp.hpl.jena.rdf.model.Model target,
                                                   com.hp.hpl.jena.rdf.model.Resource list,
                                                   java.util.Map map)
Helper. Adds to the target model a translation of the given RDF list with each element replaced according to the map.


findTestsOfType

public java.util.List findTestsOfType(com.hp.hpl.jena.rdf.model.Resource testType)
Return a list of all tests of the given type, according to the current filters