Java Doc for ReasonerTester.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.ReasonerTester

ReasonerTester
public class ReasonerTester (Code)
A utility for loading a set of test reasoner problems and running defined sets of listStatement operations and checking the results.

Each of the source, query and result models are specified in different files. The files can be of type .rdf, .nt or .n3.

A single manifest file defines the set of tests to run. Each test specifies a name, source tbox file, source data file, query file and result file using the properties "name", "source", "query" and "result" in the namespace "http://www.hpl.hp.com/semweb/2003/query_tester#". The file names are given as strings instead of URIs because the base directory for the test files is subject to change.

Within the query file each triple is treated as a triple pattern to be searched for. Variables are indicated by resources in of the form "var:x".


author:
   Dave Reynolds
version:
   $Revision: 1.31 $ on $Date: 2008/01/02 12:08:31 $


Field Summary
final public static  StringBASE_URI
    
final public static  StringNS
    
final public static  StringbaseDir
    
final public static  PropertydataP
    
final public static  PropertydescriptionP
    
protected static  Loglogger
    
final public static  PropertyqueryP
    
final public static  PropertyresultP
    
protected  MapsourceCache
    
final public static  PropertytboxP
    
final public static  ResourcetestClass
    
protected  ModeltestManifest
    

Constructor Summary
public  ReasonerTester(String manifest)
     Constructor.

Method Summary
public  ListlistTests()
     Return a list of all test names defined in the manifest for this test harness.
public  ModelloadFile(String file, boolean cache)
     Utility to load a file in rdf/nt/n3 format as a Model.
public  GraphloadTestFile(Resource test, Property predicate)
     Load the datafile given by the property name.
public static  NodenodeToPattern(Node n)
     Convert a node into a pattern node by converting var resources into wildcard variables.
public  booleanrunTest(String uri, ReasonerFactory reasonerF, TestCase testcase, Resource configuration)
     Run a single designated test.
public  booleanrunTest(String uri, Reasoner reasoner, TestCase testcase)
     Run a single designated test.
public  booleanrunTests(ReasonerFactory reasonerF, TestCase testcase, Resource configuration)
    
public  booleanrunTests(Reasoner reasoner, TestCase testcase)
    
public static  TriplePatterntripleToPattern(Triple t)
     Convert a triple into a triple pattern by converting var resources into wildcard variables.

Field Detail
BASE_URI
final public static String BASE_URI(Code)
The base URI in which the files are purported to reside



NS
final public static String NS(Code)
The namespace for the test specification schema



baseDir
final public static String baseDir(Code)
The base directory in which the test data is stored



dataP
final public static Property dataP(Code)
The predicate defining the source data file for the test



descriptionP
final public static Property descriptionP(Code)
The predicate defining the description of the test



logger
protected static Log logger(Code)



queryP
final public static Property queryP(Code)
The predicate defining the query file for the test



resultP
final public static Property resultP(Code)
The predicate defining the result file for the test



sourceCache
protected Map sourceCache(Code)
A cache of loaded source files, map from source name to Model



tboxP
final public static Property tboxP(Code)
The predicate defining the source tbox file for the test



testClass
final public static Resource testClass(Code)
The rdf class to which all tests belong



testManifest
protected Model testManifest(Code)
The rdf defining all the tests to be run




Constructor Detail
ReasonerTester
public ReasonerTester(String manifest) throws IOException(Code)
Constructor.
Parameters:
  manifest - the name of the manifest file defining thesetests - relative to baseDir




Method Detail
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, boolean cache) throws IOException(Code)
Utility to load a file in rdf/nt/n3 format as a Model.
Parameters:
  file - the file name, relative to baseDir
Parameters:
  cache - set to true if the file could be usefully cached the loaded Model



loadTestFile
public Graph loadTestFile(Resource test, Property predicate) throws IOException(Code)
Load the datafile given by the property name.
Parameters:
  test - the test being processed
Parameters:
  predicate - the property of the test giving the file name to load a graph containing the file contents or an empty graph if the propertyis not present
throws:
  IOException - if the property is present but the file can't be found



nodeToPattern
public static Node nodeToPattern(Node n)(Code)
Convert a node into a pattern node by converting var resources into wildcard variables.



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



runTest
public boolean runTest(String uri, Reasoner reasoner, TestCase testcase) throws IOException(Code)
Run a single designated test.
Parameters:
  uri - the uri of the test, as defined in the manifest file
Parameters:
  reasoner - the reasoner to be tested
Parameters:
  testcase - the JUnit test case which is requesting this test 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



runTests
public boolean runTests(Reasoner reasoner, TestCase testcase) throws IOException(Code)
Run all the tests in the manifest
Parameters:
  reasoner - the reasoner to be tested
Parameters:
  testcase - the JUnit test case which is requesting this test 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



tripleToPattern
public static TriplePattern tripleToPattern(Triple t)(Code)
Convert a triple into a triple pattern by converting var resources into wildcard variables.



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.