So, is there a simple away to say to delete the triples of the same pattern (?a 
?b ?c) in ALL the imported graphs?
Naicong

From: [email protected] [mailto:[email protected]] 
On Behalf Of Holger Knublauch
Sent: Friday, May 20, 2011 2:59 PM
To: [email protected]
Subject: Re: [topbraid-users] Question about DELETE

Yes, this is the expected behavior. If you just say DELETE { ?a ?b ?c } then 
the system will apply those changes to the default graph, which is the base 
model of the currently open file (without imports). In order to delete data 
from subgraphs, you need to explicitly mention those. In SPARQL 1.1 and TBC 3.5 
the syntax for that would be

            DELETE {
                        GRAPH <http://example.org/myimportedgraph> {
                                    ?a ?b ?c
                        }
            }

or in SPARQL 1.0 it was DELETE FROM <...>. And the Change History may report 
them because this is how Jena reports changes to the graphs (even if no delete 
has happened).

Holger


On May 21, 2011, at 7:02 AM, Li, Naicong wrote:


Thanks for your reply!

Now another related question.  I have a set of related ontologies each residing 
in a separate n3 file.  When I do a DELETE query, it seems that only the 
matching triples in the currently active n3 file get deleted, even though the 
Change History reports that all the matching triples in all the n3 files were 
deleted.  Is this an expected behavior?

Thanks.
Naicong

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Holger Knublauch
Sent: Thursday, May 19, 2011 3:21 PM
To: [email protected]<mailto:[email protected]>
Subject: Re: [topbraid-users] Question about DELETE

Naicong,

yes this is a known buglet. The underlying issue is that in the Jena API, 
Update queries go through a different factory than the queries, and if one of 
them fails then it's hard to guess which one the user is trying to enter - both 
throw parsing exceptions.

Thanks,
Holger


On May 20, 2011, at 7:56 AM, Li, Naicong wrote:



By the way, when you enter a query starting with DELETE, the first message you 
saw on the bottom status bar says: <image001.png>

Which could be misleading.

Naicong

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Li, Naicong
Sent: Thursday, May 19, 2011 2:51 PM
To: [email protected]<mailto:[email protected]>
Subject: RE: [topbraid-users] Question about DELETE

Thanks!
Naicong

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Gokhan Soydan
Sent: Thursday, May 19, 2011 2:48 PM
To: [email protected]<mailto:[email protected]>
Subject: Re: [topbraid-users] Question about DELETE

Naicong,

You also have to bind the ?label variable in the WHERE clause. So it should 
look like:
DELETE {
    ?I rdfs:label ?label .
}
WHERE {
   ?I a ZTest:C1 .
   ?l rdfs:label ?label .
}


Gokhan


On 5/19/2011 2:42 PM, Li, Naicong wrote:
Hi,

I have a question about using DELETE in a SPARQL query.  I have a test class 
ZTest:C1, which has an instance ZTest:C1_1, whose rdfs:label = "C1 1".  I 
entered the following query in the SPARQL query window to test deleting the 
triple: ZTest:C1_1 rdfs:label "C1 1" :

DELETE {
    ?I rdfs:label ?label .
}
WHERE {
   ?I a ZTest:C1 .
}

The query passed syntax checking, and executed, but it did not delete the 
rdfs:label triple for ZTest:C1_1 .

Am I doing something wrong?  I am using TopBraid ME 3.3.2.

Thanks for your help.
Naicong





--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]<mailto:[email protected]>
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]<mailto:[email protected]>
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]<mailto:[email protected]>
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]<mailto:[email protected]>
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]<mailto:[email protected]>
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]<mailto:[email protected]>
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]<mailto:[email protected]>
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to