SPARQL Construct

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

SPARQL Construct

Rimel
Hello,

I'm new with Protege and SPARQL.

I have developed an ontology and then a SPARQL Construct Query as follows:

"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX :
<http://www.semanticweb.org/hp/ontologies/2018/4/untitled-ontology-27#>
CONSTRUCT { ?p :has-event ?hyp }
WHERE { ?p :id  ?ID.
?hyp :has-name ?name .
FILTER ((?ID = 456 ^^ xsd:integer) && (?name="hyperglycemia" ^^xsd:string))
}"

When I try to execute it I found some errors as shown in the attached
figure.

Thank you very much to help me in this

Best Regards
<http://protege-project.136.n4.nabble.com/file/t377087/issue.png>  



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: SPARQL Construct

Csongor Nyulas
Administrator
You  should not leave spaces before or after "^^"
Also, you may need to enclose 456 between double quotes (like "456") if
is followed by type specification.

Csongor


On 6/28/19 7:46 AM, Rimel wrote:

> Hello,
>
> I'm new with Protege and SPARQL.
>
> I have developed an ontology and then a SPARQL Construct Query as follows:
>
> "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> PREFIX owl: <http://www.w3.org/2002/07/owl#>
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
> PREFIX :
> <http://www.semanticweb.org/hp/ontologies/2018/4/untitled-ontology-27#>
> CONSTRUCT { ?p :has-event ?hyp }
> WHERE { ?p :id  ?ID.
> ?hyp :has-name ?name .
> FILTER ((?ID = 456 ^^ xsd:integer) && (?name="hyperglycemia" ^^xsd:string))
> }"
>
> When I try to execute it I found some errors as shown in the attached
> figure.
>
> Thank you very much to help me in this
>
> Best Regards
> <http://protege-project.136.n4.nabble.com/file/t377087/issue.png>
>
>
>
> --
> Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: SPARQL Construct

Rimel
Well done
*Thank you very much*




--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user