1. ########################### test6.n3 ############################ 2. # test6.n3: URI declaration for an awww:InformationResource. 3. # 4. # Sample input data for HTTP inferencing rules. 5. # This is a DRAFT and surely will change without notice. 6. # 7. # Test with: cwm rules.n3 test6.n3 --think --strings 8. # 9. # Author: David Booth 10. # Date: 26-Feb-2008 11. # License: GPLv3: http://www.gnu.org/licenses/gpl-3.0.html 12. 13. ######################## Prefixes ########################### 14. # I see python code for parsing URIs here: 15. # http://www.w3.org/2000/10/swap/uripath.py 16. # but I haven't yet found an ontology for parsing URIs, 17. # though maybe the POWDER working group will eventually make one. 18. # @@@@ TODO: Find URI parsing ontology 19. @prefix uri: . 20. @prefix rdf: . 21. @prefix rdfs: . 22. @prefix log: . 23. # These two HTTP ontologies by David Sheets are not currently used, 24. # but relationships between my http: ontology and his 25. # are shown in comments: 26. # @prefix dshttp: . 27. # @prefix dshttph: . 28. @prefix http: . 29. @prefix sumo: . 30. @prefix owl: . 31. @prefix xsd: . 32. @prefix decl: . 33. @prefix n3: . 34. @prefix string: . 35. @prefix awww: . 36. 37. ######################## Ground Facts ########################### 38. # Using Stuart's example of a US constitution document 39. # http://lists.w3.org/Archives/Public/public-awwsw/2008Mar/0015.html 40. # we will assume that: 41. 42. uri:hasURI 43. "http://www.usconstitution.net/const.html"^^xsd:anyURI . 44. 45. "http://www.usconstitution.net/const.html"^^xsd:anyURI 46. http:hasDirectGetReply 47. . 48. 49. 50. http:hasStatusCode 200 ; 51. http:hasContentType "text/html" . 52. 53. ######################## Results ########################### 54. # Given the above facts, the following rule checks to see if this 55. # test case succeeded. 56. { 57. # Here is the main result that test6 should infer: 58. "http://www.usconstitution.net/const.html"^^xsd:anyURI 59. decl:hasDeclaration 60. { 61. 62. a awww:InformationResource ; 63. uri:hasURI 64. "http://www.usconstitution.net/const.html"^^xsd:anyURI . 65. } . 66. } => { 67. "test6" log:outputString "PASSED: test6\n" . 68. } . 69.