Java Doc for WGReasonerTester.java in  » RSS-RDF » Jena-2.5.5 » com » hp » hpl » jena » reasoner » test » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » RSS RDF » Jena 2.5.5 » com.hp.hpl.jena.reasoner.test 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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 $


Field Summary
final public static  StringBASE_URI
    
final public static  StringDEFAULT_BASE_DIR
    
final public static  intFAIL
    
final public static  ResourceFalseDocument
    
final public static  intINCOMPLETE
    
final public static  intNOT_APPLICABLE
    
final public static  StringNS
    
final public static  ResourceNegativeEntailmentTest
    
final public static  intPASS
    
final public static  ResourcePositiveEntailmentTest
    
final protected  StringbaseDir
    
final public static  String[]blockedTests
    
final public static  PropertyconclusionDocumentP
    
final public static  PropertydescriptionP
    
final public static  PropertyentailmentRulesP
    
protected static  Loglogger
    
final public static  PropertypremiseDocumentP
    
final public static  PropertystatusP
    
protected  ModeltestManifest
    
 ResourcetestType
    

Constructor Summary
public  WGReasonerTester(String manifest, String baseDir)
     Constructor.
public  WGReasonerTester(String manifest)
     Constructor.

Method Summary
public  ResourcegetTypeOfLastTest()
     Return the type of the last test run.
public static  QuerygraphToQuery(Graph graph)
    
public  ListlistTests()
     Return a list of all test names defined in the manifest for this test harness.
public  ModelloadFile(String file)
     Utility to load a file in rdf/nt/n3 format as a Model.
public  booleanrunTest(String uri, ReasonerFactory reasonerF, TestCase testcase, Resource configuration)
     Run a single designated test.
public  intrunTestDetailedResponse(String uri, ReasonerFactory reasonerF, TestCase testcase, Resource configuration)
     Run a single designated test.
public  booleanrunTests(ReasonerFactory reasonerF, TestCase testcase, Resource configuration)
    

Field Detail
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



testType
Resource testType(Code)
The type of the current test




Constructor Detail
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




Method Detail
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



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.