Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

replace master branch content with README file

Change-Id: I6040d1a2c613cc9ff0229308647116f8d8307d22
  • Loading branch information...
commit c4e37ab00a2cb321675c04e7ea0123a811db3d9f 1 parent 3acf25a
@dklayer dklayer authored
Showing with 2 additions and 27,691 deletions.
  1. +0 −23 .classpath
  2. +0 −11 .gitignore
  3. +0 −17 .project
  4. +0 −3  .settings/org.eclipse.core.resources.prefs
  5. +0 −228 LICENSE
  6. +2 −0  README
  7. +0 −204 build.xml
  8. +0 −12 clojure/.classpath
  9. +0 −24 clojure/.project
  10. +0 −21 clojure/README.markdown
  11. +0 −17 clojure/agclj.sh
  12. +0 −26 clojure/agenv.sh
  13. +0 −103 clojure/build.xml
  14. BIN  clojure/lib/clojure-1.0.jar
  15. BIN  clojure/lib/clojure-contrib-1.0.jar
  16. +0 −7 clojure/license.txt
  17. +0 −166 clojure/src/com/franz/agraph.clj
  18. +0 −297 clojure/src/com/franz/openrdf.clj
  19. +0 −79 clojure/src/com/franz/util.clj
  20. +0 −233 clojure/test/com/franz/agraph/agtest.clj
  21. +0 −52 clojure/test/com/franz/agraph/stress_conn.clj
  22. +0 −73 clojure/test/com/franz/agraph/test_tutorial.clj
  23. +0 −149 clojure/test/com/franz/agraph/tutorial.clj.out
  24. +0 −1,226 clojure/test/com/franz/agraph/tutorial.java.out
  25. +0 −74 clojure/test/com/franz/agraph3/socket-tutorial.clj
  26. +0 −99 clojure/test/com/franz/agraph3/socket.clj
  27. +0 −61 clojure/test/com/franz/test.clj
  28. +0 −492 clojure/tutorial/com/franz/agraph/tutorial.clj
  29. +0 −8 header.java
  30. +0 −6 javadoc.xml
  31. BIN  lib/commons-httpclient-3.1-src.zip
  32. BIN  lib/commons-logging-1.1.1-sources.jar
  33. BIN  lib/jena-2.6.2/arq-2.8.1.jar
  34. BIN  lib/jena-2.6.2/icu4j-3.4.4.jar
  35. BIN  lib/jena-2.6.2/iri-0.7.jar
  36. BIN  lib/jena-2.6.2/jena-2.6.2-tests.jar
  37. BIN  lib/jena-2.6.2/jena-2.6.2.jar
  38. BIN  lib/jena-2.6.2/lucene-core-2.3.1.jar
  39. BIN  lib/jena-2.6.2/slf4j-api-1.5.6.jar
  40. BIN  lib/jena-2.6.2/stax-api-1.0.1.jar
  41. BIN  lib/jena-2.6.2/wstx-asl-3.2.9.jar
  42. BIN  lib/jena-2.6.2/xercesImpl-2.7.1.jar
  43. BIN  lib/json.jar
  44. BIN  lib/junit-4.8.1-src.jar
  45. BIN  lib/junit-4.8.1.jar
  46. BIN  lib/sesame-2.3.1/commons-codec-1.3.jar
  47. BIN  lib/sesame-2.3.1/commons-httpclient-3.1.jar
  48. BIN  lib/sesame-2.3.1/commons-logging-1.1.1.jar
  49. BIN  lib/sesame-2.3.1/openrdf-sesame-2.3.1-onejar.jar
  50. BIN  lib/sesame-2.3.1/slf4j-api-1.5.8.jar
  51. BIN  lib/sesame-2.3.1/slf4j-nop-1.5.8.jar
  52. BIN  lib/slf4j-api-1.5.8-sources.jar
  53. BIN  lib/slf4j-nop-1.5.8-sources.jar
  54. BIN  lib/slf4j-simple-1.5.8-sources.jar
  55. BIN  lib/slf4j-simple-1.5.8.jar
  56. +0 −79 makefile
  57. +0 −68 src/com/franz/agraph/http/AGErrorInfo.java
  58. +0 −80 src/com/franz/agraph/http/AGErrorType.java
  59. +0 −363 src/com/franz/agraph/http/AGHTTPClient.java
  60. +0 −29 src/com/franz/agraph/http/AGHttpException.java
  61. +0 −1,202 src/com/franz/agraph/http/AGHttpRepoClient.java
  62. +0 −561 src/com/franz/agraph/http/AGProtocol.java
  63. +0 −229 src/com/franz/agraph/http/AGResponseHandler.java
  64. +0 −80 src/com/franz/agraph/jena/AGBulkUpdateHandler.java
  65. +0 −24 src/com/franz/agraph/jena/AGCapabilities.java
  66. +0 −220 src/com/franz/agraph/jena/AGGraph.java
  67. +0 −147 src/com/franz/agraph/jena/AGGraphMaker.java
  68. +0 −101 src/com/franz/agraph/jena/AGInfGraph.java
  69. +0 −88 src/com/franz/agraph/jena/AGInfModel.java
  70. +0 −74 src/com/franz/agraph/jena/AGModel.java
  71. +0 −61 src/com/franz/agraph/jena/AGNodeFactory.java
  72. +0 −216 src/com/franz/agraph/jena/AGPrefixMapping.java
  73. +0 −42 src/com/franz/agraph/jena/AGQuery.java
  74. +0 −144 src/com/franz/agraph/jena/AGQueryExecution.java
  75. +0 −23 src/com/franz/agraph/jena/AGQueryExecutionFactory.java
  76. +0 −31 src/com/franz/agraph/jena/AGQueryFactory.java
  77. +0 −70 src/com/franz/agraph/jena/AGQuerySolution.java
  78. +0 −77 src/com/franz/agraph/jena/AGReasoner.java
  79. +0 −92 src/com/franz/agraph/jena/AGResultSet.java
  80. +0 −82 src/com/franz/agraph/jena/AGTransactionHandler.java
  81. +0 −77 src/com/franz/agraph/jena/AGTripleIterator.java
  82. +0 −19 src/com/franz/agraph/jena/AGUnsupportedOperation.java
  83. +0 −12 src/com/franz/agraph/repository/AGAbstractRepository.java
  84. +0 −60 src/com/franz/agraph/repository/AGBooleanQuery.java
  85. +0 −221 src/com/franz/agraph/repository/AGCatalog.java
  86. +0 −84 src/com/franz/agraph/repository/AGGraphQuery.java
  87. +0 −155 src/com/franz/agraph/repository/AGQuery.java
  88. +0 −28 src/com/franz/agraph/repository/AGQueryLanguage.java
  89. +0 −164 src/com/franz/agraph/repository/AGRepository.java
  90. +0 −772 src/com/franz/agraph/repository/AGRepositoryConnection.java
  91. +0 −120 src/com/franz/agraph/repository/AGServer.java
  92. +0 −80 src/com/franz/agraph/repository/AGTupleQuery.java
  93. +0 −146 src/com/franz/agraph/repository/AGValueFactory.java
  94. +0 −91 src/com/franz/agraph/repository/AGVirtualRepository.java
  95. +0 −22 src/com/franz/util/Closeable.java
  96. +0 −53 src/com/franz/util/Util.java
  97. +0 −290 src/test/AGAbstractTest.java
  98. +0 −98 src/test/AGGraphMakerTest.java
  99. +0 −171 src/test/AGGraphTest.java
  100. +0 −212 src/test/AGLubmProlog.java
  101. +0 −239 src/test/AGLubmSparql.java
  102. +0 −130 src/test/AGModelTest.java
  103. +0 −198 src/test/AGMoreJenaExamples.java
  104. +0 −118 src/test/AGPrefixMappingTest.java
  105. +0 −486 src/test/AGRepositoryConnectionTest.java
  106. +0 −44 src/test/AGRepositoryConnectionTests.java
  107. +0 −117 src/test/AGResultSetTest.java
  108. +0 −53 src/test/AGUpload.java
  109. +0 −116 src/test/QuickTests.java
  110. +0 −1,566 src/test/RepositoryConnectionTest.java
  111. +0 −215 src/test/Stmt.java
  112. +0 −156 src/test/TestRunner.java
  113. +0 −80 src/test/TestSuites.java
  114. +0 −1,164 src/test/TutorialTests.java
  115. +0 −116 src/test/Util.java
  116. +0 −4 src/test/default-graph.nt
  117. BIN  src/test/default-graph.ttl.gz
  118. +0 −2  src/test/graph1.nt
  119. +0 −2  src/test/graph2.nt
  120. BIN  src/test/graphs.zip
  121. +0 −956 src/test/stress/Events.java
  122. +0 −147 src/test/stress/TransactionStressTest.java
  123. +0 −11 src/test/stress/monitor.sh
  124. +0 −16 src/test/tutorial-test8-expected.nt
  125. +0 −45 src/test/tutorial-test8-expected.rdf
  126. +0 −509 src/test/tutorial-test9-expected.rdf
  127. +0 −745 src/tutorial/JenaTutorialExamples.java
  128. +0 −2,813 src/tutorial/TutorialExamples.java
  129. BIN  src/tutorial/allLinksValjean.jpg
  130. BIN  src/tutorial/allegrographdiagramJava.jpg
  131. BIN  src/tutorial/allegrographdiagramJena.jpg
  132. BIN  src/tutorial/catalogrepositorycontext.jpg
  133. BIN  src/tutorial/createconnectionobject.jpg
  134. BIN  src/tutorial/createconnectionobjectJena.jpg
  135. BIN  src/tutorial/environmentvariable.jpg
  136. +0 −45 src/tutorial/football.nt
  137. BIN  src/tutorial/geoBox1.jpg
  138. BIN  src/tutorial/geoBox2.jpg
  139. BIN  src/tutorial/geoCircle1.jpg
  140. BIN  src/tutorial/geoCircle2.jpg
  141. BIN  src/tutorial/geoPolygon1.jpg
  142. BIN  src/tutorial/geoPolygon2.jpg
  143. BIN  src/tutorial/geoWorld.jpg
  144. BIN  src/tutorial/gepCartesian.jpg
  145. BIN  src/tutorial/graphDensity.jpg
  146. BIN  src/tutorial/inferenceRevFuncProp.jpg
  147. BIN  src/tutorial/inferenceSaveAs.jpg
  148. BIN  src/tutorial/inferenceSetup.jpg
  149. +0 −22 src/tutorial/java-blankNodes1.rdf
  150. +0 −26 src/tutorial/java-blankNodes2.rdf
  151. +0 −22 src/tutorial/java-blankNodes3.rdf
  152. +0 −18 src/tutorial/java-blankNodes4.rdf
  153. +0 −1,214 src/tutorial/java-kennedy.ntriples
  154. +0 −1,599 src/tutorial/java-lesmis.rdf
  155. +0 −113 src/tutorial/java-rules.txt
  156. +0 −2,002 src/tutorial/java-tutorial-40.html
  157. +0 −39 src/tutorial/java-vcards.rdf
  158. +0 −1,169 src/tutorial/jena-tutorial-40.html
  159. BIN  src/tutorial/lesmismap.jpg
  160. BIN  src/tutorial/pathsValBos.jpg
  161. BIN  src/tutorial/snaEgoGroup.jpg
  162. BIN  src/tutorial/valjeanActorBetweenCentrality.jpg
  163. BIN  src/tutorial/valjeanActorCentrality.jpg
  164. BIN  src/tutorial/valjeanActorClosenessCentrality.jpg
  165. BIN  src/tutorial/valjeanBigClique.jpg
  166. BIN  src/tutorial/valjeanSmallCliques.jpg
  167. BIN  src/tutorial/webviewAccessRule.jpg
  168. BIN  src/tutorial/webviewNewUser.jpg
  169. BIN  src/tutorial/webviewUser1.jpg
  170. +0 −24 templates/.classpath
  171. +0 −17 templates/.project
  172. +0 −183 testing/regression/testModelEquals/1-1.rdf
  173. +0 −183 testing/regression/testModelEquals/1-2.rdf
  174. +0 −9 testing/regression/testModelEquals/2-1.rdf
  175. +0 −9 testing/regression/testModelEquals/2-2.rdf
  176. +0 −13 testing/regression/testModelEquals/3-1.rdf
  177. +0 −13 testing/regression/testModelEquals/3-2.rdf
  178. +0 −26 testing/regression/testModelEquals/4-1.rdf
  179. +0 −26 testing/regression/testModelEquals/4-2.rdf
  180. +0 −14 testing/regression/testModelEquals/5-1.rdf
  181. +0 −14 testing/regression/testModelEquals/5-2.rdf
  182. +0 −27 testing/regression/testModelEquals/6-1.rdf
  183. +0 −27 testing/regression/testModelEquals/6-2.rdf
  184. +0 −5 testing/regression/testModelEquals/7-1.nt
  185. +0 −5 testing/regression/testModelEquals/7-2.nt
  186. +0 −5 testing/regression/testModelEquals/8-1.nt
  187. +0 −5 testing/regression/testModelEquals/8-2.nt
