Leonard,

First, you could also run SELECT like the following to review what restrictions to delete.

SELECT ?c ?r ?p ?o
WHERE {
    ?c rdfs:subClassOf ?r .
    ?r a owl:Restriction .
    ?r ?p ?o .
}

Gokhan

On 5/17/2011 12:06 PM, Irene Polikoff wrote:

Something like this should work

DELETE {?r ?p ?o .

?c rdfs:subClassOf ?r .}

WHERE {?r owl:onProperty ?prop.

?r ?p ?o .

?c rdfs:subClassOf ?r .}

I always recommend running CONSTRUCT before doing the delete. This way you will be able to review all triples that are about to be deleted.

Irene

*From:*[email protected] [mailto:[email protected]] *On Behalf Of *Leonard Jacuzzo
*Sent:* Tuesday, May 17, 2011 1:01 PM
*To:* [email protected]
*Subject:* [topbraid-users] SPARQL help.

Hi all,

Once again I would like to take advantage of your collective wisdom. I have created an ontology with several hundred classes, which are characterized by relations to restrictions on properties, i.e., anonymous classes. Unfortunately, once I was finished, I discovered that I made a particular error for each class definition.


So I need to delete the erroneous triples and replace each with the appropriate value for each.

My strategy was to select them all and then delete them all via SPARQL. But I cannot figure out how to write the query as it involves restrictions on properties and anonymous classes.

Each class has a subclass relation as follows:

rdfs:subClassOf

[ a owl:Restriction ;

owl:hasValue "0.087"^^xsd:string ;

owl:onProperty :hasBO_Target

]


Each will have a unique value as well.

So how do I find all of these triples?

Any help will be greatly appreciated.

Best wishes,

Leonard

--
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

--
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

--
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