On 02/06/15 19:06, Wojciech Ciesielski wrote:
W dniu 2015-06-02 o 19:33, Martynas Jusevičius pisze:
Can't you use a variable instead?
On Jun 2, 2015 7:17 PM, "Wojciech Ciesielski" <[email protected]> wrote:

Hi again :)

DELETE DATA

{
   GRAPH <http://przyklad.pl/>
   {
      _:asdfasd
         <http://przyklad.pl/TypObiektu#jest>
                 <http://przyklad.pl/TypObiektu#test>
   }
}

fuseki give me that error:
Error 400: Line 5, column 6: Blank nodes not allowed in DELETE
templates:
_:asdfasd
Fuseki - version 2.0.0 (Build date: 2015-03-08T09:49:20+0000)

It is any way too delete blank node from fuseki using SPARQL?
Or using usnig java ?
I know i can delete it from fuseki manualy.

Thanks

how ? that dont work also :(

DELETE DATA
{
   GRAPH <http://przyklad.pl/>
   {
      ?a
         <http://przyklad.pl/TypObiektu#jest>
                 <http://przyklad.pl/TypObiektu#test>
   }
}

Error 400: Variables not permitted in data quad

(INSERT|DELETE) DATA takes, well, data. Variables aren't data (things would all get a bit meta otherwise).

I think Martynas is suggesting the delete-template operation where you you find the blank node in some way.

e.g. If it has a unique key:

DELETE { ?b <http://przyklad.pl/TypObiektu#jest>
                <http://przyklad.pl/TypObiektu#test>  }
WHERE {
   ?b :inverseFunctionalProperty "key"
}

or some other way to find the ?b by a query pattern.

There is also the possibiluty of using an earlier query in ARQ/Fuseki because because IRI(?bnode) generates a <_:label> URI for the blank node that can be used again later.

        Andy




Fuseki - version 2.0.0 (Build date: 2015-03-08T09:49:20+0000)

http://www.w3.org/TR/2013/REC-sparql11-update-20130321/#deleteData
"
|/QuadData/| denotes triples to be removed and is as described in
|INSERT DATA
<http://www.w3.org/TR/2013/REC-sparql11-update-20130321/#insertData>|,
with the difference that in a |DELETE DATA| operation neither variables
nor blank nodes are allowed (see Notes 8+9 in the grammar
<http://www.w3.org/TR/sparql11-query/#sparqlGrammar>).

8. The |QuadData <http://www.w3.org/TR/sparql11-query/#rQuadData>| and
    |QuadPattern <http://www.w3.org/TR/sparql11-query/#rQuadPattern>|
    rules both use rule |Quads
    <http://www.w3.org/TR/sparql11-query/#rQuads>|. The rule |QuadData
    <http://www.w3.org/TR/sparql11-query/#rQuadData>|, used in |INSERT
    DATA| <http://www.w3.org/TR/sparql11-query/#rInsertData> and |DELETE
    DATA| <http://www.w3.org/TR/sparql11-query/#rDeleteData>, must not
    allow variables in the quad patterns.
9. Blank node syntax is not allowed in |DELETE WHERE
    <http://www.w3.org/TR/sparql11-query/#rDeleteWhere>|, the
    |DeleteClause <http://www.w3.org/TR/sparql11-query/#rDeleteClause>|
    for |DELETE|, nor in |DELETE DATA|
    <http://www.w3.org/TR/sparql11-query/#rDeleteData>.

"

:?


Reply via email to