activerdf_net7 1.6.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. data/CHANGELOG +79 -0
  2. data/LICENSE +504 -0
  3. data/README.rdoc +34 -0
  4. data/activerdf-jena/CHANGELOG +14 -0
  5. data/activerdf-jena/LICENSE +504 -0
  6. data/activerdf-jena/README +57 -0
  7. data/activerdf-jena/Rakefile +87 -0
  8. data/activerdf-jena/TODO +18 -0
  9. data/activerdf-jena/VERSION +1 -0
  10. data/activerdf-jena/ext/antlr-2.7.5.jar +0 -0
  11. data/activerdf-jena/ext/arq-extra.jar +0 -0
  12. data/activerdf-jena/ext/arq.jar +0 -0
  13. data/activerdf-jena/ext/aterm-java-1.6.jar +0 -0
  14. data/activerdf-jena/ext/commons-logging-1.1.jar +0 -0
  15. data/activerdf-jena/ext/concurrent.jar +0 -0
  16. data/activerdf-jena/ext/icu4j_3_4.jar +0 -0
  17. data/activerdf-jena/ext/iri.jar +0 -0
  18. data/activerdf-jena/ext/jena.jar +0 -0
  19. data/activerdf-jena/ext/jenatest.jar +0 -0
  20. data/activerdf-jena/ext/json.jar +0 -0
  21. data/activerdf-jena/ext/junit.jar +0 -0
  22. data/activerdf-jena/ext/log4j-1.2.12.jar +0 -0
  23. data/activerdf-jena/ext/lucene-core-2.0.0.jar +0 -0
  24. data/activerdf-jena/ext/ng4j.jar +0 -0
  25. data/activerdf-jena/ext/pellet.jar +0 -0
  26. data/activerdf-jena/ext/relaxngDatatype.jar +0 -0
  27. data/activerdf-jena/ext/stax-api-1.0.jar +0 -0
  28. data/activerdf-jena/ext/wstx-asl-3.0.0.jar +0 -0
  29. data/activerdf-jena/ext/xercesImpl.jar +0 -0
  30. data/activerdf-jena/ext/xml-apis.jar +0 -0
  31. data/activerdf-jena/ext/xsdlib.jar +0 -0
  32. data/activerdf-jena/lib/activerdf_jena/init.rb +26 -0
  33. data/activerdf-jena/lib/activerdf_jena/jena.rb +59 -0
  34. data/activerdf-jena/lib/activerdf_jena/jena_adapter.rb +515 -0
  35. data/activerdf-jena/lib/activerdf_jena/lucene.rb +22 -0
  36. data/activerdf-jena/lib/activerdf_jena/ng4j.rb +50 -0
  37. data/activerdf-jena/lib/activerdf_jena/ng4j_adapter.rb +379 -0
  38. data/activerdf-jena/lib/activerdf_jena/pellet.rb +25 -0
  39. data/activerdf-jena/test/bnode_org_rss.rdf +793 -0
  40. data/activerdf-jena/test/eyal-foaf.nt +39 -0
  41. data/activerdf-jena/test/fun_with_bnodes.nt +2 -0
  42. data/activerdf-jena/test/s1.n3 +18 -0
  43. data/activerdf-jena/test/test_data.nt +32 -0
  44. data/activerdf-jena/test/test_jena_adapter.rb +451 -0
  45. data/activerdf-jena/test/test_ng4j_adapter.rb +354 -0
  46. data/activerdf-rdflite/CHANGELOG +31 -0
  47. data/activerdf-rdflite/LICENSE +504 -0
  48. data/activerdf-rdflite/README +16 -0
  49. data/activerdf-rdflite/Rakefile +73 -0
  50. data/activerdf-rdflite/VERSION +1 -0
  51. data/activerdf-rdflite/lib/activerdf_rdflite/fetching.rb +34 -0
  52. data/activerdf-rdflite/lib/activerdf_rdflite/init.rb +13 -0
  53. data/activerdf-rdflite/lib/activerdf_rdflite/rdflite.rb +582 -0
  54. data/activerdf-rdflite/lib/activerdf_rdflite/suggesting.rb +87 -0
  55. data/activerdf-rdflite/test/test_bnode_data.nt +5 -0
  56. data/activerdf-rdflite/test/test_data.nt +32 -0
  57. data/activerdf-rdflite/test/test_escaped_data.nt +2 -0
  58. data/activerdf-rdflite/test/test_fetching.rb +33 -0
  59. data/activerdf-rdflite/test/test_rdflite.rb +277 -0
  60. data/activerdf-redland/CHANGELOG +12 -0
  61. data/activerdf-redland/LICENSE +504 -0
  62. data/activerdf-redland/README +9 -0
  63. data/activerdf-redland/Rakefile +72 -0
  64. data/activerdf-redland/VERSION +1 -0
  65. data/activerdf-redland/lib/activerdf_redland/init.rb +10 -0
  66. data/activerdf-redland/lib/activerdf_redland/redland.rb +362 -0
  67. data/activerdf-redland/test/test_person_data.nt +42 -0
  68. data/activerdf-redland/test/test_redland_adapter.rb +242 -0
  69. data/activerdf-sesame/CHANGELOG +6 -0
  70. data/activerdf-sesame/LICENSE +10 -0
  71. data/activerdf-sesame/LICENSE-aduna +10 -0
  72. data/activerdf-sesame/LICENSE-lgpl +504 -0
  73. data/activerdf-sesame/README +33 -0
  74. data/activerdf-sesame/Rakefile +77 -0
  75. data/activerdf-sesame/VERSION +1 -0
  76. data/activerdf-sesame/ext/commons-codec-1.3.jar +0 -0
  77. data/activerdf-sesame/ext/commons-dbcp-1.2.2.jar +0 -0
  78. data/activerdf-sesame/ext/commons-httpclient-3.1.jar +0 -0
  79. data/activerdf-sesame/ext/commons-logging-1.1.1.jar +0 -0
  80. data/activerdf-sesame/ext/commons-pool-1.3.jar +0 -0
  81. data/activerdf-sesame/ext/commons-pool-1.5.2.jar +0 -0
  82. data/activerdf-sesame/ext/junit-3.8.2.jar +0 -0
  83. data/activerdf-sesame/ext/openrdf-sesame-2.0-onejar.jar +0 -0
  84. data/activerdf-sesame/ext/openrdf-sesame-2.3-pr1-onejar.jar +0 -0
  85. data/activerdf-sesame/ext/slf4j-api-1.4.3.jar +0 -0
  86. data/activerdf-sesame/ext/slf4j-nop-1.4.3.jar +0 -0
  87. data/activerdf-sesame/ext/wrapper-sesame2.jar +0 -0
  88. data/activerdf-sesame/java/build.number +3 -0
  89. data/activerdf-sesame/java/build.xml +313 -0
  90. data/activerdf-sesame/java/javadoc/allclasses-frame.html +31 -0
  91. data/activerdf-sesame/java/javadoc/allclasses-noframe.html +31 -0
  92. data/activerdf-sesame/java/javadoc/constant-values.html +146 -0
  93. data/activerdf-sesame/java/javadoc/deprecated-list.html +146 -0
  94. data/activerdf-sesame/java/javadoc/help-doc.html +223 -0
  95. data/activerdf-sesame/java/javadoc/index-files/index-1.html +150 -0
  96. data/activerdf-sesame/java/javadoc/index-files/index-10.html +145 -0
  97. data/activerdf-sesame/java/javadoc/index-files/index-2.html +157 -0
  98. data/activerdf-sesame/java/javadoc/index-files/index-3.html +146 -0
  99. data/activerdf-sesame/java/javadoc/index-files/index-4.html +145 -0
  100. data/activerdf-sesame/java/javadoc/index-files/index-5.html +145 -0
  101. data/activerdf-sesame/java/javadoc/index-files/index-6.html +142 -0
  102. data/activerdf-sesame/java/javadoc/index-files/index-7.html +145 -0
  103. data/activerdf-sesame/java/javadoc/index-files/index-8.html +152 -0
  104. data/activerdf-sesame/java/javadoc/index-files/index-9.html +146 -0
  105. data/activerdf-sesame/java/javadoc/index.html +36 -0
  106. data/activerdf-sesame/java/javadoc/org/activerdf/wrapper/sesame2/WrapperForSesame2.html +665 -0
  107. data/activerdf-sesame/java/javadoc/org/activerdf/wrapper/sesame2/class-use/WrapperForSesame2.html +144 -0
  108. data/activerdf-sesame/java/javadoc/org/activerdf/wrapper/sesame2/package-frame.html +32 -0
  109. data/activerdf-sesame/java/javadoc/org/activerdf/wrapper/sesame2/package-summary.html +157 -0
  110. data/activerdf-sesame/java/javadoc/org/activerdf/wrapper/sesame2/package-tree.html +150 -0
  111. data/activerdf-sesame/java/javadoc/org/activerdf/wrapper/sesame2/package-use.html +144 -0
  112. data/activerdf-sesame/java/javadoc/overview-summary.html +156 -0
  113. data/activerdf-sesame/java/javadoc/overview-tree.html +152 -0
  114. data/activerdf-sesame/java/javadoc/package-list +1 -0
  115. data/activerdf-sesame/java/javadoc/resources/inherit.gif +0 -0
  116. data/activerdf-sesame/java/javadoc/stylesheet.css +29 -0
  117. data/activerdf-sesame/java/lib/commons-codec-1.3.jar +0 -0
  118. data/activerdf-sesame/java/lib/commons-dbcp-1.2.2.jar +0 -0
  119. data/activerdf-sesame/java/lib/commons-httpclient-3.1.jar +0 -0
  120. data/activerdf-sesame/java/lib/commons-logging-1.1.1.jar +0 -0
  121. data/activerdf-sesame/java/lib/commons-pool-1.3.jar +0 -0
  122. data/activerdf-sesame/java/lib/commons-pool-1.5.2.jar +0 -0
  123. data/activerdf-sesame/java/lib/junit-3.8.2.jar +0 -0
  124. data/activerdf-sesame/java/lib/openrdf-sesame-2.0-onejar.jar +0 -0
  125. data/activerdf-sesame/java/lib/openrdf-sesame-2.3-pr1-onejar.jar +0 -0
  126. data/activerdf-sesame/java/lib/slf4j-api-1.4.3.jar +0 -0
  127. data/activerdf-sesame/java/lib/slf4j-nop-1.4.3.jar +0 -0
  128. data/activerdf-sesame/java/manifest.mf +3 -0
  129. data/activerdf-sesame/java/settings.xml +135 -0
  130. data/activerdf-sesame/java/src/org/activerdf/wrapper/sesame2/WrapperForSesame2.java +145 -0
  131. data/activerdf-sesame/java/test-src/org/activerdf/wrapper/sesame2/TestWrapperForSesame2.java +41 -0
  132. data/activerdf-sesame/lib/activerdf_sesame/init.rb +11 -0
  133. data/activerdf-sesame/lib/activerdf_sesame/sesame.rb +400 -0
  134. data/activerdf-sesame/test/eyal-foaf.nt +39 -0
  135. data/activerdf-sesame/test/eyal-foaf.rdf +65 -0
  136. data/activerdf-sesame/test/test_sesame_adapter.rb +341 -0
  137. data/activerdf-sparql/CHANGELOG +35 -0
  138. data/activerdf-sparql/LICENSE +504 -0
  139. data/activerdf-sparql/README +10 -0
  140. data/activerdf-sparql/Rakefile +78 -0
  141. data/activerdf-sparql/VERSION +1 -0
  142. data/activerdf-sparql/lib/activerdf_sparql/init.rb +10 -0
  143. data/activerdf-sparql/lib/activerdf_sparql/sparql.rb +212 -0
  144. data/activerdf-sparql/lib/activerdf_sparql/sparql_result_parser.rb +55 -0
  145. data/activerdf-sparql/test/test_sparql_adapter.rb +108 -0
  146. data/activerdf-yars/LICENSE +504 -0
  147. data/activerdf-yars/README +10 -0
  148. data/activerdf-yars/Rakefile +38 -0
  149. data/activerdf-yars/lib/activerdf_yars/init.rb +10 -0
  150. data/activerdf-yars/lib/activerdf_yars/jars2.rb +119 -0
  151. data/lib/active_rdf.rb +85 -0
  152. data/lib/active_rdf/directaccess/direct_access.rb +49 -0
  153. data/lib/active_rdf/federation/active_rdf_adapter.rb +47 -0
  154. data/lib/active_rdf/federation/connection_pool.rb +156 -0
  155. data/lib/active_rdf/federation/federation_manager.rb +112 -0
  156. data/lib/active_rdf/instance_exec.rb +13 -0
  157. data/lib/active_rdf/objectmanager/bnode.rb +7 -0
  158. data/lib/active_rdf/objectmanager/literal.rb +71 -0
  159. data/lib/active_rdf/objectmanager/namespace.rb +106 -0
  160. data/lib/active_rdf/objectmanager/object_manager.rb +119 -0
  161. data/lib/active_rdf/objectmanager/ordered_set.rb +116 -0
  162. data/lib/active_rdf/objectmanager/property_list.rb +76 -0
  163. data/lib/active_rdf/objectmanager/resource.rb +609 -0
  164. data/lib/active_rdf/objectmanager/resource_like.rb +28 -0
  165. data/lib/active_rdf/queryengine/ntriples_parser.rb +90 -0
  166. data/lib/active_rdf/queryengine/query.rb +245 -0
  167. data/lib/active_rdf/queryengine/query2jars2.rb +22 -0
  168. data/lib/active_rdf/queryengine/query2sparql.rb +139 -0
  169. data/lib/active_rdf_helpers.rb +30 -0
  170. data/lib/active_rdf_log.rb +100 -0
  171. data/test/common.rb +119 -0
  172. data/test/directaccess/test_direct_access.rb +64 -0
  173. data/test/federation/test_connection_pool.rb +86 -0
  174. data/test/federation/test_federation_manager.rb +145 -0
  175. data/test/objectmanager/test_literal.rb +52 -0
  176. data/test/objectmanager/test_namespace.rb +83 -0
  177. data/test/objectmanager/test_object_manager.rb +96 -0
  178. data/test/objectmanager/test_ordered_set.rb +110 -0
  179. data/test/objectmanager/test_resource_reading.rb +150 -0
  180. data/test/objectmanager/test_resource_writing.rb +39 -0
  181. data/test/objectmanager/test_talia_syntax.rb +68 -0
  182. data/test/queryengine/my_external_resource.rb +24 -0
  183. data/test/queryengine/test_external_resource_class.rb +49 -0
  184. data/test/queryengine/test_ntriples_parser.rb +71 -0
  185. data/test/queryengine/test_query.rb +55 -0
  186. data/test/queryengine/test_query2jars2.rb +51 -0
  187. data/test/queryengine/test_query2sparql.rb +76 -0
  188. data/test/queryengine/test_query_engine.rb +52 -0
  189. data/test/test_adapters.rb +58 -0
  190. metadata +266 -0
