1 Reply Latest reply on Jan 26, 2015 10:49 PM by alwu-Oracle

    Passing literal as bind variable in jena

    M.E.R. van Boxel-Oracle

      Dear all,


      We are able to use bind variables using the RDFVID id. However if we want to check for a literal using the jena/joseki adapter we are not able to perform the same action. In our case the literal is of type string.


      We are using:

      * WLS

      * Jena adapter 2.11.1.

      * Joseki 3.4.4.

      * ARQ 2.9.2.


      We try to run the following query on the joseki end-point.


      PREFIX foaf: <http://xmlns.com/foaf/0.1/>

      PREFIX vcard: <http://www.w3.org/2001/vcard-rdf/3.0#>

      PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

      PREFIX oext: <http://oracle.com/semtech/jena-adaptor/ext/function#>

      PREFIX ORACLE_SEM_FS_NS: <http://oracle.com/semtech#no_fall_back,ALLOW_DUP=T,s2s>

      PREFIX ORACLE_SEM_HT_NS: <http://oracle.com/semtech#monitor>

      PREFIX ORACLE_SEM_UEAP_NS: <http://oracle.com/semtech#f$RDFVID%20in(ORACLE_ORARDF_RES2VID(?))>

      PREFIX ORACLE_SEM_UEPJ_NS: <http://oracle.com/semtech#f$RDFVID>

      PREFIX ORACLE_SEM_UEBV_NS: <http://oracle.com/semtech#"Lee">



      SELECT ?f


      { graph ?g { ?p vcard:N ?vn .

         ?vn vcard:Family ?f .

          ?p foaf:title "Sen." .}



      The result set is empty. Replacing the line 'PREFIX ORACLE_SEM_UEBV_NS: <http://oracle.com/semtech#"Lee">' by any variant is either given an error or the empty set. (Some variants are (&quot;Lee&quot; , Lee, "Lee", &#39;Lee&#39; )


      When we use the generated SQL from jena/joseki, we are able to get the right result if we run the same query in SQLDeveloper. The bind variable we have to use is "Lee" (the bind variable has the quotations included). This will give the correct result set back.


      Kind regards,