[Pellet-users] getting rid of ^^xsd:string with SPARQL?
Evren Sirin
evren at clarkparsia.com
Tue Mar 6 20:08:50 UTC 2007
On 3/6/07 7:29 AM, Olli wrote:
> Hi all,
>
> I hope this question is accepted in the mailinglist.
>
> I have following output by querying a BioPax ontology.
> Running query with PelletQueryEngine...
> -------------------------------------------------------
> | compname | receptor |
> =======================================================
> | "VDR-VD3"^^xsd:string | "VDR"^^xsd:string |
> | "VDR-9cRA"^^xsd:string | "VDR"^^xsd:string |
> | "(VDR-9cRA)-RXRα"^^xsd:string | "VDR"^^xsd:string |
> | "(VDR-VD3)-RXRα"^^xsd:string | "VDR"^^xsd:string |
> | "(VDR-9cRA)-(RXRα)"^^xsd:string | "VDR"^^xsd:string |
>
> I tried to create a query with excluding the ^^xsd:string tail, but I
> couldn't manage it.
> How would it be possible to define that as a SPARQL query?
> Is it possible?
> Or are there build in methods to use?
>
> Header of my ontology is:
>
> ?xml version="1.0"?>
> <rdf:RDF
> xmlns="http://www.biopax.org/release/biopax-level2.owl#"
> xmlns:p1="http://protege.stanford.edu/plugins/owl/protege#"
> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
> xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
> xmlns:owl="http://www.w3.org/2002/07/owl#"
> xml:base="http://www.biopax.org/release/biopax-level2.owl">
> <owl:Ontology rdf:about="">
> <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
> >This is version 1.0 of the BioPAX Level 2 ontology. The goal of
> the BioPAX group is to develop a common exchange format for biological
> pathway data. More information is available at http://www.biopax.org.
> This ontology is freely available under the LGPL
> (http://www.gnu.org/copyleft/lesser.html).</rdfs:comment>
> </owl:Ontology>.............
>
> ...and names are defined in following fashion:
>
> <SHORT-NAME
> rdf:datatype="http://www.w3.org/2001/XMLSchema#string>(FXR-ba)-(RXR)</SHORT-NAME>
>
> I tried a lot, but somehow I'm unable to overcome this task?!
>
I don't think what you want is possible in SPARQL. See the recent
discussion from Jena mailing list on this issue [1]. You either need to
change the way results are printed and strip the datatype URIs yourself
(note that there is a PelletQueryExample in the examples package that
shows the customization of SPARQL results) or change the data no to
have rdf:datatype attribute (since plain literals and xsd:string belong
to same value space this change would be harmless). Assuming you don't
have control over the ontology your best bet is the first option.
Cheers,
Evren
> thanks in advance
> Olli
> _______________________________________________
> Pellet-users mailing list
> Pellet-users at lists.owldl.com
> http://lists.owldl.com/mailman/listinfo/pellet-users
> _______________________________________________
>
> Sponsored by Clark & Parsia, LLC http://clarkparsia.com/
>
More information about the Pellet-users
mailing list