-
Notifications
You must be signed in to change notification settings - Fork 0
/
rest_request_fuseki.roast
101 lines (87 loc) · 3.65 KB
/
rest_request_fuseki.roast
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Accept: application/rdf+thrift
User-Agent: Apache-Jena-ARQ/3.11.0
Connection: Keep-Alive
Accept-Encoding: gzip,deflate
Host: localhost:3030
use url_prefix http://localhost:3030
# We could also use a POST request, but also with a string url encoded
# (as tirrible as below)
GET /sempic/?query=CONSTRUCT+%0A++%7B+%0A++++%3Chttp%3A%2F%2Ffr.uga.julioju.sempic%2FResourcesCreated%2Fuser%2Fanotheruser%3E+%3Fp+%3Fo+.%0A++%7D%0AWHERE%0A++%7B+%3Chttp%3A%2F%2Ffr.uga.julioju.sempic%2FResourcesCreated%2Fuser%2Fanotheruser%3E%0A++++++++++++++%3Fp++%3Fo%0A++%7D%0A
GET /sempic/?query=ASK%0AWHERE%0A++%7B+%3Chttp%3A%2F%2FwikidataJulioJuEntity%2Fentity%2FQ3083%3E%0A++++++++++++++%3Fp++%3Fo%0A++%7D%0A%0A
content-Type: application/sparql-update
# SO COOOOOOL: IT'S THE CASCADING DELETE I WANT
# When we delete a user, it its albums, and it deletes album's photo
POST /sempic << END
DELETE WHERE
{{
<http://fr.uga.julioju.sempic/ResourcesCreated/user/anotheruser> ?p1 ?o1 .
?s2 ?p2 ?o2 .
?s2 ?p3 <http://fr.uga.julioju.sempic/ResourcesCreated/user/anotheruser> .
?s3 ?p4 ?s2
}}
END
# FOLLOWING WORKS
POST /sempic << END
DELETE WHERE
{{
<http://fr.uga.julioju.sempic/ResourcesCreated/user/anotheruser> ?p ?o
}}
END
# FOLLOWING DOES NOT WORK
POST /sempic << END
DELETE WHERE
{{
?s ?p <http://fr.uga.julioju.sempic/ResourcesCreated/user/anotheruser> .
}}
END
# FOLLOWING DOES NOT WORK
POST /sempic << END
DELETE WHERE
{{
?s <http://miashs.univ-grenoble-alpes.fr/ontologies/sempic.owl#albumOwnerId> <http://fr.uga.julioju.sempic/ResourcesCreated/user/anotheruser> .
}}
END
# FOLLOWING DOES NOT WORK
POST /sempic << END
DELETE WHERE
{{
?s <http://miashs.univ-grenoble-alpes.fr/ontologies/sempic.owl#albumOwnerId> <http://fr.uga.julioju.sempic/ResourcesCreated/user/anotheruser>;
?property ?value
}}
END
# FOLLOWING DOES NOT WORK
POST /sempic << END
DELETE
{{
?s ?p ?o
}}
WHERE {{
<http://fr.uga.julioju.sempic/ResourcesCreated/user/anotheruser> ?p ?o.
}}
END
# ——————————————————————————————————————————————————————————————————————————————
User-Agent: Apache-Jena-ARQ/3.11.0
# Commented cause of https://github.com/sharat87/roast.vim/issues/14
# Transfer-Encoding: chunked
Content-Type: application/rdf+thrift
Host: http://localhost:3030
Connection: Keep-Alive
Accept-Encoding: gzip,deflate
# Error 400: Parse error: org.apache.thrift.protocol.TProtocolException: Required
# field 'S' was not present! Struct: RDF_Triple(S:null, P:null, O:null)
# When we check with Wireshark we see that the POST request sent by Jena is
# different of the following request.
# Following is the copy and past request from Wireshark (see
# README.md to check how to copy). But in Wireshark,
# in the pan of the bottom, we see than there is characters symbolise by
# « ..... » that are not on the following. Probably there are
# non ASCII characters. Note that « .. » symbolixe the « » character
# and when we copy and past it is rendered correctly.
# When we copy and past a request from Wireshark, if it's an UNICODE
# char it is correctly copy and past even if it is symbolised
# by « . » on Wireshark.
# Maybe they symbolize a chunked transfer ?
POST /sempic/?default << END
,5http://fr.uga.julioju.sempic/ResourcesCreated/album/1Jhttp://miashs.univ-grenoble-alpes.fr/ontologies/sempic.owl#albumOwnerLogin<>http://fr.uga.julioju.sempic/ResourcesCreated/user/anotheruser,5http://fr.uga.julioju.sempic/ResourcesCreated/album/1/http://www.w3.org/1999/02/22-rdf-syntax-ns#type@http://miashs.univ-grenoble-alpes.fr/ontologies/sempic.owl#Album
<<END