Alex; If this is the same file as pizzal.owl in Composer's Examples
folder, nothing will match because there isn't any data that will
match your query.
If you are using Composer, the the SPARQL view will show that there
are some syntax errors in your query. SPARQL queries need to be
defined in triples, and you are most of the way there. But the data
structure for getting to owl:someValuesFrom is more complex. Open the
sub-forms in a Composer form to view this (hover over a value icon and
click the '+' that appears). The Graph view also lets you explore the
triples.
If the semantics of your query is to find all pizzas with a hot
topping, this can be expressed directly in a simple query:
SELECT ?targetPizza
WHERE {
?targetPizza :hasTopping :Hot .
}
If that's not what you're getting at, let us know what you're trying
to do.
If you need to apply OWL inferences first, then configure inferencing
for an OWL reasoner (Inference > Configure Inferencing) and turn on
the "Use Currently Configured Inferences" mode in the icon row for the
SPARQL view. Queries will then be applied to the results of the RDFS/
OWL/SPIN inferences you've configured for.
Of course, you'll need to assert some data in model to get either
inferences or values for your query.
-- Scott
On Apr 15, 4:09 pm, "alexey(dot)pavloff(at)gmail(dot)com"
<[email protected]> wrote:
> I'm trying to run SPARQL query against pizza ontology(http://www.co-
> ode.org/ontologies/pizza/pizza.owl#) in TBC ME
> , but it returns empty result. What am I missing?
>
> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
> PREFIX owl: <http://www.w3.org/2000/07/owl#>
> PREFIX p: <http://www.co-ode.org/ontologies/pizza/pizza.owl#>
> SELECT DISTINCT *
> WHERE
> { ?targetPizza rdfs:subClassOf _:pizza .
> _:pizza rdf:type owl:Restriction ;
> owl:onProperty p:hasTopping ;
> owl:someValuesFrom _:targetTopping .
> _:targetTopping owl:intersectionOf (p:PizzaTopping _:hotTopping) .
> _:hotTopping rdf:type owl:Restriction ;
> owl:onProperty p:hasSpiciness ;
> owl:someValueFrom p:Hot .
>
> }
>
> Thank you,
>
> Alex Pavlov
--
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
To unsubscribe, reply using "remove me" as the subject.