I try to do:

SELECT DISTINCT ?genotypingstudy_id_gs ?germplasm_name WHERE {
FILTER (?genotypingstudy_id_gs = "^.*$").
?genotypingstudy_id_genotypingstudy vocab:genotypingstudy_id_genotypingstudy ?genotypingstudy_id_gs. ?genotypingstudy_id_genotypingstudy vocab:genotypingstudy_id_germplasm ?genotypingstudy_id_germplasm.
?genotypingstudy_id_germplasm vocab:germplasm_name ?germplasm_name.
}

and it doesn't work :-(


Le 12/05/2011 15:12, Diogo FC Patrao a écrit :
I guess you just have to write

FILTER ( ?whateverpropertytheprimarykeyismappedinto = yourvaluehere )

or maybe I didn't understand well what you're after.
--
diogo patrão



On Thu, May 12, 2011 at 6:16 AM, Julien Wollbrett <[email protected] <mailto:[email protected]>> wrote:

    Hi,

    I have a D2RQ mapping file annotated with ontological concepts. I
    use this mapping file to start a D2R-Server and I create SPARQL
    queries to interrogate my database.
    I have a problem to create my SPARQL queries and more precisely I
    have a problem to deal with primary key values.
    When I filter the value of an attribut, I use the FILTER option of
    SPARQL. But I can't use this FILTER option to filter a primary key
    value.

    *_Example:

    _*_Query with a filter option_
    SELECT DISTINCT ?genotypingstudy_id_gs ?germplasm_name WHERE {
    FILTER regex(?genotypingstudy_id_gs,"^.*$").
    ?genotypingstudy_id_genotypingstudy
    vocab:genotypingstudy_id_genotypingstudy ?genotypingstudy_id_gs.
    ?genotypingstudy_id_genotypingstudy
    vocab:genotypingstudy_id_germplasm ?genotypingstudy_id_germplasm.
    ?genotypingstudy_id_germplasm vocab:germplasm_name ?germplasm_name.
    }

    _SQL model_
    genotypingstudy(_id_genotypingstudy,_ #id_germplasm)
    germplasm(_id_germplasm_, name)

    Do you have any idea how to filter value of a primary key into a
    SPARQL query?

    Regards



    
------------------------------------------------------------------------------
    Achieve unprecedented app performance and reliability
    What every C/C++ and Fortran developer should know.
    Learn how Intel has extended the reach of its next-generation tools
    to help boost performance applications - inlcuding clusters.
    http://p.sf.net/sfu/intel-dev2devmay
    _______________________________________________
    d2rq-map-devel mailing list
    [email protected]
    <mailto:[email protected]>
    https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel



------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
d2rq-map-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel

Reply via email to