- From: Aidan Hogan <aidan.hogan@deri.org>
- Date: Wed, 09 Nov 2011 15:09:27 +0000
- To: Christian Morbidoni <christian.morbidoni@gmail.com>
- CC: Irene Celino <irene.celino@gmail.com>, semantic-web@w3.org
To add to Irene's answer, you can also do negation-as-failure in SPARQL (1.0): PREFIX ... SELECT ?s WHERE ?s { ?s ?p ?o . OPTIONAL { ?s a ?type . FILTER (?type != rdfs:Resource) } FILTER (!bound(?type)) } (BTW, not sure what you mean by "auto-typing" here unless maybe you mean through something like the rdfs4* rules.) On 08/11/2011 18:05, Irene Celino wrote: > If you're using SPARQL 1.1, you can use FILTER NOT EXISTS or MINUS, > see: http://www.w3.org/TR/sparql11-query/#negation > > HTH, > Irene > > Il 08 novembre 2011 17:23, Christian Morbidoni > <christian.morbidoni@gmail.com> ha scritto: >> Hi all, >> I'm trying to build a SPARQL query that selects all the resources that are >> ONLY rdfs:Resources (untyped let's say). >> What I need is to identify those resources that do not have an explicit >> rdf:type, thus are of rdf:type rdfs:Resource. >> In the past I did it in Serql using the MINUS construct...but when it comes >> to sparql I don't know how to solve it... >> Could anyone help me out please? >> best, >> Christian > > >
Received on Wednesday, 9 November 2011 15:09:57 UTC