@@ -0,0 +1,39 @@
1
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf> <http://www.w3.org/2000/01/rdf-schema#label> "FOAF file of Eyal Oren" .
2
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf> <http://purl.org/rss/1.0/modules/syndication/updateFrequency> "1" .
3
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf> <http://purl.org/rss/1.0/modules/syndication/updatePeriod> "weekly" .
4
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf#me> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
5
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf#me> <http://xmlns.com/foaf/0.1/name> "Eyal Oren" .
6
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf#me> <http://xmlns.com/foaf/0.1/title> "ir." .
7
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf#me> <http://xmlns.com/foaf/0.1/gender> "male" .
8
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf#me> <http://xmlns.com/foaf/0.1/mbox> <mailto:eyal.oren@deri.org> .
9
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf#me> <http://xmlns.com/foaf/0.1/homepage> <http://www.eyaloren.org/> .
10
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf#me> <http://xmlns.com/foaf/0.1/workplaceHomepage> <http://www.deri.ie/> .
11
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf#me> <http://xmlns.com/foaf/0.1/img> <http://www.eyaloren.org/eyal.jpg> .
12
+ <https://launchpad.net/products/activerdf/+rdf> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Project> .
13
+ <https://launchpad.net/products/activerdf/+rdf> <http://xmlns.com/foaf/0.1/name> "ActiveRDF" .
14
+ <https://launchpad.net/products/activerdf/+rdf> <http://xmlns.com/foaf/0.1/homepage> <http://www.activerdf.org/> .
15
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf#me> <http://xmlns.com/foaf/0.1/currentProject> <https://launchpad.net/products/activerdf/+rdf> .
16
+ <https://launchpad.net/products/browserdf/+rdf> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Project> .
17
+ <https://launchpad.net/products/browserdf/+rdf> <http://xmlns.com/foaf/0.1/name> "BrowseRDF" .
18
+ <https://launchpad.net/products/browserdf/+rdf> <http://xmlns.com/foaf/0.1/homepage> <http://www.browserdf.org/> .
19
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf#me> <http://xmlns.com/foaf/0.1/currentProject> <https://launchpad.net/products/browserdf/+rdf> .
20
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf#me> <http://xmlns.com/foaf/0.1/knows> <http://www.w3.org/People/Berners-Lee/card#i> .
21
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf#me> <http://xmlns.com/foaf/0.1/knows> <http://richard.cyganiak.de/foaf.rdf#cygri> .
22
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf#me> <http://xmlns.com/foaf/0.1/knows> <http://www.harth.org/~andreas/foaf.rdf#ah> .
23
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf#me> <http://xmlns.com/foaf/0.1/knows> <http://www.leobard.net/rdf/foaf.xml#me> .
24
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf#me> <http://xmlns.com/foaf/0.1/knows> <http://www.debruijn.net/foaf.rdf#me> .
25
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf#me> <http://xmlns.com/foaf/0.1/knows> <http://platon.escet.urjc.es/~axel/foaf.rdf#me> .
26
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf#me> <http://xmlns.com/foaf/0.1/knows> <http://www.kr.tuwien.ac.at/staff/roman/foaf.rdf#me> .
27
+ <http://sw.deri.org/~knud> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
28
+ <http://sw.deri.org/~knud> <http://xmlns.com/foaf/0.1/name> "Knud M\u00F6ller" .
29
+ <http://sw.deri.org/~knud> <http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://sw.deri.org/~knud/knudfoaf.rdf> .
30
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf#me> <http://xmlns.com/foaf/0.1/knows> <http://sw.deri.org/~knud> .
31
+ <http://www-cdr.stanford.edu/~petrie/foaf.rdf#me> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
32
+ <http://www-cdr.stanford.edu/~petrie/foaf.rdf#me> <http://xmlns.com/foaf/0.1/name> "Charles Petrie" .
33
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf#me> <http://xmlns.com/foaf/0.1/knows> <http://www-cdr.stanford.edu/~petrie/foaf.rdf#me> .
34
+ <http://www.isi.edu/~stefan/foaf.rdf> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
35
+ <http://www.isi.edu/~stefan/foaf.rdf> <http://xmlns.com/foaf/0.1/name> "Stefan Decker" .
36
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf#me> <http://xmlns.com/foaf/0.1/knows> <http://www.isi.edu/~stefan/foaf.rdf> .
37
+ <http://www.aifb.uni-karlsruhe.de/Personen/viewPersonOWL/id2076instance> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
38
+ <http://www.aifb.uni-karlsruhe.de/Personen/viewPersonOWL/id2076instance> <http://xmlns.com/foaf/0.1/name> "Max V\u00F6lkel" .
39
+ <file:///home/metaman/workspaces/deri-workspace/activerdf/activerdf-sesame/test/eyal-foaf.rdf#me> <http://xmlns.com/foaf/0.1/knows> <http://www.aifb.uni-karlsruhe.de/Personen/viewPersonOWL/id2076instance> .
@@ -0,0 +1,2 @@
1
+ _:r1183422709r25855r4275 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
2
+ _:r1183422709r25855r4275 <http://xmlns.com/foaf/0.1/homepage> <http://wordpress.org> .
@@ -0,0 +1,18 @@
1
+ # Schema for test data
2
+ #
3
+ # This is only
4
+ @prefix daml: <http://www.daml.org/2001/03/daml+oil#> .
5
+ @prefix mech: <#> .
6
+
7
+ @prefix : <#> .
8
+
9
+ :includes a daml:TransitiveProperty .
10
+
11
+ :partOf a daml:TransitiveProperty; daml:inverseOf :includes .
12
+
13
+ :dependsOn a daml:TransitiveProperty ;
14
+ daml:hasSubProperty :includes . # Real name of subproperty?
15
+
16
+
17
+
18
+
@@ -0,0 +1,32 @@
1
+ <http://activerdf.org/test/Person> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
2
+ <http://activerdf.org/test/Person> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .
3
+ <http://activerdf.org/test/Person> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#Resource> .
4
+ <http://activerdf.org/test/age> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
5
+ <http://activerdf.org/test/age> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .
6
+ <http://activerdf.org/test/age> <http://www.w3.org/2000/01/rdf-schema#domain> <http://activerdf.org/test/Person> .
7
+ <http://activerdf.org/test/age> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Resource> .
8
+ <http://activerdf.org/test/age> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Literal> .
9
+ <http://activerdf.org/test/car> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
10
+ <http://activerdf.org/test/car> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .
11
+ <http://activerdf.org/test/car> <http://www.w3.org/2000/01/rdf-schema#domain> <http://activerdf.org/test/Person> .
12
+ <http://activerdf.org/test/car> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Resource> .
13
+ <http://activerdf.org/test/car> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Literal> .
14
+ <http://activerdf.org/test/eyal> <http://activerdf.org/test/age> "27" .
15
+ <http://activerdf.org/test/eyal> <http://activerdf.org/test/eye> "blue" .
16
+ <http://activerdf.org/test/eyal> <http://activerdf.org/test/name> "Eyal Oren" .
17
+ <http://activerdf.org/test/eyal> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://activerdf.org/test/Person> .
18
+ <http://activerdf.org/test/eyal> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .
19
+ <http://activerdf.org/test/eye> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
20
+ <http://activerdf.org/test/eye> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .
21
+ <http://activerdf.org/test/eye> <http://www.w3.org/2000/01/rdf-schema#domain> <http://activerdf.org/test/Person> .
22
+ <http://activerdf.org/test/eye> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Resource> .
23
+ <http://activerdf.org/test/eye> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Literal> .
24
+ <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
25
+ <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .
26
+ <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Resource> .
27
+ <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#Class> .
28
+ <http://www.w3.org/2000/01/rdf-schema#Class> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
29
+ <http://www.w3.org/2000/01/rdf-schema#Class> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .
30
+ _:#1 <http://activerdf.org/test/age> "29" .
31
+ _:#1 <http://activerdf.org/test/name> "Another Person" .
32
+ _:#1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://activerdf.org/test/Person> .
@@ -0,0 +1,451 @@
1
+ # Authors:: Benjamin Heitmann, Karsten Huneycutt
2
+ # Copyright:: (c) 2007
3
+ # License:: LGPL
4
+
5
+ require 'test/unit'
6
+ require 'rubygems'
7
+
8
+ require "java"
9
+
10
+ require 'active_rdf'
11
+
12
+ require "pp"
13
+
14
+ require "fileutils"
15
+
16
+ class TestJenaAdapter < Test::Unit::TestCase
17
+
18
+ def setup
19
+ @adapter = ConnectionPool.add_data_source(:type => :jena, :ontology => :rdfs)
20
+ @eyal = RDFS::Resource.new 'http://eyaloren.org'
21
+ @age = RDFS::Resource.new 'foaf:age'
22
+ @mbox = RDFS::Resource.new 'foaf:mbox'
23
+ @test = RDFS::Resource.new 'test:test'
24
+ @mboxval = Literal.new 'aahfgiouhfg'
25
+ @ageval = Literal.new 23
26
+ end
27
+
28
+ def teardown
29
+ @adapter.close
30
+ # ConnectionPool.clear
31
+ end
32
+
33
+
34
+
35
+ def test_load_no_args
36
+ adapter = ConnectionPool.add_data_source(:type => :jena)
37
+ assert_instance_of JenaAdapter, adapter
38
+ end
39
+
40
+ def test_with_args_no_location
41
+ assert_instance_of JenaAdapter, @adapter
42
+ end
43
+
44
+ def test_retrieve_a_triple_with_only_uris
45
+
46
+ assert_instance_of JenaAdapter, @adapter
47
+
48
+ @adapter.add(@eyal, @age, @test)
49
+ result = Query.new.distinct(:o).where(@eyal, :p, :o).execute
50
+ assert_equal 1, result.flatten.size
51
+
52
+ result = Query.new.distinct(:p, :o).where(@eyal, :p, :o).execute
53
+ assert_equal 2, result.flatten.size
54
+
55
+ result = Query.new.distinct(:o).where(@eyal, @age, :o).execute
56
+ assert_equal 1, result.flatten.size
57
+
58
+ result = Query.new.distinct(:s).where(:s, @age, @test).execute
59
+ assert_equal 1, result.flatten.size
60
+
61
+ result = Query.new.distinct(:p).where(@eyal, :p, @test).execute
62
+ assert_equal 1, result.flatten.size
63
+
64
+ end
65
+
66
+ def test_retrieve_a_triple_with_string
67
+
68
+ assert_instance_of JenaAdapter, @adapter
69
+
70
+ @adapter.add(@eyal, @mbox, @mboxval)
71
+ result = Query.new.distinct(:o).where(@eyal, :p, :o).execute
72
+ assert_equal 1, result.flatten.size
73
+
74
+ result = Query.new.distinct(:p, :o).where(@eyal, :p, :o).execute
75
+ assert_equal 2, result.flatten.size
76
+
77
+ result = Query.new.distinct(:o).where(@eyal, @mbox, :o).execute
78
+ assert_equal 1, result.flatten.size
79
+
80
+ result = Query.new.distinct(:s).where(:s, @mbox, @mboxval).execute
81
+ assert_equal 1, result.flatten.size
82
+
83
+ result = Query.new.distinct(:p).where(@eyal, :p, @mboxval).execute
84
+ assert_equal 1, result.flatten.size
85
+
86
+ end
87
+
88
+ def test_retrieve_a_triple_with_fixnum
89
+
90
+ assert_instance_of JenaAdapter, @adapter
91
+
92
+ @adapter.add(@eyal, @age, @ageval)
93
+ result = Query.new.distinct(:o).where(@eyal, :p, :o).execute
94
+ assert_equal 1, result.flatten.size
95
+
96
+ result = Query.new.distinct(:p, :o).where(@eyal, :p, :o).execute
97
+ assert_equal 2, result.flatten.size
98
+
99
+ result = Query.new.distinct(:o).where(@eyal, @age, :o).execute
100
+ assert_equal 1, result.flatten.size
101
+
102
+ result = Query.new.distinct(:s).where(:s, @age, @ageval).execute
103
+ assert_equal 1, result.flatten.size
104
+
105
+ result = Query.new.distinct(:p).where(@eyal, :p, @ageval).execute
106
+ assert_equal 1, result.flatten.size
107
+
108
+ end
109
+
110
+ def test_remove
111
+ @adapter.add(@eyal, @age, @ageval)
112
+ @adapter.add(@eyal, @mbox, @mboxval)
113
+ @adapter.delete(@eyal, @age, @ageval)
114
+ assert_equal 1, @adapter.size
115
+
116
+
117
+ @adapter.add(@eyal, @age, @ageval)
118
+ @adapter.add(@eyal, @mbox, @mboxval)
119
+ @adapter.delete(:s, :p, @ageval)
120
+ assert_equal 1, @adapter.size
121
+
122
+ @adapter.add(@eyal, @age, @ageval)
123
+ @adapter.add(@eyal, @mbox, @mboxval)
124
+ @adapter.delete(:s, @age, :o)
125
+ assert_equal 1, @adapter.size
126
+
127
+ @adapter.add(@eyal, @age, @ageval)
128
+ @adapter.add(@eyal, @mbox, @mboxval)
129
+ @adapter.delete(@eyal, :p, :o)
130
+ assert_equal 0, @adapter.size
131
+ end
132
+
133
+ def test_dump
134
+ @adapter.add(@eyal, @age, @test)
135
+
136
+ stringDump = @adapter.dump
137
+
138
+ assert_not_nil stringDump
139
+ assert_kind_of String, stringDump
140
+ end
141
+
142
+ def test_size
143
+ @adapter.add(@eyal, @age, @test)
144
+
145
+ assert 0 < @adapter.size
146
+ end
147
+
148
+ def test_clear
149
+ @adapter.add(@eyal, @age, @test)
150
+ assert 0 < @adapter.size
151
+
152
+ @adapter.clear
153
+ assert_equal 0, @adapter.size
154
+ end
155
+
156
+ # may seem redundant, but nonetheless this is needed
157
+ def test_close
158
+ my_adapter = ConnectionPool.add_data_source(:type => :jena, :ontology => :rdfs)
159
+ my_adapter.add(@eyal, @age, @test)
160
+ results = Query.new.select(:s,:p,:o).where(:s,:p,:o).execute
161
+ assert results.flatten.size > 0
162
+
163
+ my_adapter.close
164
+ assert_raises ActiveRdfError do
165
+ results = Query.new.select(:s,:p,:o).where(:s,:p,:o).execute
166
+ end
167
+
168
+ my_adapter = ConnectionPool.add_data_source(:type => :jena, :ontology => :rdfs)
169
+ my_adapter.add(@eyal, @age, @test)
170
+ results = Query.new.select(:s,:p,:o).where(:s,:p,:o).execute
171
+ assert results.flatten.size > 0
172
+
173
+ my_adapter.close
174
+ assert_raises ActiveRdfError do
175
+ results = Query.new.select(:s,:p,:o).where(:s,:p,:o).execute
176
+ end
177
+ end
178
+
179
+
180
+ def test_load_ntriples
181
+ assert_equal 0, @adapter.size
182
+
183
+ this_dir = File.dirname(File.expand_path(__FILE__))
184
+ @adapter.load("file://" + this_dir + "/eyal-foaf.nt", :format => :ntriples, :into => :default_model)
185
+
186
+ assert_not_equal 0, @adapter.size
187
+
188
+ #check for <https://launchpad.net/products/browserdf/+rdf> <http://xmlns.com/foaf/0.1/name> "BrowseRDF" .
189
+ project_browserdf = RDFS::Resource.new("https://launchpad.net/products/browserdf/+rdf")
190
+ foaf_name = RDFS::Resource.new("http://xmlns.com/foaf/0.1/name")
191
+ result = Query.new.distinct(:o).where(project_browserdf, foaf_name, :o).execute
192
+ assert_equal 1, result.flatten.size
193
+ assert_equal "BrowseRDF", result[0]
194
+ end
195
+
196
+ def test_load_rdf_xml
197
+ assert_equal 0, @adapter.size
198
+
199
+ this_dir = File.dirname(File.expand_path(__FILE__))
200
+ @adapter.load("file://" + this_dir + "/bnode_org_rss.rdf", :format => :rdfxml, :into => :default_model)
201
+
202
+ assert_not_equal 0, @adapter.size
203
+
204
+ a_post = RDFS::Resource.new("http://bnode.org/blog/2007/05/29/semantic-web-gets-a-mention-in-visual-x-mag-webinale-report")
205
+ rss_title = RDFS::Resource.new("http://purl.org/rss/1.0/title")
206
+
207
+ result = Query.new.distinct(:o).where(a_post, rss_title, :o).execute
208
+ assert_equal 1, result.flatten.size
209
+ assert_equal "Semantic Web gets a mention in Visual-x mag webinale report", result[0]
210
+ end
211
+
212
+ def test_load_n3
213
+ assert_equal 0, @adapter.size
214
+
215
+ this_dir = File.dirname(File.expand_path(__FILE__))
216
+ @adapter.load("file://" + this_dir + "/s1.n3", :format => :n3, :into => :default_model)
217
+
218
+ assert_not_equal 0, @adapter.size
219
+
220
+ transy = RDFS::Resource.new("http://www.daml.org/2001/03/daml+oil#TransitiveProperty")
221
+ rdf_type = RDFS::Resource.new("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")
222
+ result = Query.new.distinct(:s).where(:s, rdf_type, transy).execute
223
+
224
+ assert_equal 3, result.flatten.size
225
+ end
226
+
227
+ def test_persistence_file_based_anonymous
228
+ @adapter.close
229
+
230
+ this_dir = File.dirname(File.expand_path(__FILE__))
231
+ Dir.mkdir(this_dir + "/jena_persistence")
232
+ persistent_adapter = ConnectionPool.add_data_source(:type => :jena,
233
+ :file => this_dir + "/jena_persistence")
234
+ assert_equal 0, persistent_adapter.size
235
+
236
+ persistent_adapter.add(@eyal, @age, @ageval)
237
+ persistent_adapter.add(@eyal, @mbox, @mboxval)
238
+
239
+ result = Query.new.distinct(:o).where(@eyal, :p, :o).execute
240
+ assert_equal 2, result.flatten.size
241
+
242
+ persistent_adapter.close
243
+ ConnectionPool.clear
244
+
245
+ adapter2 = ConnectionPool.add_data_source(:type => :jena,
246
+ :file => this_dir + "/jena_persistence")
247
+
248
+ result = Query.new.distinct(:o).where(@eyal, :p, :o).execute
249
+ assert_equal 2, result.flatten.size
250
+
251
+ adapter2.close
252
+ FileUtils.rm_rf(this_dir + "/jena_persistence")
253
+ end
254
+
255
+ def test_persistence_file_based_named_model
256
+ @adapter.close
257
+
258
+ this_dir = File.dirname(File.expand_path(__FILE__))
259
+ Dir.mkdir(this_dir + "/jena_persistence")
260
+ persistent_adapter = ConnectionPool.add_data_source(:type => :jena, :model => "superfunky",
261
+ :file => this_dir + "/jena_persistence")
262
+ assert_equal 0, persistent_adapter.size
263
+
264
+ persistent_adapter.add(@eyal, @age, @ageval)
265
+ persistent_adapter.add(@eyal, @mbox, @mboxval)
266
+
267
+ result = Query.new.distinct(:o).where(@eyal, :p, :o).execute
268
+ assert_equal 2, result.flatten.size
269
+
270
+ persistent_adapter.close
271
+ ConnectionPool.clear
272
+
273
+ adapter2 = ConnectionPool.add_data_source(:type => :jena, :model => "superfunky",
274
+ :file => this_dir + "/jena_persistence")
275
+
276
+ result = Query.new.distinct(:o).where(@eyal, :p, :o).execute
277
+ assert_equal 2, result.flatten.size
278
+
279
+ adapter2.close
280
+ FileUtils.rm_rf(this_dir + "/jena_persistence")
281
+ end
282
+
283
+ def test_keyword_search
284
+ @adapter.close
285
+
286
+ this_dir = File.dirname(File.expand_path(__FILE__))
287
+ keyword_adapter = ConnectionPool.add_data_source(:type => :jena, :model => "superfunky", :lucene => true)
288
+
289
+ keyword_adapter.load("file://" + this_dir + "/test_data.nt", :format => :ntriples, :into => :default_model )
290
+
291
+ eyal = RDFS::Resource.new('http://activerdf.org/test/eyal')
292
+
293
+ assert keyword_adapter.keyword_search?
294
+
295
+ assert_equal eyal, Query.new.distinct(:s).where(:s,:keyword,"blue").execute(:flatten => true)
296
+ assert_equal eyal, Query.new.distinct(:s).where(:s,:keyword,"27").execute(:flatten => true)
297
+ assert_equal eyal, Query.new.distinct(:s).where(:s,:keyword,"eyal oren").execute(:flatten => true)
298
+
299
+ keyword_adapter.close
300
+ end
301
+
302
+ def test_derby_embedded_persistence
303
+ @adapter.close
304
+ this_dir = File.dirname(File.expand_path(__FILE__))
305
+
306
+ derby1 = ConnectionPool.add_data_source(:type => :jena, :model => "superfunky",
307
+ :database => {:url => "jdbc:derby:#{this_dir}/superfunky;create=true", :type => "Derby", :username => "", :password => ""})
308
+
309
+ derby1.add(@eyal, @age, @ageval)
310
+ derby1.add(@eyal, @mbox, @mboxval)
311
+
312
+ result = Query.new.distinct(:o).where(@eyal, :p, :o).execute
313
+ assert_equal 2, result.flatten.size
314
+
315
+ derby1.close
316
+ ConnectionPool.clear
317
+
318
+ derby2 = ConnectionPool.add_data_source(:type => :jena, :model => "superfunky", :id => "2",
319
+ :database => {:url => "jdbc:derby:#{this_dir}/superfunky;create=true", :type => "Derby", :username => "", :password => ""})
320
+
321
+ result = Query.new.distinct(:o).where(@eyal, :p, :o).execute
322
+ assert_equal 2, result.flatten.size
323
+
324
+ derby2.close
325
+
326
+ begin
327
+ java.sql.DriverManager.getConnection("jdbc:derby:;shutdown=true")
328
+ rescue java.sql.SQLException
329
+ # expected
330
+ end
331
+ FileUtils.rm_rf(this_dir + "/superfunky")
332
+ end
333
+
334
+ def test_querying_bnodes
335
+ this_dir = File.dirname(File.expand_path(__FILE__))
336
+ @adapter.load("file://" + this_dir + "/fun_with_bnodes.nt", :format => :ntriples, :into => :default_model)
337
+
338
+ res1 = Array(Query.new.select(:s).where(:s, RDFS::Resource.new("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), RDFS::Resource.new("http://xmlns.com/foaf/0.1/Person")).execute)
339
+ assert_equal 1, res1.size
340
+ bn1 = res1.first
341
+
342
+ res2 = Array(Query.new.select(:s).where(:s, :p, RDFS::Resource.new("http://wordpress.org")).execute)
343
+ assert_equal 1, res2.size
344
+ bn2 = res2.first
345
+
346
+ assert_equal bn1, bn2
347
+
348
+ res3 = Array(Query.new.select(:o).where(bn1, :p, :o).execute)
349
+ assert_equal 2, res3.size
350
+
351
+ res4 = Array(Query.new.select(:p).where(bn1, :p, RDFS::Resource.new("http://wordpress.org") ).execute)
352
+ assert_equal 1, res4.size
353
+
354
+ end
355
+
356
+
357
+ # TODO: NOT TESTED until now, run this against a local mysql installation to confirm it
358
+ def test_mysql_persistence
359
+ # @adapter.close
360
+ #
361
+ # mysql1 = ConnectionPool.add_data_source(:type => :jena, :model => "superfunky", :id => "1",
362
+ # :database => {:url => "jdbc:postgresql://MyDbComputerNameOrIP/myDatabaseName;create=true", :type => "MySQL", :username => "theUser", :password => "thepassword"})
363
+ #
364
+ # mysql1.add(@eyal, @age, @ageval)
365
+ # mysql1.add(@eyal, @mbox, @mboxval)
366
+ #
367
+ # result = Query.new.distinct(:o).where(@eyal, :p, :o).execute
368
+ # assert_equal 2, result.flatten.size
369
+ #
370
+ # mysql1.close
371
+ # ConnectionPool.clear
372
+ #
373
+ # mysql2 = ConnectionPool.add_data_source(:type => :jena, :model => "superfunky", :id => "2",
374
+ # :database => {:url => "jdbc:mysql://MyDbComputerNameOrIP/myDatabaseName;create=true", :type => "MySQL", :username => "theUser", :password => "thepassword"})
375
+ #
376
+ # result = Query.new.distinct(:o).where(@eyal, :p, :o).execute
377
+ # assert_equal 2, result.flatten.size
378
+ #
379
+ # mysql2.close
380
+ # this_dir = File.dirname(File.expand_path(__FILE__))
381
+ # #FileUtils.remove_dir(this_dir + "/superfunky")
382
+ end
383
+
384
+ # TODO: NOT TESTED until now, run this against a local postgres installation to confirm it
385
+ def test_postgres_embedded_persistence
386
+ # @adapter.close
387
+ #
388
+ # postgres1 = ConnectionPool.add_data_source(:type => :jena, :model => "superfunky", :id => "1",
389
+ # :database => {:url => "jdbc:postgresql://MyDbComputerNameOrIP/myDatabaseName;create=true", :type => "PostgreSQL", :username => "theUser", :password => "thepassword"})
390
+ #
391
+ # postgres1.add(@eyal, @age, @ageval)
392
+ # postgres1.add(@eyal, @mbox, @mboxval)
393
+ #
394
+ # result = Query.new.distinct(:o).where(@eyal, :p, :o).execute
395
+ # assert_equal 2, result.flatten.size
396
+ #
397
+ # postgres1.close
398
+ # ConnectionPool.clear
399
+ #
400
+ # postgres2 = ConnectionPool.add_data_source(:type => :jena, :model => "superfunky", :id => "2",
401
+ # :database => {:url => "jdbc:postgresql://MyDbComputerNameOrIP/myDatabaseName;create=true", :type => "PostgreSQL", :username => "theUser", :password => "thepassword"})
402
+ #
403
+ # result = Query.new.distinct(:o).where(@eyal, :p, :o).execute
404
+ # assert_equal 2, result.flatten.size
405
+ #
406
+ # postgres2.close
407
+ # this_dir = File.dirname(File.expand_path(__FILE__))
408
+ # #FileUtils.remove_dir(this_dir + "/superfunky")
409
+ end
410
+
411
+
412
+
413
+
414
+
415
+ def test_contexts
416
+ # TODO
417
+ end
418
+
419
+ # TODO: querying pellet does not work right now
420
+ def test_search_with_pellet
421
+ @adapter.close
422
+
423
+ this_dir = File.dirname(File.expand_path(__FILE__))
424
+ adapter = ConnectionPool.add_data_source(:type => :jena, :model => "superfunky", :lucene => true,
425
+ :reasoner => :pellet, :ontology => :owl)
426
+
427
+ adapter.load("file://" + this_dir + "/test_data.nt", :format => :ntriples, :into => :default_model )
428
+
429
+ eyal = RDFS::Resource.new('http://activerdf.org/test/eyal')
430
+
431
+ # Keyword with pellet does not work.
432
+ # assert adapter.keyword_search?
433
+ # assert_equal eyal, Query.new.distinct(:s).where(:s,:keyword,"blue").execute(:flatten => true)
434
+ # assert_equal eyal, Query.new.distinct(:s).where(:s,:keyword,"27").execute(:flatten => true)
435
+ # assert_equal eyal, Query.new.distinct(:s).where(:s,:keyword,"eyal oren").execute(:flatten => true)
436
+
437
+ adapter.close
438
+ end
439
+
440
+
441
+ # TODO: need a better understanding of rdfs reasoning in Jena before I can write a test for it
442
+ # def test_rdfs_reasoning
443
+ # adapter_rdfs = ConnectionPool.add_data_source(:type => :jena, :ontology => :rdfs, :reasoner => :rdfs)
444
+ #
445
+ # adapter_rdfs.add(@eyal, @age, @test)
446
+ # result = Query.new.distinct(:o).where(@eyal, :p, :o).execute
447
+ # assert_equal 2, result.flatten.size
448
+ # adapter_rdfs.close
449
+ # end
450
+
451
+ end