From 81ca857fc3c78ef1f46759f5d71e247c97f0b15f Mon Sep 17 00:00:00 2001 From: j2blake Date: Tue, 26 Nov 2013 16:03:47 -0500 Subject: [PATCH] VIVO-530 Adjust SPARQL Update API --- productMods/WEB-INF/web.xml | 10 ++ .../SparqlUpdateApi/EnableSparqlUpdateApi.n3 | 8 + .../suites/SparqlUpdateApi/TestSparqlApi.html | 163 ++++++++++++++++++ 3 files changed, 181 insertions(+) create mode 100644 utilities/acceptance-tests/suites/SparqlUpdateApi/EnableSparqlUpdateApi.n3 create mode 100644 utilities/acceptance-tests/suites/SparqlUpdateApi/TestSparqlApi.html diff --git a/productMods/WEB-INF/web.xml b/productMods/WEB-INF/web.xml index c4877446..af9f9bdf 100644 --- a/productMods/WEB-INF/web.xml +++ b/productMods/WEB-INF/web.xml @@ -1119,6 +1119,16 @@ /admin/sparqlquery + + SparqlUpdateApi + edu.cornell.mannlib.vitro.webapp.controller.api.SparqlUpdateApiController + + + + SparqlUpdateApi + /api/sparqlUpdate + + StandardVisualizationController edu.cornell.mannlib.vitro.webapp.controller.visualization.StandardVisualizationController diff --git a/utilities/acceptance-tests/suites/SparqlUpdateApi/EnableSparqlUpdateApi.n3 b/utilities/acceptance-tests/suites/SparqlUpdateApi/EnableSparqlUpdateApi.n3 new file mode 100644 index 00000000..dc389c21 --- /dev/null +++ b/utilities/acceptance-tests/suites/SparqlUpdateApi/EnableSparqlUpdateApi.n3 @@ -0,0 +1,8 @@ +@prefix rdfs: . +@prefix auth: . +@prefix simplePermission: . +@prefix displayByRole: . +@prefix editByRole: . + +auth:ADMIN + auth:hasPermission simplePermission:UseSparqlUpdateApi ; diff --git a/utilities/acceptance-tests/suites/SparqlUpdateApi/TestSparqlApi.html b/utilities/acceptance-tests/suites/SparqlUpdateApi/TestSparqlApi.html new file mode 100644 index 00000000..dfef47ac --- /dev/null +++ b/utilities/acceptance-tests/suites/SparqlUpdateApi/TestSparqlApi.html @@ -0,0 +1,163 @@ + + +

Test the SPARQL API

+ +
+ Get RDF + + +
+ +
+ +
+ +
+ Get RDF + + +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ + + +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+200 Success
+400 Failed to parse SPARQL update
+400 SPARQL update must specify a GRAPH URI.
+403 username/password combination is not valid
+403 Account is not authorized
+405 Method not allowed
+500 Unknown error
+
+