Open dazza-codes opened 7 years ago
Some of the work on this issue was completed in #14; additional work is required to check presence of a test
namespace, delete it, (re)create it, and clean up at the end.
To enable an automated creation or check that the test namespace exists, we need an additional script; e.g. see SO commentary about how this might be done at
http://stackoverflow.com/questions/41300401/blazegraph-create-namespace-via-rest-api
Was able to create a new namespace from the command line. First, create a namespace definition file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<entry key="com.bigdata.rdf.sail.namespace">ld4p_rdf_to_blazegraph_test</entry>
<entry key="com.bigdata.rdf.store.AbstractTripleStore.quads">false</entry>
<entry key="com.bigdata.rdf.store.AbstractTripleStore.axiomsClass">com.bigdata.rdf.axioms.OwlAxioms</entry>
<entry key="com.bigdata.rdf.sail.truthMaintenance">true</entry>
</properties>
Then create the namespace:
$ curl -X POST -H 'Content-type: application/xml' --data @ns.xml http://localhost:8080/blazegraph/namespace
CREATED: ld4p_rdf_to_blazegraph_test
To delete the namespace:
$ curl -X DELETE http://localhost:8080/blazegraph/namespace/ld4p_rdf_to_blazegraph_test
DELETED: ld4p_rdf_to_blazegraph_test
If the namespace already exists, the create command will return EXISTS
, e.g.
$ curl -i -X POST -H 'Content-type: application/xml' --data @ns.xml http://localhost:8080/blazegraph/namespace
HTTP/1.1 409 Conflict
Server: Apache-Coyote/1.1
Content-Type: text/plain;charset=ISO-8859-1
Transfer-Encoding: chunked
Date: Thu, 30 Mar 2017 19:28:43 GMT
EXISTS: ld4p_rdf_to_blazegraph_test
The last features of this test are completed by #21
@eefahy notes the following requirements:
A test script should:
test
namespace exists