| 1 |
# Multiple update operations in one file with ;s to separate |
| 2 |
|
| 3 |
ADD DEFAULT TO <http://example.org/named> |
| 4 |
; |
| 5 |
|
| 6 |
ADD SILENT <http://example.org/named1> TO <http://example.org/named2> |
| 7 |
; |
| 8 |
|
| 9 |
WITH <http://graph.example.org> DELETE { ?s ?p ?o } WHERE { ?s ?p ?o } |
| 10 |
|
| 11 |
; |
| 12 |
|
| 13 |
|
| 14 |
CLEAR GRAPH <http://graph.example.org> |
| 15 |
|
| 16 |
; |
| 17 |
|
| 18 |
|
| 19 |
COPY DEFAULT TO <http://example.org/named> |
| 20 |
; |
| 21 |
|
| 22 |
COPY SILENT <http://example.org/named1> TO <http://example.org/named2> |
| 23 |
; |
| 24 |
|
| 25 |
|
| 26 |
PREFIX dc: <http://purl.org/dc/elements/1.1/> |
| 27 |
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> |
| 28 |
|
| 29 |
DELETE |
| 30 |
{ ?book ?p ?v } |
| 31 |
WHERE |
| 32 |
{ ?book dc:date ?date . |
| 33 |
FILTER ( ?date < "2000-01-01T00:00:00-02:00"^^xsd:dateTime ) |
| 34 |
?book ?p ?v |
| 35 |
} |
| 36 |
; |
| 37 |
|
| 38 |
|
| 39 |
PREFIX foaf: <http://xmlns.com/foaf/0.1/> |
| 40 |
|
| 41 |
WITH <http://example/addresses> |
| 42 |
DELETE { ?person foaf:firstName 'Fred'; |
| 43 |
?property ?value } |
| 44 |
; |
| 45 |
|
| 46 |
|
| 47 |
# Defined above |
| 48 |
# PREFIX dc: <http://purl.org/dc/elements/1.1/> |
| 49 |
|
| 50 |
DELETE DATA |
| 51 |
{ <http://example/bookx> dc:title "David Copperfield" ; |
| 52 |
dc:creator "Edmund Wells" . |
| 53 |
} |
| 54 |
; |
| 55 |
|
| 56 |
|
| 57 |
# Defined above |
| 58 |
# PREFIX dc: <http://purl.org/dc/elements/1.1/> |
| 59 |
|
| 60 |
DELETE DATA |
| 61 |
{ GRAPH <http://example/bookStore> { <http://example/book3> dc:title "Fundamentals of Compiler Desing" } } |
| 62 |
|
| 63 |
; |
| 64 |
|
| 65 |
INSERT DATA |
| 66 |
{ GRAPH <http://example/bookStore> { <http://example/book3> dc:title "Fundamentals of Compiler Design" } } |
| 67 |
; |
| 68 |
|
| 69 |
|
| 70 |
# Defined above |
| 71 |
# PREFIX foaf: <http://xmlns.com/foaf/0.1/> |
| 72 |
|
| 73 |
WITH <http://example/addresses> |
| 74 |
DELETE { ?person foaf:firstName 'Bill' } |
| 75 |
INSERT { ?person foaf:firstName 'William' } |
| 76 |
WHERE |
| 77 |
{ ?person a foaf:Person . |
| 78 |
?person foaf:firstName 'Bill' |
| 79 |
} |
| 80 |
; |
| 81 |
|
| 82 |
|
| 83 |
PREFIX foaf: <http://xmlns.com/foaf/0.1/> |
| 84 |
|
| 85 |
DELETE WHERE { ?person foaf:firstName 'Fred'; |
| 86 |
?property ?value } |
| 87 |
|
| 88 |
; |
| 89 |
|
| 90 |
|
| 91 |
PREFIX foaf: <http://xmlns.com/foaf/0.1/> |
| 92 |
|
| 93 |
DELETE WHERE { |
| 94 |
GRAPH <http://example.com/names> { |
| 95 |
?person foaf:firstName 'Fred' |
| 96 |
} . |
| 97 |
GRAPH <http://example.com/addresses> { |
| 98 |
?person ?property ?value |
| 99 |
} |
| 100 |
} |
| 101 |
; |
| 102 |
|
| 103 |
|
| 104 |
DROP GRAPH <http://graph.example.org> |
| 105 |
; |
| 106 |
|
| 107 |
|
| 108 |
DROP SILENT GRAPH <http://graph.example.org> |
| 109 |
; |
| 110 |
|
| 111 |
|
| 112 |
# Defined above |
| 113 |
# PREFIX dc: <http://purl.org/dc/elements/1.1/> |
| 114 |
# PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> |
| 115 |
|
| 116 |
INSERT |
| 117 |
{ GRAPH <http://example/bookStore2> { ?book ?p ?v } } |
| 118 |
WHERE |
| 119 |
{ GRAPH <http://example/bookStore> |
| 120 |
{ ?book dc:date ?date . |
| 121 |
FILTER ( ?date < "2000-01-01T00:00:00-02:00"^^xsd:dateTime ) |
| 122 |
?book ?p ?v |
| 123 |
} |
| 124 |
} |
| 125 |
; |
| 126 |
|
| 127 |
|
| 128 |
# Defined above |
| 129 |
# PREFIX dc: <http://purl.org/dc/elements/1.1/> |
| 130 |
PREFIX dcmitype: <http://purl.org/dc/dcmitype/> |
| 131 |
# PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> |
| 132 |
|
| 133 |
INSERT |
| 134 |
{ GRAPH <http://example/bookStore2> { ?book ?p ?v } } |
| 135 |
WHERE |
| 136 |
{ GRAPH <http://example/bookStore> |
| 137 |
{ ?book dc:date ?date . |
| 138 |
FILTER ( ?date < "2000-01-01T00:00:00-02:00"^^xsd:dateTime ) |
| 139 |
?book ?p ?v |
| 140 |
} |
| 141 |
} |
| 142 |
|
| 143 |
; |
| 144 |
|
| 145 |
WITH <http://example/bookStore> |
| 146 |
DELETE |
| 147 |
{ ?book ?p ?v } |
| 148 |
WHERE |
| 149 |
{ ?book dc:date ?date ; |
| 150 |
dc:type dcmitype:PhysicalObject . |
| 151 |
FILTER ( ?date < "2000-01-01T00:00:00-02:00"^^xsd:dateTime ) |
| 152 |
?book ?p ?v |
| 153 |
} |
| 154 |
|
| 155 |
; |
| 156 |
|
| 157 |
INSERT { <http://example.org/subject> |
| 158 |
<http://example.org/predicate> |
| 159 |
<http://example.org/object> |
| 160 |
} |
| 161 |
; |
| 162 |
|
| 163 |
# Defined above |
| 164 |
# PREFIX dc: <http://purl.org/dc/elements/1.1/> |
| 165 |
INSERT DATA |
| 166 |
{ <http://example/book3> dc:title "A new book" ; |
| 167 |
dc:creator "A.N.Other" . |
| 168 |
} |
| 169 |
; |
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
LOAD <http://example.org/> |
| 174 |
; |
| 175 |
|
| 176 |
|
| 177 |
LOAD <http://example.org/> INTO <http://graph.example.org/> |
| 178 |
; |
| 179 |
|
| 180 |
|
| 181 |
LOAD <http://example.org/> INTO DEFAULT |
| 182 |
; |
| 183 |
|
| 184 |
|
| 185 |
LOAD <http://example.org/1> <http://example.org/2> INTO <http://graph.example.org/> |
| 186 |
; |
| 187 |
|
| 188 |
|
| 189 |
MOVE DEFAULT TO <http://example.org/named> |
| 190 |
; |
| 191 |
|
| 192 |
MOVE SILENT <http://example.org/named1> TO <http://example.org/named2> |
| 193 |
; |
| 194 |
|