With the following snippet from the pizza ontology:
<owl:Class rdf:about="http://www.co-ode.org/ontologies/pizza/pizza.owl#Pizza">
<rdfs:subClassOf rdf:resource="http://www.co-ode.org/ontologies/pizza/pizza.owl#Food"/>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="http://www.co-ode.org/ontologies/pizza/pizza.owl#hasBase"/>
<owl:someValuesFrom rdf:resource="http://www.co-ode.org/ontologies/pizza/pizza.owl#PizzaBase"/>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:label xml:lang="en">Pizza</rdfs:label>
<rdfs:seeAlso rdf:resource="https://en.wikipedia.org/wiki/Pizza"/>
<skos:prefLabel xml:lang="en">Pizza</skos:prefLabel>
</owl:Class>
I see from this that the following triple exists: <Pizza, hasBase, PizzaBase> representing <subject, predicate, object>
How do I write SPARQL to extract the the PizzaBase object or any object from a triplet when the entity and relation are known?
Note: I am equating subject as entity and predicate as relation
Update: Let me simplify my question. Based on the given RDF above and the following RDF graph:
What would be the SPARQL to extract the PizzaBase entity given the Pizza entity and the hasBase relation?