Question

i've this piece of ontology:

<NamedIndividual rdf:about="&titan;BE_Digit_Photo_Srl">
        <rdf:type rdf:resource="&v1;BusinessEntity"/>
        <Process:name>Digit Photo Srl</Process:name>
        <v1:category>E-Commerce</v1:category>
        <schema:description>a simple description</schema:description>
        <v1:offers rdf:resource="&titan;Offer_DigitFoto_Nikon_Coolpix_P520_1"/>
</NamedIndividual>

Now how can I get Process:name, v1:category and schema:description of a given BE_Digit_Photo_Srl individual via SPARQL query?

I'm a newbie with SPARQL and ontologies, so please help me. Thanks in advance

EDIT I've solved in this way:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX gr: <http://purl.org/goodrelations/v1#>
PREFIX v1: <http://www.ebusiness-unibw.org/ontologies/consumerelectronics/v1#>
PREFIX process: <http://localhost:8080/OntologyRepository/Process.owl#>
PREFIX schema: <http://schema.org/>
SELECT ?name ?desc ?cat ?offers
 WHERE { ?individual  process:name  ?name .
 ?individual  schema:description  ?desc .
 ?individual  gr:category  ?cat. 
 ?individual gr:offers ?offers.
 FILTER regex(str(?individual), 'BE_Digit_Photo_Srl', 'i') }

I hope it helps another user :)

Was it helpful?

Solution

I've solved in this way:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX gr: <http://purl.org/goodrelations/v1#>
PREFIX v1: <http://www.ebusiness-unibw.org/ontologies/consumerelectronics/v1#>
PREFIX process: <http://localhost:8080/OntologyRepository/Process.owl#>
PREFIX schema: <http://schema.org/>
SELECT ?name ?desc ?cat ?offers
 WHERE { ?individual  process:name  ?name .
 ?individual  schema:description  ?desc .
 ?individual  gr:category  ?cat. 
 ?individual gr:offers ?offers.
 FILTER regex(str(?individual), 'BE_Digit_Photo_Srl', 'i') }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top