View
23 .classpath
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="lib" path="lib/junit-4.8.1.jar" sourcepath="lib/junit-4.8.1-src.jar"/>
- <classpathentry kind="lib" path="lib/sesame-2.3.1/commons-codec-1.3.jar"/>
- <classpathentry kind="lib" path="lib/sesame-2.3.1/commons-httpclient-3.1.jar"/>
- <classpathentry kind="lib" path="lib/sesame-2.3.1/commons-logging-1.1.1.jar"/>
- <classpathentry kind="lib" path="lib/sesame-2.3.1/openrdf-sesame-2.3.1-onejar.jar"/>
- <classpathentry kind="lib" path="lib/sesame-2.3.1/slf4j-api-1.5.8.jar"/>
- <classpathentry kind="lib" path="lib/sesame-2.3.1/slf4j-nop-1.5.8.jar"/>
- <classpathentry kind="lib" path="lib/jena-2.6.2/arq-2.8.1.jar"/>
- <classpathentry kind="lib" path="lib/jena-2.6.2/icu4j-3.4.4.jar"/>
- <classpathentry kind="lib" path="lib/jena-2.6.2/iri-0.7.jar"/>
- <classpathentry kind="lib" path="lib/jena-2.6.2/jena-2.6.2-tests.jar"/>
- <classpathentry kind="lib" path="lib/jena-2.6.2/jena-2.6.2.jar"/>
- <classpathentry kind="lib" path="lib/jena-2.6.2/lucene-core-2.3.1.jar"/>
- <classpathentry kind="lib" path="lib/jena-2.6.2/stax-api-1.0.1.jar"/>
- <classpathentry kind="lib" path="lib/jena-2.6.2/wstx-asl-3.2.9.jar"/>
- <classpathentry kind="lib" path="lib/jena-2.6.2/xercesImpl-2.7.1.jar"/>
- <classpathentry kind="lib" path="lib/json.jar"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
View
11 .gitignore
@@ -1,11 +0,0 @@
-bin
-.*sw*
-*.class
-classes
-agraph.jar
-agraph*.tar.gz
-DIST
-agraph-clj.jar
-/build.out
-javadoc
-temp.*
View
17 .project
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>agraph-java-client</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
View
3  .settings/org.eclipse.core.resources.prefs
@@ -1,3 +0,0 @@
-#Thu Nov 19 14:28:34 PST 2009
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
View
228 LICENSE
@@ -1,228 +0,0 @@
-Eclipse Public License - v 1.0
-
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
-THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-1. DEFINITIONS
-
-"Contribution" means:
-
-a) in the case of the initial Contributor, the initial code and
-documentation distributed under this Agreement, and
-
-b) in the case of each subsequent Contributor:
-
-i) changes to the Program, and
-
-ii) additions to the Program;
-
-where such changes and/or additions to the Program originate from and
-are distributed by that particular Contributor. A Contribution
-'originates' from a Contributor if it was added to the Program by such
-Contributor itself or anyone acting on such Contributor's
-behalf. Contributions do not include additions to the Program which:
-(i) are separate modules of software distributed in conjunction with
-the Program under their own license agreement, and (ii) are not
-derivative works of the Program.
-
-"Contributor" means any person or entity that distributes the Program.
-
-"Licensed Patents" mean patent claims licensable by a Contributor
-which are necessarily infringed by the use or sale of its Contribution
-alone or when combined with the Program.
-
-"Program" means the Contributions distributed in accordance with this
-Agreement.
-
-"Recipient" means anyone who receives the Program under this
-Agreement, including all Contributors.
-
-2. GRANT OF RIGHTS
-
-a) Subject to the terms of this Agreement, each Contributor hereby
-grants Recipient a non-exclusive, worldwide, royalty-free copyright
-license to reproduce, prepare derivative works of, publicly display,
-publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and
-object code form.
-
-b) Subject to the terms of this Agreement, each Contributor hereby
-grants Recipient a non-exclusive, worldwide, royalty-free patent
-license under Licensed Patents to make, use, sell, offer to sell,
-import and otherwise transfer the Contribution of such Contributor, if
-any, in source code and object code form. This patent license shall
-apply to the combination of the Contribution and the Program if, at
-the time the Contribution is added by the Contributor, such addition
-of the Contribution causes such combination to be covered by the
-Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.
-
-c) Recipient understands that although each Contributor grants the
-licenses to its Contributions set forth herein, no assurances are
-provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow
-Recipient to distribute the Program, it is Recipient's responsibility
-to acquire that license before distributing the Program.
-
-d) Each Contributor represents that to its knowledge it has sufficient
-copyright rights in its Contribution, if any, to grant the copyright
-license set forth in this Agreement.
-
-3. REQUIREMENTS
-
-A Contributor may choose to distribute the Program in object code form
-under its own license agreement, provided that:
-
-a) it complies with the terms and conditions of this Agreement; and
-
-b) its license agreement:
-
-i) effectively disclaims on behalf of all Contributors all warranties
-and conditions, express and implied, including warranties or
-conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;
-
-ii) effectively excludes on behalf of all Contributors all liability
-for damages, including direct, indirect, special, incidental and
-consequential damages, such as lost profits;
-
-iii) states that any provisions which differ from this Agreement are
-offered by that Contributor alone and not by any other party; and
-
-iv) states that source code for the Program is available from such
-Contributor, and informs licensees how to obtain it in a reasonable
-manner on or through a medium customarily used for software exchange.
-
-When the Program is made available in source code form:
-
-a) it must be made available under this Agreement; and
-
-b) a copy of this Agreement must be included with each copy of the
-Program.
-
-Contributors may not remove or alter any copyright notices contained
-within the Program.
-
-Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.
-
-4. COMMERCIAL DISTRIBUTION
-
-Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a
-commercial product offering should do so in a manner which does not
-create potential liability for other Contributors. Therefore, if a
-Contributor includes the Program in a commercial product offering,
-such Contributor ("Commercial Contributor") hereby agrees to defend
-and indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses") arising
-from claims, lawsuits and other legal actions brought by a third party
-against the Indemnified Contributor to the extent caused by the acts
-or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property
-infringement. In order to qualify, an Indemnified Contributor must: a)
-promptly notify the Commercial Contributor in writing of such claim,
-and b) allow the Commercial Contributor to control, and cooperate with
-the Commercial Contributor in, the defense and any related settlement
-negotiations. The Indemnified Contributor may participate in any such
-claim at its own expense.
-
-For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.
-
-5. NO WARRANTY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY
-WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable
-laws, damage to or loss of data, programs or equipment, and
-unavailability or interruption of operations.
-
-6. DISCLAIMER OF LIABILITY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
-ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-7. GENERAL
-
-If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further
-action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.
-
-If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-the Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of
-the date such litigation is filed.
-
-All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of
-time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use
-and distribution of the Program as soon as reasonably
-practicable. However, Recipient's obligations under this Agreement and
-any licenses granted by Recipient relating to the Program shall
-continue and survive.
-
-Everyone is permitted to copy and distribute copies of this Agreement,
-but in order to avoid inconsistency the Agreement is copyrighted and
-may only be modified in the following manner. The Agreement Steward
-reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement
-Steward has the right to modify this Agreement. The Eclipse Foundation
-is the initial Agreement Steward. The Eclipse Foundation may assign
-the responsibility to serve as the Agreement Steward to a suitable
-separate entity. Each new version of the Agreement will be given a
-distinguishing version number. The Program (including Contributions)
-may always be distributed subject to the version of the Agreement
-under which it was received. In addition, after a new version of the
-Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives
-no rights or licenses to the intellectual property of any Contributor
-under this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.
-
-This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No
-party to this Agreement will bring a legal action under this Agreement
-more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.
View
2  README
@@ -0,0 +1,2 @@
+The master branch for this repo is not used. Please
+see the branches named by releases of AllegroGraph.
View
204 build.xml
@@ -1,204 +0,0 @@
-<project name="agraph-java-client" default="clean-build">
-
- <property environment="env"/>
- <!-- if these AGRAPH env vars are blank, the java test code will look elsewhere -->
- <property name="env.AGRAPH_HOST" value=""/>
- <property name="env.AGRAPH_PORT" value=""/>
- <property name="env.root" value=""/>
- <property name="env.version" value=""/>
-
- <!-- Library. -->
- <property name="src" location="src"/>
- <property name="lib" location="lib"/>
- <property name="build" location="classes"/>
- <property name="jarfile" location="agraph.jar"/>
-
- <path id="classpath">
- <path location="${lib}/json.jar"/>
- <path location="${lib}/junit-4.8.1.jar"/>
- <path location="${lib}/sesame-2.3.1/commons-codec-1.3.jar"/>
- <path location="${lib}/sesame-2.3.1/commons-httpclient-3.1.jar"/>
- <path location="${lib}/sesame-2.3.1/commons-logging-1.1.1.jar"/>
- <path location="${lib}/sesame-2.3.1/openrdf-sesame-2.3.1-onejar.jar"/>
- <path location="${lib}/sesame-2.3.1/slf4j-api-1.5.8.jar"/>
- <path location="${lib}/sesame-2.3.1/slf4j-nop-1.5.8.jar"/>
- <path location="${lib}/jena-2.6.2/arq-2.8.1.jar"/>
- <path location="${lib}/jena-2.6.2/icu4j-3.4.4.jar"/>
- <path location="${lib}/jena-2.6.2/iri-0.7.jar"/>
- <path location="${lib}/jena-2.6.2/jena-2.6.2-tests.jar"/>
- <path location="${lib}/jena-2.6.2/jena-2.6.2.jar"/>
- <path location="${lib}/jena-2.6.2/log4j-1.2.13.jar"/>
- <path location="${lib}/jena-2.6.2/lucene-core-2.3.1.jar"/>
- <path location="${lib}/jena-2.6.2/stax-api-1.0.1.jar"/>
- <path location="${lib}/jena-2.6.2/wstx-asl-3.2.9.jar"/>
- <path location="${lib}/jena-2.6.2/xercesImpl-2.7.1.jar"/>
- </path>
-
- <target name="init">
- <tstamp/>
- <mkdir dir="${build}"/>
- </target>
-
- <target name="clean"
- description="Remove generated files and directories.">
- <delete dir="${build}"/>
- <delete file="${jarfile}"/>
- <ant dir="clojure" target="clean" inheritall="false"/>
- </target>
-
- <target name="compile" depends="init"
- description="Compile Java sources.">
- <javac srcdir="${src}" destdir="${build}" encoding="utf8"
- debug="true"
- includes="**/*.java"
- classpathref="classpath"/>
- </target>
-
- <manifestclasspath property="mf.path" jarfile="${jarfile}">
- <classpath refid="classpath"/>
- </manifestclasspath>
-
- <target name="build"
- description="Create jar file."
- depends="clean, compile">
- <tstamp prefix="jar">
- <format property="datestamp" pattern="yyyy-MM-dd H:mm"/>
- </tstamp>
- <jar jarfile="${jarfile}">
- <fileset dir="${build}" includes="**/*.class">
- <exclude name="tutorial/**"/>
- <exclude name="test/**"/>
- <exclude name="*.class"/>
- </fileset>
- <manifest>
- <attribute name="Implementation-Title" value="AllegroGraph Java Client"/>
- <attribute name="Implementation-Version" value="${env.version}"/>
- <attribute name="Implementation-Vendor" value="Franz, Inc."/>
- <attribute name="Implementation-URL" value="http://www.franz.com/agraph/"/>
- <attribute name="Built-At" value="${jar.datestamp}"/>
- <attribute name="Class-Path" value="${mf.path}"/>
- </manifest>
- </jar>
- </target>
-
- <target name="clean-build" depends="clean, build"
- description="clean, and build jar">
- </target>
-
- <target name="prepush"
- description="Tests required before git push: clean, build, and run Java and Clojure client tests"
- depends="clean-build, test-prepush">
- <ant dir="clojure" target="prepush" inheritall="false"/>
- </target>
-
- <macrodef name="run-java"
- description="Run java class">
- <attribute name="tasknamex" default="java"/>
- <attribute name="classname"/>
- <attribute name="arg"/>
- <attribute name="maxmemory" default="128m"/>
- <sequential>
- <property name="log" value="info"/>
- <java classname="@{classname}" failonerror="true" taskname="@{tasknamex}"
- fork="true" maxmemory="@{maxmemory}">
- <sysproperty key="org.apache.commons.logging.Log"
- value="org.apache.commons.logging.impl.SimpleLog"/>
- <sysproperty key="org.apache.commons.logging.simplelog.defaultlog"
- value="${log}"/>
- <sysproperty key="org.apache.commons.logging.simplelog.log.org"
- value="info"/>
- <sysproperty key="org.apache.commons.logging.simplelog.log.httpclient"
- value="info"/>
- <sysproperty key="org.apache.commons.logging.simplelog.showlogname"
- value="true"/>
- <sysproperty key="AGRAPH_HOST" value="${env.AGRAPH_HOST}"/>
- <sysproperty key="AGRAPH_PORT" value="${env.AGRAPH_PORT}"/>
- <sysproperty key="AGRAPH_ROOT" value="${env.root}"/>
- <classpath>
- <path refid="classpath"/>
- <path location="classes"/>
- </classpath>
- <arg value="@{arg}"/>
- </java>
- </sequential>
- </macrodef>
-
- <target name="test-junit"
- depends="compile"
- description="Run unit tests (use -Dcat=Prepush, Broken, or Stress)
-(or use -Dtest=test.stress.TransactionStressTest)">
- <property name="cat" value="Prepush"/>
- <property name="prefix" value="test.TestSuites$"/>
- <property name="test" value="${prefix}${cat}"/>
- <property name="log" value="warn"/>
- <junit printsummary="no" haltonfailure="yes">
- <sysproperty key="org.apache.commons.logging.Log"
- value="org.apache.commons.logging.impl.SimpleLog"/>
- <sysproperty key="org.apache.commons.logging.simplelog.defaultlog"
- value="${log}"/>
- <sysproperty key="org.apache.commons.logging.simplelog.log.org"
- value="warn"/>
- <sysproperty key="org.apache.commons.logging.simplelog.log.httpclient"
- value="warn"/>
- <sysproperty key="org.apache.commons.logging.simplelog.showlogname"
- value="true"/>
- <sysproperty key="AGRAPH_HOST" value="${env.AGRAPH_HOST}"/>
- <sysproperty key="AGRAPH_PORT" value="${env.AGRAPH_PORT}"/>
- <sysproperty key="AGRAPH_ROOT" value="${env.root}"/>
- <classpath>
- <path refid="classpath"/>
- <path location="classes"/>
- </classpath>
- <formatter type="plain" usefile="no"/>
- <test name="${test}"/>
- </junit>
- </target>
-
- <target name="test-prepush"
- depends="compile"
- description="run prepush tests">
- <run-java tasknamex="test" classname="test.TestRunner" arg="test.TestSuites$Prepush"/>
- </target>
-
- <target name="test-broken"
- depends="compile"
- description="run tests known to be broken">
- <run-java tasknamex="test" classname="org.junit.runner.JUnitCore" arg="test.TestSuites$Broken"/>
- </target>
-
- <target name="test-stress"
- depends="compile"
- description="long-running stress tests">
- <run-java tasknamex="test" classname="org.junit.runner.JUnitCore" arg="test.TestSuites$Stress"/>
- </target>
-
- <target name="test-temp"
- depends="compile"
- description="">
- <property name="cat" value="Temp"/>
- <property name="prefix" value="test.TestSuites$"/>
- <property name="test" value="${prefix}${cat}"/>
- <run-java tasknamex="test" classname="test.TestRunner" arg="${test}"/>
- </target>
-
- <target name="test-stress-events"
- depends="compile"
- description="Run test.stress.Events">
- <run-java tasknamex="ev" classname="test.stress.Events" arg="" maxmemory="512m"/>
- </target>
-
- <target name="tutorial"
- depends="compile"
- description="Run tutorial example. Use -Dexample=5 for a specific example, default is all">
- <property name="example" value="all"/>
- <run-java tasknamex="tutorial" classname="tutorial.TutorialExamples" arg="${example}"/>
- </target>
-
- <target name="jena-tutorial"
- depends="compile"
- description="Run jena examples. Use -Dexample=5 for a specific example, default is all">
- <property name="example" value="all"/>
- <run-java tasknamex="jena-tutorial" classname="tutorial.JenaTutorialExamples" arg="${example}"/>
- </target>
-
-</project>
View
12 clojure/.classpath
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="test"/>
- <classpathentry kind="src" path="tutorial"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="lib" path="classes"/>
- <classpathentry kind="lib" path="lib/clojure-1.0.jar"/>
- <classpathentry kind="lib" path="lib/clojure-contrib-1.0.jar"/>
- <classpathentry combineaccessrules="false" kind="src" path="/agraph-java"/>
- <classpathentry kind="output" path="classes"/>
-</classpath>
View
24 clojure/.project
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>agraph-clojure</name>
- <comment></comment>
- <projects>
- <project>agraph-java</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>ccw.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>ccw.nature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
View
21 clojure/README.markdown
@@ -1,21 +0,0 @@
-[agraph-clojure](http://github.com/franzinc) is a
-[Clojure](http://clojure.org) client library for [Franz AllegroGraph](http://www.franz.com/agraph/).
-
-Prerequisites:
-* [Download AllegroGraph](http://www.franz.com/agraph/downloads/).
-* Install.
-* Run the updater to get the latest patches.
-
-This Clojure API is based on the Python API:
-
-* http://www.franz.com/agraph/support/documentation/current/python-tutorial.html
-* http://github.com/franzinc/agraph-python/tree/master
-
-[AllegroGraph Docs] (http://www.franz.com/agraph/support/documentation/current/)
-
-Sesame API on http://www.openrdf.org/
-http://www.openrdf.org/doc/sesame2/2.2.4/apidocs/
-
-agclj.sh can be used to start a Clojure REPL in Emacs/Slime or in a console. It depends on agraph-java.
-
-See the tutorial in src/com/franz/agraph/tutorial.clj which follows the Java and Python tutorials.
View
17 clojure/agclj.sh
@@ -1,17 +0,0 @@
-#!/bin/bash
-# set -x
-
-source $(readlink -f $(dirname "$0"))/agenv.sh
-
-# the tutorials expect to be in the root dir
-cd $AGRAPH_JAVA
-
-if [ -z "$1" ]; then
- # export CLASSPATH=$CLASSPATH:$CLOJURE_PROJECTS/jline-0.9.94/jline-0.9.94.jar
- # java jline.ConsoleRunner clojure.main
- echo classpath $CLASSPATH
- java -server $AGRAPH_JVM_ARGS clojure.main
-else
- # set -x
- java -server $AGRAPH_JVM_ARGS clojure.main $*
-fi
View
26 clojure/agenv.sh
@@ -1,26 +0,0 @@
-#!/bin/bash
-# set -x
-
-# This script starts a Clojure REPL for command line use, or with Emacs/Slime/Swank-clojure.
-#
-# You may need to customize CLOJURE_PROJECTS and AGRAPH_JAVA below.
-
-export AGRAPH_JAVA=$(readlink -f $(dirname "$0")/..)
-
-export CLOJURE_PROJECTS=$(readlink -f "$AGRAPH_JAVA/../../..")
-
-export AGRAPH_CLOJURE=$AGRAPH_JAVA/clojure
-
-export CLASSPATH=$AGRAPH_CLOJURE/lib/clojure-1.0.jar
-export CLASSPATH=$CLASSPATH:$AGRAPH_CLOJURE/lib/clojure-contrib-1.0.jar
-
-export CLASSPATH=$CLASSPATH:$AGRAPH_JAVA/agraph.jar
-
-# clojure can load src directly, so not using AOT-compilation here
-export CLASSPATH=$CLASSPATH:$AGRAPH_CLOJURE/src
-export CLASSPATH=$CLASSPATH:$AGRAPH_CLOJURE/test
-export CLASSPATH=$CLASSPATH:$AGRAPH_CLOJURE/tutorial
-
-export CLASSPATH=$CLASSPATH:$CLOJURE_PROJECTS/swank-clojure/src
-
-export AGRAPH_JVM_ARGS=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
View
103 clojure/build.xml
@@ -1,103 +0,0 @@
-<project name="clj-agraph" default="clean-build">
-
- <!-- Override these with -Dclojure.jar=... in your Ant invocation. -->
- <property name="clojure.jar" location="lib/clojure-1.0.jar"/>
- <property name="clojure.contrib.jar" location="lib/clojure-contrib-1.0.jar"/>
-
- <available property="hasclojure" file="${clojure.jar}"/>
-
- <!-- Library. -->
- <property name="lib" location="../lib"/> <!-- AG Java client. -->
- <property name="jarfile" location="agraph-clj.jar"/>
-
- <target name="init">
- <tstamp/>
- <mkdir dir="classes"/>
- </target>
-
- <target name="clean" description="Remove generated files and directories.">
- <delete dir="classes"/>
- <delete file="${jarfile}"/>
- </target>
-
- <target name="clean-build" depends="clean, build"
- description="clean, and build jar">
- </target>
-
- <path id="agclj-libs">
- <path location="${lib}/../agraph.jar"/>
- <path location="${clojure.jar}"/>
- <path location="${clojure.contrib.jar}"/>
- </path>
-
- <target name="compile-clojure" depends="init"
- description="Compile Clojure sources."
- if="hasclojure">
- <java classname="clojure.lang.Compile"
- failonerror="true" fork="true" taskname="clj-c">
- <!-- fork because otherwise this fails when called by ../build.xml, classpath problem -->
- <classpath>
- <path refid="agclj-libs"/>
- <path location="src"/>
- <path location="classes"/>
- </classpath>
- <sysproperty key="clojure.compile.warn-on-reflection" value="true"/>
- <sysproperty key="clojure.compile.path" value="classes"/>
- <arg value="com.franz.agraph"/>
- </java>
- </target>
-
- <target name="build" depends="compile-clojure"
- description="Create jar file.">
- <jar jarfile="${jarfile}">
- <!-- <fileset dir="${src}" includes="**/*.clj"/> -->
- <fileset dir="classes" includes="**/*.class"/>
- <manifest>
- <attribute name="Class-Path" value="."/>
- </manifest>
- </jar>
- </target>
-
- <macrodef name="run-clj"
- description="Run clojure expression">
- <attribute name="taskname" default="clj"/>
- <attribute name="expr"/>
- <sequential>
- <java classname="clojure.main" failonerror="true" taskname="@{taskname}"
- fork="true" dir="..">
- <sysproperty key="org.apache.commons.logging.Log"
- value="org.apache.commons.logging.impl.NoOpLog"/>
- <classpath>
- <path refid="agclj-libs"/>
- <path location="src"/>
- <path location="tutorial"/>
- <path location="test"/>
- </classpath>
- <arg value="-e"/>
- <arg value="@{expr}"/>
- </java>
- </sequential>
- </macrodef>
-
- <target name="test"
- description="Run tests">
- <run-clj expr="(use 'com.franz.test) (run-ant 'com.franz.agraph.agtest)"/>
- </target>
-
- <target name="prepush"
- description="Tests required before git push: clean, jar (test not included at this time)"
- depends="clean, build">
- <!-- TODO: add test to depends -->
- </target>
-
- <target name="test-tutorials"
- description="Run Tutorial examples for Java and Clojure, compare to previous known output.">
- <run-clj expr="(use 'com.franz.test) (run-ant 'com.franz.agraph.test-tutorial)"/>
- </target>
-
- <target name="test-stress-conn"
- description="Stress test connections.">
- <run-clj expr="(use 'com.franz.test) (run-ant 'com.franz.agraph.stress-conn)"/>
- </target>
-
-</project>
View
BIN  clojure/lib/clojure-1.0.jar
Binary file not shown
View
BIN  clojure/lib/clojure-contrib-1.0.jar
Binary file not shown
View
7 clojure/license.txt
@@ -1,7 +0,0 @@
-agraph-clojure: Clojure Client API for Franz AllegroGraph
-
-agraph-clojure is licensed under the terms of the Lisp Lesser GNU
-Public License (http://opensource.franz.com/preamble.html), known as
-the LLGPL. The LLGPL consists of a preamble (see above URL) and the
-LGPL. Where these conflict, the preamble takes precedence.
-agraph-clojure is referenced in the preamble as the "LIBRARY."
View
166 clojure/src/com/franz/agraph.clj
@@ -1,166 +0,0 @@
-;; This software is Copyright (c) Franz, 2009.
-;; Franz grants you the rights to distribute
-;; and use this software as governed by the terms
-;; of the Lisp Lesser GNU Public License
-;; (http://opensource.franz.com/preamble.html),
-;; known as the LLGPL.
-
-(ns com.franz.agraph
- "Clojure client API to Franz AllegroGraph 4.0.
- This API wraps the agraph-java-client API, which is an extension of the Sesame org.openrdf API.
- Communication with the server is through HTTP REST using JSON.
- Uses the Franz Clojure wrapper of Sesame in com/franz/openrdf.clj."
- (:refer-clojure :exclude (name))
- (:import [clojure.lang Named]
- [com.franz.agraph.repository
- AGCatalog AGQueryLanguage AGRepository
- AGRepositoryConnection AGServer AGValueFactory]
- [java.net URI]
- [org.openrdf.model ValueFactory Resource Literal Statement]
- [org.openrdf.repository Repository RepositoryConnection]
- [org.openrdf.model.vocabulary RDF XMLSchema]
- [org.openrdf.query QueryLanguage BindingSet Binding])
- (:use [clojure.contrib def]
- [com.franz util openrdf]))
-
-(alter-meta! *ns* assoc :author "Franz Inc <www.franz.com>, Mike Hinchey <mhinchey@franz.com>")
-
-(defmulti name
- "Shadows clojure.core/name to make it an extensible method."
- type)
-
-(defmethod name :default [x] (.getName x))
-
-;; same as the clojure.core fn name
-(defmethod name clojure.lang.Named [#^clojure.lang.Named x] (clojure.core/name x))
-
-(defmethod name AGRepository [#^AGRepository x] (.getRepositoryID x))
-
-(defmethod name AGCatalog [#^AGCatalog x] (.getCatalogName x))
-
-(defmethod close AGCatalog [#^AGCatalog obj])
-
-;; (defn connect-agraph
-;; "returns a connection to AllegroGraph server, for the HTTP REST API"
-;; {:tag AGServer}
-;; ([host port] (connect host port nil nil))
-;; ([host port username password]
-;; (AGServer. host port)))
-
-(defn catalogs
- "Returns a seq of AGCatalogs objects."
- [#^AGServer server]
- (seq (.listCatalogs server)))
-
-(defn open-catalog
- "Returns an AGCatalog."
- {:tag AGCatalog}
- [#^AGServer server name]
- (.getCatalog server name))
-
-(defn repositories
- "Returns a seq of AGRepository objects."
- [#^AGCatalog catalog]
- (seq (.getAllRepositories catalog)))
-
-;; (def #^{:private true} -access-verbs
-;; {:renew AGRepository/RENEW
-;; :create AllegroRepository/CREATE
-;; :open AllegroRepository/OPEN
-;; :access AllegroRepository/ACCESS})
-;; (def access-verbs (set (keys -access-verbs)))
-
-(def lang-prolog (AGQueryLanguage/PROLOG))
-
-(defn repository
- "access-verb must be a keyword from the set of access-verbs."
- ([#^AGCatalog catalog name access-verb]
- (open (.createRepository catalog #^String name
- ;; TODO: (-access-verbs access-verb)
- )))
- ;; TODO: this may be confusing since it doesn't open a repository,
- ;; only gets a reference.
- ([#^Repository rcon]
- (.getRepository rcon)))
-
-(defn ag-repo-con
- ([#^AGCatalog catalog repo-name]
- (repo-connection (repo-init (repository catalog repo-name nil))))
- ([#^AGCatalog catalog repo-name rcon-args]
- (repo-connection (repo-init (repository catalog repo-name nil)) rcon-args)))
-
-(defn repo-federation
- "rcons: may be of type AGRepository or AGRepositoryConnection"
- [#^AGServer server rcons rcon-args]
- (-> (.federate server
- (into-array AGRepository (map #(cond (instance? AGRepository %) %
- (nil? %) nil
- :else (.getRepository #^AGRepositoryConnection %))
- rcons)))
- open repo-init (repo-connection rcon-args)))
-
-(defn ag-server
- [url username password]
- (AGServer. url username password))
-
-(defn with-agraph-fn
- "catalog, repository, and repository-connection are optional: they are only
- opened if specified in the arguments.
-
- access: a keyword from the set of 'access-verbs.
- my-fn: a function of 4 args [conn cat repos repos-conn]
- catalog and rcon will be closed when this block exits.
- rcon-args: if nil, no rcon will be created. Arguments passed to
- franz.openrdf/repo-connection."
- [[{:keys [host port username password]}
- catalog-name
- {:keys [name access]}
- rcon-args]
- my-fn]
- (with-open2 []
- (let [conn (ag-server (str "http://" host ":" port) username password)]
- (if catalog-name
- (let [cat (open-catalog conn catalog-name)]
- (with-open2 [repo (when name
- (repo-init (repository cat name access)))
- rcon (when rcon-args
- (repo-connection repo rcon-args))]
- (my-fn conn cat repo rcon)))
- (my-fn conn nil nil nil)))))
-
-(defmacro with-agraph
- "catalog, repository, and repository-connection are optional - they are only opened if specified in the args.
-access: a keyword from the set of 'access-verbs.
-catalog and repository-connection will be closed when this block exits.
-rcon-args: optional, args passed to franz.openrdf/repo-connection.
-Example: (with-agraph [conn {:host \"localhost\" :port 8080
- :username name :password pw}
- catalog \"scratch\"
- repo {:name \"agraph_test\" :access :renew}
- rcon {:auto-commit true :namespaces {\"ns-prefix\" \"ns\"}}]
- (println conn))"
- [[conn-sym {host :host port :port username :username password :password :as conn-args}
- cat-sym cat-name
- repo-sym {repos-name :name repos-access :access :as repo-args}
- rcon-sym rcon-args]
- & body]
- `(with-agraph-fn [~conn-args ~cat-name ~repo-args
- ;; rcon-args should be nil if no rcon-sym is wanted
- ~(or rcon-args (when rcon-sym {}))]
- (fn [~conn-sym ~(or cat-sym '_) ~(or repo-sym '_) ~(or rcon-sym '_)]
- ~@body)))
-
-(defn add-from-server!
- ;; Different name from add-from! to make it less ambiguous.
- ;; This is an AllegroGraph extension to the openrdf api.
- "Add statements from a data file on the server.
- See add-from!.
-
- data: a File, InputStream, or URL.
- contexts: 0 or more Resource objects"
- [#^AGRepositoryConnection repos-conn
- data
- #^String baseURI
- #^RDFFormat dataFormat
- & contexts]
- (.add repos-conn data baseURI dataFormat true (resource-array contexts)))
View
297 clojure/src/com/franz/openrdf.clj
@@ -1,297 +0,0 @@
-;; This software is Copyright (c) Franz, 2009.
-;; Franz grants you the rights to distribute
-;; and use this software as governed by the terms
-;; of the Lisp Lesser GNU Public License
-;; (http://opensource.franz.com/preamble.html),
-;; known as the LLGPL.
-
-(ns com.franz.openrdf
- "Clojure wrapper of the Sesame (org.openrdf) Java API. See http://www.openrdf.org/"
- (:refer-clojure :exclude (name))
- (:import [clojure.lang Named]
- [java.net URI]
- [org.openrdf.model ValueFactory Resource Literal Statement]
- [org.openrdf.repository Repository RepositoryConnection RepositoryResult]
- [org.openrdf.model.vocabulary RDF XMLSchema]
- [org.openrdf.model Statement]
- [org.openrdf.model.impl URIImpl LiteralImpl]
- [org.openrdf.query QueryLanguage Query BindingSet Binding TupleQuery]
- [info.aduna.iteration CloseableIteration Iteration])
- (:use [clojure.contrib def]
- [com.franz util]))
-
-(alter-meta! *ns* assoc :author "Franz Inc <www.franz.com>, Mike Hinchey <mhinchey@franz.com>")
-
-(defmethod print-method URIImpl [o, #^java.io.Writer w]
- ;; Better to print with <> brackets?
- (.write w (str o)))
-
-(defmethod print-method LiteralImpl [o, #^java.io.Writer w]
- ;; Better to print with <> brackets?
- (.write w (str o)))
-
-(defstruct statement :s :p :o)
-
-(defstruct statement4 :s :p :o :context)
-
-(defmulti to-statement "convert some object to a statement map" type)
-
-(let [convert-keys {"s" :s "o" :o "p" :p}]
- (defmethod to-statement BindingSet
- [#^BindingSet bset]
- #^{:type :statement}
- (loop [binds (iterator-seq (.iterator bset))
- result {}]
- (if (seq binds)
- (let [#^Binding b (first binds)]
- (recur (next binds)
- (assoc result (get convert-keys (.getName b) (.getName b))
- (.getValue b))))
- result))))
-
-(defmethod to-statement Statement
- [#^Statement obj]
- #^{:type :statement}
- (if (.getContext obj)
- (struct statement4
- (.getSubject obj)
- (.getPredicate obj)
- (.getObject obj)
- (.getContext obj))
- (struct statement
- (.getSubject obj)
- (.getPredicate obj)
- (.getObject obj))))
-
-(defmethod to-statement :statement [obj] obj)
-
-(defmethod to-statement java.util.Map
- [obj]
- (with-meta obj {:type :statement}))
-
-(defmethod to-statement clojure.lang.Sequential
- [obj]
- (with-meta (if (= 3 (count obj))
- (struct statement (obj 0) (obj 1) (obj 2))
- (struct statement4 (obj 0) (obj 1) (obj 2) (obj 3)))
- {:type :statement}))
-
-;(prefer-method to-statement clojure.lang.Sequential clojure.lang.Associative)
-
-(defmethod close Repository
- [#^Repository obj]
- (.shutDown obj))
-
-(defmethod close RepositoryConnection
- [#^RepositoryConnection obj]
- (.close obj))
-
-(defmethod close CloseableIteration
- [#^CloseableIteration obj]
- (.close obj))
-
-(defn iteration-seq
- "Wraps a Sesame Iteration in a Clojure seq.
- Note, CloseableIteration is not needed because closing is handled by with-open2, open, and close."
- [#^Iteration iter]
- (iterator-seq (proxy [java.util.Iterator] []
- (next [] (.next iter))
- (hasNext [] (.hasNext iter)))))
-
-(defn repo-connection
- ""
- ([#^Repository repo]
- (.getConnection repo))
- ([#^Repository repo {auto-commit :auto-commit
- namespaces :namespaces}]
- (let [#^RepositoryConnection rcon (open (.getConnection repo))]
- (doseq [[#^String prefix #^String name] namespaces]
- (.setNamespace rcon prefix name))
- (when-not (nil? auto-commit)
- (.setAutoCommit rcon #^Boolean auto-commit))
- rcon)))
-
-(defn repo-init
- "Warning: the object needs to be closed with (close)."
- [#^Repository repo]
- (.initialize repo)
- repo)
-
-(defn value-factory
- [#^RepositoryConnection rcon]
- (.getValueFactory rcon))
-
-(defn literal
- {:tag Literal}
- ([#^ValueFactory vf value]
- (condp instance? value
- String (.createLiteral vf #^String value)
- (.createLiteral vf value)
- ))
- ([#^ValueFactory vf value arg]
- (.createLiteral vf value arg)))
-
-(defn uri
- {:tag URI}
- ([#^ValueFactory factory uri]
- (.createURI factory uri))
- ([factory namespace local-name]
- (.createURI factory namespace local-name)))
-
-(defn resource-array
- "creates a primitive java array of Resource from the seq"
- ;;{:tag LResource}
- {:inline (fn [contexts] `#^LResource (into-array Resource ~contexts))}
- [resources]
- (into-array Resource resources))
-
-(defn add!
- "Add a statement to a repository.
- Note: the openrdf java api for (.add) also supports adding files; see add-from!"
- ([#^RepositoryConnection rcon
- #^Resource subject
- #^URI predicate
- #^Value object
- ;; TODO: how to pass contexts consistently?
- & contexts]
- (.add rcon subject predicate object (resource-array contexts)))
- ([#^RepositoryConnection rcon, stmt, contexts]
- (if (instance? Statement stmt)
- ;; compiler fails to resolve #^LResource in this one
- (.add rcon #^Statement stmt (into-array Resource contexts))
- (let [stmt (to-statement stmt)]
- (.add rcon (:s stmt) (:p stmt) (:o stmt)
- (resource-array (if-let [c (:context stmt)] [c] contexts)))))))
-
-(defn add-all!
- "stmts: a seq where each may be a Statement or a (vector subject predicate object)"
- [#^RepositoryConnection rcon,
- stmts & contexts]
- (doseq [st stmts] (add! rcon st contexts)))
-
-(defn add-from!
- ;; Different name from add! to make it less ambiguous.
- "Add statements from a data file.
- See add!
- data: a File, InputStream, or URL.
- contexts: 0 or more Resource objects"
- [#^RepositoryConnection rcon
- data,
- #^String baseURI,
- #^RDFFormat dataFormat,
- & contexts]
- (.add rcon data baseURI dataFormat (resource-array contexts)))
-
-(defn remove!
- [;; clojure compiler bug? error if this is hinted.
- ;; #^RepositoryConnection
- repos-conn
- #^Resource subject
- #^URI predicate
- #^Value object
- & contexts]
- (.remove repos-conn subject predicate object (resource-array contexts)))
-
-(defn clear!
- [#^RepositoryConnection rcon
- & contexts]
- (.clear rcon (resource-array contexts)))
-
-(defn repo-size
- "http://www.openrdf.org/doc/sesame2/2.2/apidocs/org/openrdf/repository/RepositoryConnection.html#size(org.openrdf.model.Resource...)"
- [#^RepositoryConnection repo-con,
- & contexts]
- (. repo-con (size (resource-array contexts))))
-
-(defn prepare-query!
- [#^Query query
- {:keys [dataset bindings max-query-time include-inferred]}]
- (when dataset
- (.setDataset query dataset))
- (when-not (nil? include-inferred)
- (.setIncludeInferred query include-inferred))
- (when max-query-time
- (.setMaxQueryTime query max-query-time))
- (doseq [[#^String name val] bindings]
- (.setBinding query name val)))
-
-(defn tuple-query
- "Returns a seq of maps (to-statement).
- Must be called within a with-open2, and this will close the result seq.
-
- qlang: QueryLanguage.
- baseURI: optional.
- bindings: optional, map of String names to Value objects.
- prep: see prepare-query!."
- [;#^RepositoryConnection
- rcon,
- qlang
- query
- {base-uri :base-uri
- dataset :dataset
- bindings :bindings
- max-query-time :max-query-time
- include-inferred :include-inferred
- :as prep}]
- (let [#^TupleQuery q (if base-uri
- (.prepareTupleQuery #^RepositoryConnection rcon qlang query base-uri)
- (.prepareTupleQuery #^RepositoryConnection rcon qlang query))]
- (prepare-query! q prep)
- (map to-statement (iteration-seq (open (.evaluate q))))))
-
-(defn query-graph
- "Returns a seq of maps (to-statement).
- Must be called within a with-open2, and this will close the result seq.
-
- qlang: QueryLanguage.
- baseURI: optional.
- bindings: optional, map of String names to Value objects.
- prep: see prepare-query!."
- [;#^RepositoryConnection
- rcon,
- qlang query
- {:keys [base-uri dataset bindings max-query-time include-inferred]
- :as prep}]
- (let [q #^GraphQuery (if base-uri
- (.prepareGraphQuery #^RepositoryConnection rcon qlang query base-uri)
- (.prepareGraphQuery #^RepositoryConnection rcon qlang query))]
- (prepare-query! q prep)
- (map to-statement (iteration-seq (open (.evaluate q))))))
-
-(defn query-boolean
- "Returns a boolean.
-
- qlang: QueryLanguage.
- baseURI: optional.
- bindings: optional, map of String names to Value objects.
- prep: see prepare-query!"
- [;#^RepositoryConnection
- rcon
- qlang query
- {:keys [base-uri dataset bindings max-query-time include-inferred]
- :as prep}]
- (let [q #^BooleanQuery (if base-uri
- (.prepareBooleanQuery #^RepositoryConnection rcon qlang query base-uri)
- (.prepareBooleanQuery #^RepositoryConnection rcon qlang query))]
- (prepare-query! q prep)
- ((.evaluate q))))
-
-(defn get-statements
- "Returns a seq of maps (to-statement).
- Must be called within a with-open2, and this will close the result seq."
- [;#^RepositoryConnection
- rcon
- #^Resource subj
- #^URI pred
- #^Value obj
- {#^Boolean include-inferred :include-inferred
- #^Boolean filter-dups :filter-dups}
- & contexts]
- (let [#^RepositoryResult result
- (.getStatements rcon subj pred obj
- (if (nil? include-inferred) false include-inferred)
- (resource-array contexts))]
- (open result)
- (when filter-dups
- (.enableDuplicateFilter result))
- (map to-statement (iteration-seq result))))
View
79 clojure/src/com/franz/util.clj
@@ -1,79 +0,0 @@
-;; This software is Copyright (c) Franz, 2009.
-;; Franz grants you the rights to distribute
-;; and use this software as governed by the terms
-;; of the Lisp Lesser GNU Public License
-;; (http://opensource.franz.com/preamble.html),
-;; known as the LLGPL.
-
-(ns com.franz.util
- "Utility functions."
- (:use [clojure.contrib stacktrace]))
-
-(alter-meta! *ns* assoc :author "Franz Inc <www.franz.com>, Mike Hinchey <mhinchey@franz.com>")
-
-(defmulti close
- ;; TODO: rename to close!
- "Used by with-closeable in a finally block to close objects.
-Methods are defined for java.io.Closeable and a default for (.close) by reflection.
-May be extended for differently named close methods."
- type)
-
-(defmethod close :default
- [obj]
- (when obj (.close obj)))
-
-(defmethod close java.io.Closeable
- [#^java.io.Closeable obj]
- (.close obj))
-
-(declare *with-open-stack*)
-
-(defn close-all
- "Not intended to be used other than by with-open2.
- Calls close on all objects in open-stack, catches and prints any exceptions."
- [open-stack]
- (when (seq open-stack)
- (try
- (close (first open-stack))
- (catch Throwable e
- (binding [*out* *err*]
- (print "Ignoring exception from close: " e)
- (print-cause-trace e))))
- (recur (next open-stack))))
-
-(defn open
- "Register obj to be closed before the enclosing with-open exits.
- Must be called within the context of with-open.
- Returns the same obj."
- [obj]
- (when (and obj (not (some #{obj} *with-open-stack*)))
- (set! *with-open-stack* (conj *with-open-stack* obj)))
- obj)
-
-(defmacro with-open2
- "Similar to clojure.core/with-open, but also closes objects for which (open) was called within the body.
-
- Only a single try/finally is used. The bindings are wrapped by a call to open.
- In the finally, close-all is called, closing all opened objects in reverse order.
-
- All exceptions thrown by close methods will be caught and printed to System/err.
- For different behavior, use a binding on close to catch exceptions.
-
- Except for the different behavior of catching exceptions from close, this can replace with-open.
-
- Example: (with-open [f (FileReader. x)] ... )
- Example: (with-open [] (... (open (FileReader. x))))"
- [bindings & body]
- `(binding [*with-open-stack* ()]
- (let ~(into []
- (mapcat (fn [[b v]]
- (if (symbol? b)
- [b `(open ~v)]
- (throw
- (IllegalArgumentException.
- (str "with-open2: binding must be a symbol: " b)))))
- (partition 2 bindings)))
- (try
- ~@body
- (finally
- (close-all *with-open-stack*))))))
View
233 clojure/test/com/franz/agraph/agtest.clj
@@ -1,233 +0,0 @@
-;; This software is Copyright (c) Franz, 2009.
-;; Franz grants you the rights to distribute
-;; and use this software as governed by the terms
-;; of the Lisp Lesser GNU Public License
-;; (http://opensource.franz.com/preamble.html),
-;; known as the LLGPL.
-
-(comment
- ;; In the clojure test-is framework, IS is where assertions are made.
-
- ;; Usage, in the REPL:
- (require 'com.franz.agraph.agtest)
- (in-ns 'com.franz.agraph.agtest)
- (agraph-tests)
-
- ;; Run from shell: agtests.sh
- )
-
-(ns com.franz.agraph.agtest
- "Tests for com.franz.agraph"
- (:refer-clojure :exclude (name))
- (:import [java.io File OutputStream FileOutputStream FileWriter
- BufferedReader FileReader PrintStream]
- [com.franz.agraph.repository
- AGCatalog AGQueryLanguage AGRepository
- AGRepositoryConnection AGServer AGValueFactory]
- [org.openrdf.model ValueFactory Resource Literal]
- [org.openrdf.model.vocabulary RDF XMLSchema]
- [org.openrdf.query QueryLanguage]
- [org.openrdf.query.impl DatasetImpl]
- [org.openrdf.rio RDFFormat RDFHandler]
- [org.openrdf.rio.ntriples NTriplesWriter]
- [org.openrdf.rio.rdfxml RDFXMLWriter]
- [org.openrdf.sail.memory MemoryStore]
- [org.openrdf.repository RepositoryConnection]
- [org.openrdf.repository.sail SailRepository]
- )
- (:use [clojure.contrib def test-is]
- [com.franz util openrdf agraph test]
- [com.franz.agraph tutorial]))
-
-(alter-meta! *ns* assoc :author "Franz Inc <www.franz.com>, Mike Hinchey <mhinchey@franz.com>")
-
-(defn agraph-tests
- "Runs tests in this namespace with *test-out* bound so it works properly in slime."
- []
- (binding [*test-out* *out*] (run-tests 'com.franz.agraph.agtest)))
-
-(declare server cat repo rcon vf)
-
-(defn with-agraph-test
- [f]
- (with-agraph [server1 *connection-params*
- cat1 *catalog-id*
- repo1 {:name *catalog-id* :access :renew}
- rcon1]
- (repo-size rcon1) ;; ensures the connection is really open
- (binding [server server1
- cat cat1
- repo repo1
- rcon rcon1
- vf (value-factory rcon1)]
- (f))))
-
-(use-fixtures :once with-agraph-test)
-
-;; to make sure any other opened things get closed with each test
-;(use-fixtures :each with-open2f)
-
-(defn run-test
- "run a single test function
- Example: (run-test catalog-scratch-repos)"
- [f]
- (binding [*test-out* *out*]
- (with-agraph-test f)))
-
-;;;; tests
-
-(deftest catalog-scratch
- (is (some #{"scratch"} (map name (catalogs server)))))
-
-(deftest catalog-scratch-repos
- (is nil? (repositories cat)))
-
-(deftest catalog-scratch-repo-clear
- (clear! rcon)
- (is (= 0 (repo-size rcon))))
-
-(deftest tutorial-test2-3
- (clear! rcon)
- (let [f vf
- ;; create some resources and literals to make statements out of
- alice (uri f "http://example.org/people/alice")
- bob (uri f "http://example.org/people/bob")
- name (uri f "http://example.org/ontology/name")
- person (uri f "http://example.org/ontology/Person")
- bobsName (literal f "Bob")
- alicesName (literal f "Alice")
- type RDF/TYPE
- statements (set (map to-statement [[alice type person]
- [alice name alicesName]
- [bob type person]
- [bob name bobsName]]))]
- (is (= 0 (repo-size rcon)))
-
- (add! rcon alice type person)
- (add! rcon alice name alicesName)
- (add! rcon bob type person)
- (add! rcon bob (uri f "http://example.org/ontology/name") bobsName)
- (is (= 4 (repo-size rcon)))
- (is (= statements
- (set (get-statements rcon nil nil nil false nil))))
-
- (remove! rcon bob name bobsName)
- (is (= 3 (repo-size rcon)))
-
- (add! rcon bob name bobsName)
- (is (= 4 (repo-size rcon)))
-
- (is (= statements
- (set (tuple-query rcon QueryLanguage/SPARQL "SELECT ?s ?p ?o WHERE {?s ?p ?o .}" nil))))
- ))
-
-(deftest compare-mem-agraph
- ;; compare Sesame memory store to AGraph
- ;; test that Sesame passes tutorial-test2-3
- (let [mem (repo-init (open (SailRepository. (MemoryStore.))))
- mcon (repo-connection mem)]
- (binding [server nil
- cat nil
- repo mem
- rcon mcon
- vf (value-factory mcon)]
- (tutorial-test2-3))))
-
-(defn tutorial-test5
- "return the same results as test5, in a data structure"
- []
- (clear! rcon)
- (let [f vf
- exns "http://example.org/people/"
- alice (uri f "http://example.org/people/alice")
- age (uri f exns "age")
- weight (uri f exns, "weight")
- favoriteColor (uri f exns "favoriteColor")
- birthdate (uri f exns "birthdate")
- ted (uri f exns "Ted")
- red (literal f "Red")
- rouge (literal f "Rouge" "fr")
- fortyTwo (literal f "42" XMLSchema/INT)
- fortyTwoInteger (literal f"42", XMLSchema/LONG)
- fortyTwoUntyped (literal f "42")
- date (literal f "1984-12-06" XMLSchema/DATE)
- time (literal f "1984-12-06T09:00:00" XMLSchema/DATETIME)
- stmt1 (.createStatement f alice age fortyTwo)
- stmt2 (.createStatement f ted age fortyTwoUntyped)]
- (add-all! rcon
- [stmt1
- stmt2
- [alice weight (literal f "20.5")]
- [ted weight (literal f "20.5" XMLSchema/FLOAT)]
- [alice favoriteColor red]
- [ted favoriteColor rouge]
- [alice birthdate date]
- [ted birthdate time]])
- (doall (map (fn [x] [x (get-statements rcon nil nil x nil)])
- [nil fortyTwo fortyTwoUntyped (literal f "20.5" XMLSchema/FLOAT)
- (literal f "20.5") red rouge]))
- (doall (map (fn [x] [x (tuple-query rcon QueryLanguage/SPARQL
- (str "PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\n"
- "SELECT ?s ?p ?o WHERE {?s ?p ?o . filter (?o = " x ")}") nil)])
- ["42", "\"42\"", "20.5", "\"20.5\"", "\"20.5\"^^xsd:float"
- "\"Rouge\"@fr", "\"Rouge\"", "\"1984-12-06\"^^xsd:date"]))))
-
-(deftest compare-mem-test5
- ;; compare Sesame memory store to AGraph
- ;; test they get the same results for tutorial-test5
- (let [ag-results (tutorial-test5)
- mem (repo-init (open (SailRepository. (MemoryStore.))))
- mcon (repo-connection mem)
- mem-results (binding [server nil
- cat nil
- repo mem
- rcon mcon
- vf (value-factory mcon)]
- (tutorial-test5))]
- (is-each = ag-results mem-results "row" nil)))
-
-(deftest illegal-sparql
- (is (thrown? org.openrdf.query.QueryEvaluationException
- ;; xsd prefix declaration is missing
- (tuple-query rcon QueryLanguage/SPARQL
- (str "SELECT ?s ?p ?o "
- "WHERE { ?s ?p ?o . "
- "FILTER (xsd:int(?o) >= 30) }")
- nil))))
-
-(deftest test6-baseuri
- ;; testing bug: org.openrdf.rio.RDFParseException: URI "<http://example.org/example/local>" contains illegal character #\< at position 0.
- (clear! rcon)
- (let [vcards (new File *agraph-java-tutorial-dir* "/vc-db-1.rdf")
- baseURI "http://example.org/example/local"
- context (-> rcon value-factory (uri "http://example.org#vcards"))]
- (add-from! rcon vcards baseURI RDFFormat/RDFXML context)
- (is (= 16 (repo-size rcon context)))))
-
-(deftest test16-federation
- (close rcon)
- (let [ex "http://www.demo.com/example#"
- rcon-args {:namespaces {"ex" ex}}
- ;; create two ordinary stores, and one federated store:
- red-con (ag-repo-con cat "redthings" rcon-args)
- green-con (ag-repo-con cat "greenthings" rcon-args)
- rainbow-con (repo-federation server [red-con green-con] rcon-args)
- rf (value-factory red-con)
- gf (value-factory green-con)
- rbf (value-factory rainbow-con)]
- (clear! red-con)
- (clear! green-con)
- ;; add a few triples to the red and green stores:
- (doseq [[c f s o]
- [[red-con rf "mcintosh" "Apple"]
- [red-con rf "reddelicious" "Apple"]
- [green-con gf "pippen" "Apple"]
- [green-con gf "kermitthefrog" "Frog"]]]
- (add! c (uri f (str ex s)) RDF/TYPE (uri rf (str ex o))))
- ;; query each of the stores; observe that the federated one is the union of the other two:
- (doseq [[kind rcon size] [["red" red-con 2]
- ["green" green-con 1]
- ["federated" rainbow-con 3]]]
- (is (= size (count (tuple-query rcon QueryLanguage/SPARQL
- "select ?s where { ?s rdf:type ex:Apple }"
- nil)))))))
View
52 clojure/test/com/franz/agraph/stress_conn.clj
@@ -1,52 +0,0 @@
-;; This software is Copyright (c) Franz, 2009.
-;; Franz grants you the rights to distribute
-;; and use this software as governed by the terms
-;; of the Lisp Lesser GNU Public License
-;; (http://opensource.franz.com/preamble.html),
-;; known as the LLGPL.
-
-(ns com.franz.agraph.stress-conn
- "Stress test connections"
- (:refer-clojure :exclude (name))
- (:use [clojure.contrib test-is]
- [com.franz util openrdf agraph test]
- [com.franz.agraph agtest]))
-
-(alter-meta! *ns* assoc :author "Franz Inc <www.franz.com>, Mike Hinchey <mhinchey@franz.com>")
-
-;; to make sure any other opened things get closed with each test
-(use-fixtures :each with-open2f)
-
-(deftest stress-small
- (dotimes [x 400]
- (try (with-agraph-test
- #(do
- (clear! rcon)
- (add! rcon [(uri vf "http://example.org/stress/conn")
- (uri vf "http://example.org/stress/count")
- (literal vf x)] nil)
- (when (mod x 3)
- (throw (IllegalArgumentException. "goto")))
- ))
- (catch IllegalArgumentException e)
- (catch Exception e
- (throw (Exception. (str "failed on try: " x) e))))))
-
-(deftest stress-big
- (dotimes [x 300]
- (try (with-agraph-test
- #(dotimes [y 110]
- (try (clear! rcon)
- (add! rcon [(uri vf "http://example.org/stress/conn")
- (uri vf "http://example.org/stress/count")
- (literal vf x)] nil)
- (when (mod x 20)
- (throw (IllegalArgumentException. "goto")))
- (catch IllegalArgumentException e (throw e))
- (catch Exception e
- (throw (Exception. (str "failed on try: " x "/" y) e)))
- )))
- (catch IllegalArgumentException e)
- (catch Exception e
- (throw (Exception. (str "failed on try: " x) e)))
- )))
View
73 clojure/test/com/franz/agraph/test_tutorial.clj
@@ -1,73 +0,0 @@
-;; This software is Copyright (c) Franz, 2009.
-;; Franz grants you the rights to distribute
-;; and use this software as governed by the terms
-;; of the Lisp Lesser GNU Public License
-;; (http://opensource.franz.com/preamble.html),
-;; known as the LLGPL.
-
-(ns com.franz.agraph.test-tutorial
- "Tests for com.franz.agraph.tutorial and TutorialExamples.java"
- (:refer-clojure :exclude (name))
- (:import [java.io File FileWriter PrintStream]
- [tutorial TutorialExamples])
- (:use [clojure.contrib def test-is]
- [com.franz util openrdf agraph test]
- [com.franz.agraph tutorial agtest]))
-
-(alter-meta! *ns* assoc :author "Franz Inc <www.franz.com>, Mike Hinchey <mhinchey@franz.com>")
-
-;; to make sure any other opened things get closed with each test
-(use-fixtures :each with-open2f)
-
-(deftest tutorial-output-clj
- ;;; Captures output from tutorial and compares to saved previous
- ;;; output. If changes to output are good, copy the tmp file to
- ;;; test/tutorial.clj.out, and commit.
- (with-agraph-test
- #(do (clear! rcon)
- (let [outf (File/createTempFile "agraph-tutorial.clj-" ".out")
- server1 server
- cat1 cat
- repo1 repo
- rcon1 rcon]
- (println "Writing tutorial output to: " outf)
- (with-open2 []
- (binding [*out* (open (FileWriter. outf))
- ag-server (fn [url u p] server1)
- open-catalog (fn [c ct] cat1)
- repository (fn [cat name access] repo1)
- repo-init (fn [r] r)
- ;repo-connection (fn [r args] rcon1)
- ]
- (test1)
- (test2)
- (test3)
- (test4)
- (test5)
- (println "tutorial/test6 and higher fail")
- ;;(test-all)
- ))
- (let [prevf (File. "./clojure/test/com/franz/agraph/tutorial.clj.out")]
- (is-each = (read-lines prevf) (read-lines outf)
- "line" (str (.getCanonicalPath prevf) " differs from "
- (.getCanonicalPath outf))))))))
-
-(deftest tutorial-output-java
- ;;; Captures output from tutorial and compares to saved previous
- ;;; output. If changes to output are good, copy the tmp file to
- ;;; test/tutorial.clj.out, and commit.
- ;;(clear! rcon)
- (let [outf (File/createTempFile "agraph-tutorial.java-" ".out")]
- (println "Writing tutorial output to: " outf)
- (with-open2 []
- (let [out (PrintStream. outf)]
- (System/setOut out)
- (System/setErr out)
- ;(TutorialExamples/main (into-array String (map str (concat (range 1 16) [19]))))
- (TutorialExamples/main (into-array String (map str (concat (range 1 20) [22]))))
- ;(TutorialExamples/main (into-array String (map str (concat [5]))))
- ))
- (let [prevf (File. "./clojure/test/com/franz/agraph/tutorial.java.out")]
- (is-each = (read-lines prevf) (read-lines outf)
- "line" (str (.getCanonicalPath prevf) " differs from "
- (.getCanonicalPath outf))))))
View
149 clojure/test/com/franz/agraph/tutorial.clj.out
@@ -1,149 +0,0 @@
-Available catalogs: nil
-Available repositories in catalog scratch : nil
-Repository scratch is up! It contains 0 statements.
-Triple count before inserts: 0
-Triple count after adding: 4
-Triple count after removing: 3
-Triple count before inserts: 4
-{:s http://example.org/people/alice, :p http://www.w3.org/1999/02/22-rdf-syntax-ns#type, :o http://example.org/ontology/Person}
-{:s http://example.org/people/alice, :p http://example.org/ontology/name, :o "Alice"}
-{:s http://example.org/people/bob, :p http://www.w3.org/1999/02/22-rdf-syntax-ns#type, :o http://example.org/ontology/Person}
-{:s http://example.org/people/bob, :p http://example.org/ontology/name, :o "Bob"}
-Triple count after adding: 8
-Triple count after removing: 6
-{:o http://example.org/ontology/Person, :p http://www.w3.org/1999/02/22-rdf-syntax-ns#type, :s http://example.org/people/alice}
-{:o "Alice", :p http://example.org/ontology/name, :s http://example.org/people/alice}
-{:o http://example.org/ontology/Person, :p http://www.w3.org/1999/02/22-rdf-syntax-ns#type, :s http://example.org/people/bob}
-{:o http://example.org/ontology/Person, :p http://www.w3.org/1999/02/22-rdf-syntax-ns#type, :s http://example.org/people/alice}
-{:o "Alice", :p http://example.org/ontology/name, :s http://example.org/people/alice}
-{:o http://example.org/ontology/Person, :p http://www.w3.org/1999/02/22-rdf-syntax-ns#type, :s http://example.org/people/bob}
-{:o "Bob", :p http://example.org/ontology/name, :s http://example.org/people/bob}
-Triple count before inserts: 7
-{:s http://example.org/people/alice, :p http://www.w3.org/1999/02/22-rdf-syntax-ns#type, :o http://example.org/ontology/Person}
-{:s http://example.org/people/alice, :p http://example.org/ontology/name, :o "Alice"}
-{:s http://example.org/people/bob, :p http://www.w3.org/1999/02/22-rdf-syntax-ns#type, :o http://example.org/ontology/Person}
-{:s http://example.org/people/bob, :p http://example.org/ontology/name, :o "Bob"}
-Triple count after adding: 11
-Triple count after removing: 9
-{:s http://example.org/people/alice, :p http://example.org/ontology/name, :o "Alice"}
-{:s http://example.org/people/alice, :p http://www.w3.org/1999/02/22-rdf-syntax-ns#type, :o http://example.org/ontology/Person}
-Retrieve triples matching nil .
-{:s http://example.org/people/alice, :p http://example.org/people/age, :o "42"^^<http://www.w3.org/2001/XMLSchema#int>}
-{:s http://example.org/people/Ted, :p http://example.org/people/age, :o "42"}
-{:s http://example.org/people/alice, :p http://example.org/people/weight, :o "20.5"}
-{:s http://example.org/people/Ted, :p http://example.org/people/weight, :o "20.5"^^<http://www.w3.org/2001/XMLSchema#float>}
-{:s http://example.org/people/alice, :p http://example.org/people/favoriteColor, :o "Red"}
-{:s http://example.org/people/Ted, :p http://example.org/people/favoriteColor, :o "Rouge"@fr}
-{:s http://example.org/people/alice, :p http://example.org/people/birthdate, :o "1984-12-06"^^<http://www.w3.org/2001/XMLSchema#date>}
-{:s http://example.org/people/Ted, :p http://example.org/people/birthdate, :o "1984-12-06T09:00:00"^^<http://www.w3.org/2001/XMLSchema#dateTime>}
-Query triples matching 42 .
-{:o "42"^^<http://www.w3.org/2001/XMLSchema#int>, :p http://example.org/people/age, :s http://example.org/people/alice}
-Query triples matching "42" .
-{:o "42", :p http://example.org/people/age, :s http://example.org/people/Ted}
-Query triples matching 20.5 .
-{:o "20.5"^^<http://www.w3.org/2001/XMLSchema#float>, :p http://example.org/people/weight, :s http://example.org/people/Ted}
-Query triples matching "20.5" .
-{:o "20.5", :p http://example.org/people/weight, :s http://example.org/people/alice}
-Query triples matching "20.5"^^xsd:float .
-{:o "20.5"^^<http://www.w3.org/2001/XMLSchema#float>, :p http://example.org/people/weight, :s http://example.org/people/Ted}
-Query triples matching "Rouge"@fr .
-{:o "Rouge"@fr, :p http://example.org/people/favoriteColor, :s http://example.org/people/Ted}
-Query triples matching "Rouge" .
-Query triples matching "1984-12-06"^^xsd:date .
-Retrieve triples matching "42"^^<http://www.w3.org/2001/XMLSchema#int> .
-{:s http://example.org/people/alice, :p http://example.org/people/age, :o "42"^^<http://www.w3.org/2001/XMLSchema#int>}
-Query triples matching 42 .
-{:o "42"^^<http://www.w3.org/2001/XMLSchema#int>, :p http://example.org/people/age, :s http://example.org/people/alice}
-Query triples matching "42" .
-{:o "42", :p http://example.org/people/age, :s http://example.org/people/Ted}
-Query triples matching 20.5 .
-{:o "20.5"^^<http://www.w3.org/2001/XMLSchema#float>, :p http://example.org/people/weight, :s http://example.org/people/Ted}
-Query triples matching "20.5" .
-{:o "20.5", :p http://example.org/people/weight, :s http://example.org/people/alice}
-Query triples matching "20.5"^^xsd:float .
-{:o "20.5"^^<http://www.w3.org/2001/XMLSchema#float>, :p http://example.org/people/weight, :s http://example.org/people/Ted}
-Query triples matching "Rouge"@fr .
-{:o "Rouge"@fr, :p http://example.org/people/favoriteColor, :s http://example.org/people/Ted}
-Query triples matching "Rouge" .
-Query triples matching "1984-12-06"^^xsd:date .
-Retrieve triples matching "42" .
-{:s http://example.org/people/Ted, :p http://example.org/people/age, :o "42"}
-Query triples matching 42 .
-{:o "42"^^<http://www.w3.org/2001/XMLSchema#int>, :p http://example.org/people/age, :s http://example.org/people/alice}
-Query triples matching "42" .
-{:o "42", :p http://example.org/people/age, :s http://example.org/people/Ted}
-Query triples matching 20.5 .
-{:o "20.5"^^<http://www.w3.org/2001/XMLSchema#float>, :p http://example.org/people/weight, :s http://example.org/people/Ted}
-Query triples matching "20.5" .
-{:o "20.5", :p http://example.org/people/weight, :s http://example.org/people/alice}
-Query triples matching "20.5"^^xsd:float .
-{:o "20.5"^^<http://www.w3.org/2001/XMLSchema#float>, :p http://example.org/people/weight, :s http://example.org/people/Ted}
-Query triples matching "Rouge"@fr .
-{:o "Rouge"@fr, :p http://example.org/people/favoriteColor, :s http://example.org/people/Ted}
-Query triples matching "Rouge" .
-Query triples matching "1984-12-06"^^xsd:date .
-Retrieve triples matching "20.5"^^<http://www.w3.org/2001/XMLSchema#float> .
-{:s http://example.org/people/Ted, :p http://example.org/people/weight, :o "20.5"^^<http://www.w3.org/2001/XMLSchema#float>}
-Query triples matching 42 .
-{:o "42"^^<http://www.w3.org/2001/XMLSchema#int>, :p http://example.org/people/age, :s http://example.org/people/alice}
-Query triples matching "42" .
-{:o "42", :p http://example.org/people/age, :s http://example.org/people/Ted}
-Query triples matching 20.5 .
-{:o "20.5"^^<http://www.w3.org/2001/XMLSchema#float>, :p http://example.org/people/weight, :s http://example.org/people/Ted}
-Query triples matching "20.5" .
-{:o "20.5", :p http://example.org/people/weight, :s http://example.org/people/alice}
-Query triples matching "20.5"^^xsd:float .
-{:o "20.5"^^<http://www.w3.org/2001/XMLSchema#float>, :p http://example.org/people/weight, :s http://example.org/people/Ted}
-Query triples matching "Rouge"@fr .
-{:o "Rouge"@fr, :p http://example.org/people/favoriteColor, :s http://example.org/people/Ted}
-Query triples matching "Rouge" .
-Query triples matching "1984-12-06"^^xsd:date .
-Retrieve triples matching "20.5" .
-{:s http://example.org/people/alice, :p http://example.org/people/weight, :o "20.5"}
-Query triples matching 42 .
-{:o "42"^^<http://www.w3.org/2001/XMLSchema#int>, :p http://example.org/people/age, :s http://example.org/people/alice}
-Query triples matching "42" .
-{:o "42", :p http://example.org/people/age, :s http://example.org/people/Ted}
-Query triples matching 20.5 .
-{:o "20.5"^^<http://www.w3.org/2001/XMLSchema#float>, :p http://example.org/people/weight, :s http://example.org/people/Ted}
-Query triples matching "20.5" .
-{:o "20.5", :p http://example.org/people/weight, :s http://example.org/people/alice}
-Query triples matching "20.5"^^xsd:float .
-{:o "20.5"^^<http://www.w3.org/2001/XMLSchema#float>, :p http://example.org/people/weight, :s http://example.org/people/Ted}
-Query triples matching "Rouge"@fr .
-{:o "Rouge"@fr, :p http://example.org/people/favoriteColor, :s http://example.org/people/Ted}
-Query triples matching "Rouge" .
-Query triples matching "1984-12-06"^^xsd:date .
-Retrieve triples matching "Red" .
-{:s http://example.org/people/alice, :p http://example.org/people/favoriteColor, :o "Red"}
-Query triples matching 42 .
-{:o "42"^^<http://www.w3.org/2001/XMLSchema#int>, :p http://example.org/people/age, :s http://example.org/people/alice}
-Query triples matching "42" .
-{:o "42", :p http://example.org/people/age, :s http://example.org/people/Ted}
-Query triples matching 20.5 .
-{:o "20.5"^^<http://www.w3.org/2001/XMLSchema#float>, :p http://example.org/people/weight, :s http://example.org/people/Ted}
-Query triples matching "20.5" .
-{:o "20.5", :p http://example.org/people/weight, :s http://example.org/people/alice}
-Query triples matching "20.5"^^xsd:float .
-{:o "20.5"^^<http://www.w3.org/2001/XMLSchema#float>, :p http://example.org/people/weight, :s http://example.org/people/Ted}
-Query triples matching "Rouge"@fr .
-{:o "Rouge"@fr, :p http://example.org/people/favoriteColor, :s http://example.org/people/Ted}
-Query triples matching "Rouge" .
-Query triples matching "1984-12-06"^^xsd:date .
-Retrieve triples matching "Rouge"@fr .
-{:s http://example.org/people/Ted, :p http://example.org/people/favoriteColor, :o "Rouge"@fr}
-Query triples matching 42 .
-{:o "42"^^<http://www.w3.org/2001/XMLSchema#int>, :p http://example.org/people/age, :s http://example.org/people/alice}
-Query triples matching "42" .
-{:o "42", :p http://example.org/people/age, :s http://example.org/people/Ted}
-Query triples matching 20.5 .
-{:o "20.5"^^<http://www.w3.org/2001/XMLSchema#float>, :p http://example.org/people/weight, :s http://example.org/people/Ted}
-Query triples matching "20.5" .
-{:o "20.5", :p http://example.org/people/weight, :s http://example.org/people/alice}
-Query triples matching "20.5"^^xsd:float .
-{:o "20.5"^^<http://www.w3.org/2001/XMLSchema#float>, :p http://example.org/people/weight, :s http://example.org/people/Ted}
-Query triples matching "Rouge"@fr .
-{:o "Rouge"@fr, :p http://example.org/people/favoriteColor, :s http://example.org/people/Ted}
-Query triples matching "Rouge" .
-Query triples matching "1984-12-06"^^xsd:date .
-tutorial/test6 and higher fail
View
1,226 clojure/test/com/franz/agraph/tutorial.java.out
@@ -1,1226 +0,0 @@
-
-Running test 1
-Starting example test1().
-Available catalogs: null
-Available repositories in catalog scratch: null
-Got a repository.
-Initialized repository.
-Got a connection.
-Cleared the connection.
-Repository tutorial is up! It contains 0 statements.
-
-Running test 2
-Starting example test1().
-Available catalogs: null
-Available repositories in catalog scratch: null
-Got a repository.
-Initialized repository.
-Got a connection.
-Cleared the connection.
-Repository tutorial is up! It contains 0 statements.
-Starting example test2().
-Triple count before inserts: 0
-Added four triples.
-Triple count after inserts: 4
-(http://example.org/people/alice, http://example.org/ontology/name,
-"Alice") [null]
-(http://example.org/people/alice,
-http://www.w3.org/1999/02/22-rdf-syntax-ns#type,
-http://example.org/ontology/Person) [null]
-(http://example.org/people/bob, http://example.org/ontology/name, "Bob")
-[null]
-(http://example.org/people/bob,
-http://www.w3.org/1999/02/22-rdf-syntax-ns#type,
-http://example.org/ontology/Person) [null]
-Removed one triple.
-Triple count after deletion: 3
-
-Running test 3
-Starting example test1().
-Available catalogs: null
-Available repositories in catalog scratch: null
-Got a repository.
-Initialized repository.
-Got a connection.
-Cleared the connection.
-Repository tutorial is up! It contains 0 statements.
-Starting example test2().
-Triple count before inserts: 0
-Added four triples.
-Triple count after inserts: 4
-(http://example.org/people/alice, http://example.org/ontology/name,
-"Alice") [null]
-(http://example.org/people/alice,
-http://www.w3.org/1999/02/22-rdf-syntax-ns#type,
-http://example.org/ontology/Person) [null]
-(http://example.org/people/bob, http://example.org/ontology/name, "Bob")
-[null]
-(http://example.org/people/bob,
-http://www.w3.org/1999/02/22-rdf-syntax-ns#type,
-http://example.org/ontology/Person) [null]
-Removed one triple.
-Triple count after deletion: 3
-http://example.org/people/alice http://example.org/ontology/name "Alice"
-http://example.org/people/alice
-http://www.w3.org/1999/02/22-rdf-syntax-ns#type
-http://example.org/ontology/Person
-http://example.org/people/bob
-http://www.w3.org/1999/02/22-rdf-syntax-ns#type
-http://example.org/ontology/Person
-http://example.org/people/bob http://example.org/ontology/name "Bob"
-
-Running test 4
-Starting example test1().
-Available catalogs: null
-Available repositories in catalog scratch: null
-Got a repository.
-Initialized repository.
-Got a connection.
-Cleared the connection.
-Repository tutorial is up! It contains 0 statements.
-Starting example test2().
-Triple count before inserts: 0
-Added four triples.
-Triple count after inserts: 4
-(http://example.org/people/alice, http://example.org/ontology/name,
-"Alice") [null]
-(http://example.org/people/alice,
-http://www.w3.org/1999/02/22-rdf-syntax-ns#type,
-http://example.org/ontology/Person) [null]
-(http://example.org/people/bob, http://example.org/ontology/name, "Bob")
-[null]
-(http://example.org/people/bob,
-http://www.w3.org/1999/02/22-rdf-syntax-ns#type,
-http://example.org/ontology/Person) [null]
-Removed one triple.
-Triple count after deletion: 3
-(http://example.org/people/alice,
-http://www.w3.org/1999/02/22-rdf-syntax-ns#type,
-http://example.org/ontology/Person) [null]
-(http://example.org/people/alice, http://example.org/ontology/name,
-"Alice") [null]
-
-Running test 5
-Starting example test1().
-Available catalogs: null
-Available repositories in catalog scratch: null
-Got a repository.
-Initialized repository.
-Got a connection.
-Cleared the connection.
-Repository tutorial is up! It contains 0 statements.
-Starting example test2().
-Triple count before inserts: 0
-Added four triples.
-Triple count after inserts: 4
-(http://example.org/people/alice, http://example.org/ontology/name,
-"Alice") [null]
-(http://example.org/people/alice,
-http://www.w3.org/1999/02/22-rdf-syntax-ns#type,
-http://example.org/ontology/Person) [null]
-(http://example.org/people/bob, http://example.org/ontology/name, "Bob")
-[null]
-(http://example.org/people/bob,
-http://www.w3.org/1999/02/22-rdf-syntax-ns#type,
-http://example.org/ontology/Person) [null]
-Removed one triple.
-Triple count after deletion: 3
-Retrieve triples matching null.
-(http://example.org/people/alice, http://example.org/people/age,
-"42"^^<http://www.w3.org/2001/XMLSchema#int>) [null]
-(http://example.org/people/Ted, http://example.org/people/age, "42") [null]
-(http://example.org/people/alice, http://example.org/people/weight,
-"20.5") [null]
-(http://example.org/people/Ted, http://example.org/people/weight,
-"20.5"^^<http://www.w3.org/2001/XMLSchema#float>) [null]
-(http://example.org/people/alice,
-http://example.org/people/favoriteColor, "Red") [null]
-(http://example.org/people/Ted, http://example.org/people/favoriteColor,
-"Rouge"@fr) [null]
-(http://example.org/people/alice, http://example.org/people/birthdate,
-"1984-12-06"^^<http://www.w3.org/2001/XMLSchema#date>) [null]
-(http://example.org/people/Ted, http://example.org/people/birthdate,
-"1984-12-06T09:00:00"^^<http://www.w3.org/2001/XMLSchema#dateTime>) [null]
-Retrieve triples matching "42"^^<http://www.w3.org/2001/XMLSchema#int>.
-(http://example.org/people/alice, http://example.org/people/age,
-"42"^^<http://www.w3.org/2001/XMLSchema#int>) [null]
-Retrieve triples matching "42".
-(http://example.org/people/Ted, http://example.org/people/age, "42") [null]
-Retrieve triples matching "20.5"^^<http://www.w3.org/2001/XMLSchema#float>.
-(http://example.org/people/Ted, http://example.org/people/weight,
-"20.5"^^<http://www.w3.org/2001/XMLSchema#float>) [null]
-Retrieve triples matching "20.5".
-(http://example.org/people/alice, http://example.org/people/weight,
-"20.5") [null]
-Retrieve triples matching "Red".
-(http://example.org/people/alice,
-http://example.org/people/favoriteColor, "Red") [null]
-Retrieve triples matching "Rouge"@fr.
-(http://example.org/people/Ted, http://example.org/people/favoriteColor,
-"Rouge"@fr) [null]
-Query triples matching 42.
- http://example.org/people/alice http://example.org/people/age
-"42"^^<http://www.w3.org/2001/XMLSchema#int>
-Query triples matching "42".
- http://example.org/people/Ted http://example.org/people/age "42"
-Query triples matching 20.5.
- http://example.org/people/Ted http://example.org/people/weight
-"20.5"^^<http://www.w3.org/2001/XMLSchema#float>
-Query triples matching "20.5".
- http://example.org/people/alice http://example.org/people/weight "20.5"
-Query triples matching "20.5"^^xsd:float.
- http://example.org/people/Ted http://example.org/people/weight
-"20.5"^^<http://www.w3.org/2001/XMLSchema#float>
-Query triples matching "Rouge"@fr.
- http://example.org/people/Ted http://example.org/people/favoriteColor
-"Rouge"@fr
-Query triples matching "Rouge".
-Query triples matching "1984-12-06"^^xsd:date.
-Retrieve triples matching DATE object.
-(http://example.org/people/alice, http://example.org/people/birthdate,
-"1984-12-06"^^<http://www.w3.org/2001/XMLSchema#date>) [null]
-Match triples having a specific DATE value.
-
-Running test 6
-After loading, repository contains 16 triples in context
-'http://example.org#vcards'
- and 1214 triples in context 'null'.
-
-Running test 7
-After loading, repository contains 16 triples in context
-'http://example.org#vcards'
- and 1214 triples in context 'null'.
-Match all and print subjects and contexts
-_:2744 http://example.org#vcards
-_:2744 http://example.org#vcards
-http://somewhere/MattJones/ http://example.org#vcards
-http://somewhere/MattJones/ http://example.org#vcards
-_:2743 http://example.org#vcards
-_:2743 http://example.org#vcards
-http://somewhere/SarahJones/ http://example.org#vcards
-http://somewhere/SarahJones/ http://example.org#vcards
-_:2742 http://example.org#vcards
-_:2742 http://example.org#vcards
-http://somewhere/RebeccaSmith/ http://example.org#vcards
-http://somewhere/RebeccaSmith/ http://example.org#vcards
-_:2741 http://example.org#vcards
-_:2741 http://example.org#vcards
-http://somewhere/JohnSmith/ http://example.org#vcards
-http://somewhere/JohnSmith/ http://example.org#vcards
-http://www.franz.com/simple#person55 null
-http://www.franz.com/simple#person27 null
-http://www.franz.com/simple#person54 null
-http://www.franz.com/simple#person26 null
-http://www.franz.com/simple#person53 null
-http://www.franz.com/simple#person25 null
-http://www.franz.com/simple#person52 null
-http://www.franz.com/simple#person24 null
-http://www.franz.com/simple#person51 null
-Same thing with SPARQL query (can't retrieve triples in the null context)
-s=http://somewhere/SarahJones/ c=http://example.org#vcards
-s=http://somewhere/JohnSmith/ c=http://example.org#vcards
-s=http://somewhere/MattJones/ c=http://example.org#vcards
-s=http://somewhere/RebeccaSmith/ c=http://example.org#vcards
-s=_:2741 c=http://example.org#vcards
-s=_:2742 c=http://example.org#vcards
-s=_:2743 c=http://example.org#vcards
-s=_:2744 c=http://example.org#vcards
-
-Running test 8
-After loading, repository contains 16 triples in context
-'http://example.org#vcards'
- and 1214 triples in context 'null'.
-Writing to Standard Out instead of to a file
-<http://somewhere/JohnSmith/> <http://www.w3.org/2001/vcard-rdf/3.0#FN>
-"John Smith" .
-<http://somewhere/JohnSmith/> <http://www.w3.org/2001/vcard-rdf/3.0#N>
-_:2845 .
-_:2845 <http://www.w3.org/2001/vcard-rdf/3.0#Family> "Smith" .
-_:2845 <http://www.w3.org/2001/vcard-rdf/3.0#Given> "John" .
-<http://somewhere/RebeccaSmith/>
-<http://www.w3.org/2001/vcard-rdf/3.0#FN> "Becky Smith" .
-<http://somewhere/RebeccaSmith/>
-<http://www.w3.org/2001/vcard-rdf/3.0#N> _:2846 .
-_:2846 <http://www.w3.org/2001/vcard-rdf/3.0#Family> "Smith" .
-_:2846 <http://www.w3.org/2001/vcard-rdf/3.0#Given> "Rebecca" .
-<http://somewhere/SarahJones/> <http://www.w3.org/2001/vcard-rdf/3.0#FN>
-"Sarah Jones" .
-<http://somewhere/SarahJones/> <http://www.w3.org/2001/vcard-rdf/3.0#N>
-_:2847 .
-_:2847 <http://www.w3.org/2001/vcard-rdf/3.0#Family> "Jones" .
-_:2847 <http://www.w3.org/2001/vcard-rdf/3.0#Given> "Sarah" .
-<http://somewhere/MattJones/> <http://www.w3.org/2001/vcard-rdf/3.0#FN>
-"Matt Jones" .
-<http://somewhere/MattJones/> <http://www.w3.org/2001/vcard-rdf/3.0#N>
-_:2848 .
-_:2848 <http://www.w3.org/2001/vcard-rdf/3.0#Family> "Jones" .
-_:2848 <http://www.w3.org/2001/vcard-rdf/3.0#Given> "Matthew" .
-Writing to Standard Out instead of to a file
-<?xml version="1.0" encoding="UTF-8"?>
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
-
-<rdf:Description rdf:about="http://somewhere/JohnSmith/">
- <FN xmlns="http://www.w3.org/2001/vcard-rdf/3.0#">John Smith</FN>
- <N xmlns="http://www.w3.org/2001/vcard-rdf/3.0#" rdf:nodeID="2845"/>
-</rdf:Description>
-
-<rdf:Description rdf:nodeID="2845">
- <Family xmlns="http://www.w3.org/2001/vcard-rdf/3.0#">Smith</Family>
- <Given xmlns="http://www.w3.org/2001/vcard-rdf/3.0#">John</Given>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://somewhere/RebeccaSmith/">
- <FN xmlns="http://www.w3.org/2001/vcard-rdf/3.0#">Becky Smith</FN>
- <N xmlns="http://www.w3.org/2001/vcard-rdf/3.0#" rdf:nodeID="2846"/>
-</rdf:Description>
-
-<rdf:Description rdf:nodeID="2846">
- <Family xmlns="http://www.w3.org/2001/vcard-rdf/3.0#">Smith</Family>
- <Given xmlns="http://www.w3.org/2001/vcard-rdf/3.0#">Rebecca</Given>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://somewhere/SarahJones/">
- <FN xmlns="http://www.w3.org/2001/vcard-rdf/3.0#">Sarah Jones</FN>
- <N xmlns="http://www.w3.org/2001/vcard-rdf/3.0#" rdf:nodeID="2847"/>
-</rdf:Description>
-
-<rdf:Description rdf:nodeID="2847">
- <Family xmlns="http://www.w3.org/2001/vcard-rdf/3.0#">Jones</Family>
- <Given xmlns="http://www.w3.org/2001/vcard-rdf/3.0#">Sarah</Given>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://somewhere/MattJones/">
- <FN xmlns="http://www.w3.org/2001/vcard-rdf/3.0#">Matt Jones</FN>
- <N xmlns="http://www.w3.org/2001/vcard-rdf/3.0#" rdf:nodeID="2848"/>
-</rdf:Description>
-
-<rdf:Description rdf:nodeID="2848">
- <Family xmlns="http://www.w3.org/2001/vcard-rdf/3.0#">Jones</Family>
- <Given xmlns="http://www.w3.org/2001/vcard-rdf/3.0#">Matthew</Given>
-</rdf:Description>
-
-</rdf:RDF>
-
-Running test 9
-After loading, repository contains 16 triples in context
-'http://example.org#vcards'
- and 1214 triples in context 'null'.
-<?xml version="1.0" encoding="UTF-8"?>
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person1">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person2">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person3">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person4">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person5">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person6">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person7">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person8">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person9">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person10">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person11">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person12">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person13">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person14">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person15">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person16">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person17">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person18">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person19">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person20">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person21">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person22">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person23">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person24">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person25">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person26">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person27">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person28">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person30">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person31">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person32">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person33">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person34">
- <rdf:type rdf:resource="http://www.franz.com/simple#person"/>
-</rdf:Description>
-
-<rdf:Description rdf:about="http://www.franz.com/simple#person35">