This content has been marked as final.
Show 8 replies
-
1. Re: Jena adaptor for 11g Release 2 with 11.1.0.7 database
630782 Dec 4, 2009 3:28 PM (in response to 630782)It looks that if I put the variable used by the FILTER in the Select clause also then the query will return the result.
Here is the original query won't return result.
PREFIX bp:<http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?entity ?predicate ?object
WHERE
{
?entity rdf:type bp:Protein .
?entity bp:name ?name
FILTER ( regex(?name, ".*AKR1B1.*", "i") )
?entity ?predicate ?object .
}
After I changed the Select clause to "SELECT ?entity ?predicate ?object ?name" the query returns the expected result.
I'm wondering if the same behavior will happen also when using the new Jena adaptor with 11.2 database.
Thanks,
Weihua -
2. Re: Jena adaptor for 11g Release 2 with 11.1.0.7 database
630782 Dec 4, 2009 3:31 PM (in response to 630782)Missed '*' in the regular expression. It should be FILTER ( regex(?name, ".\*AKR1B1.\*", "i") )
Edited by: user627779 on Dec 4, 2009 7:31 AM -
3. Re: Jena adaptor for 11g Release 2 with 11.1.0.7 database
alwu-Oracle Dec 4, 2009 3:38 PM (in response to 630782)Hi,
Could you please cut & paste your query?
Thanks,
Zhe Wu -
4. Re: Jena adaptor for 11g Release 2 with 11.1.0.7 database
630782 Dec 4, 2009 4:02 PM (in response to alwu-Oracle)PREFIX bp:<http://www.biopax.org/release/biopax-level3.owl#>
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?entity ?predicate ?object
WHERE
{
?entity rdf:type bp:Protein .
?entity bp:name ?name
FILTER ( regex(?name, ".\*AKR1B1.\*", "i") )
?entity ?predicate ?object .
}
Thanks,
Weihua -
5. Re: Jena adaptor for 11g Release 2 with 11.1.0.7 database
alwu-Oracle Dec 4, 2009 7:08 PM (in response to 630782)Hi Weihua,
Doe it make a difference if you add the following JVM property when you execute your Java command?
-Doracle.spatial.rdf.client.jena.projVarOpt=false
Thanks,
Zhe Wu -
6. Re: Jena adaptor for 11g Release 2 with 11.1.0.7 database
630782 Dec 4, 2009 8:14 PM (in response to alwu-Oracle)Hi Alan,
Thanks for the info. The query works fine with that property set.
Is there any place for a complete list of all the available properties for the new Jena adaptor?
Has the new Jena adaptor been tested against 11.1.0.7/11.1.0.6 database? If so any known issues?
Thanks a lot for the help,
Weihua -
7. Re: Jena adaptor for 11g Release 2 with 11.1.0.7 database
alwu-Oracle Dec 4, 2009 8:53 PM (in response to 630782)Hi,
You encounter this problem because there is no SPARQL FILTER support in 11.1.0.7. The latest Jena Adaptor first converts the whole query into a single SEM_MATCH and that SEM_MATCH fails simply because 11.1.0.7 has no support of FILTER.
The fall-back mechanism (built inside the latest Jena Adaptor) kicks in and Jena's own op executor is used to execute the query. The query is now broken into pieces and one of our projection optimizations is a bit too optimistic. Fortunately there is an easy way to disable it.
Available properties will be provided on a need basis. This is to keep things simple and manageable.
We do not recommend using the latest Jena Adaptor (for Release 11.2) with 11.1.0.6 because 11.1.0.6 does not have OPTIONAL.
If you need to use the latest Jena Adaptor with 11.1.0.7 and your query has FILTER inside, you can either use the JVM property or you can try the ORACLE_SEM_AP_NS setting which allows you to specify additional predicates.
http://download.oracle.com/docs/cd/E11882_01/appdev.112/e11828/sem_jena.htm
Thanks,
Zhe Wu -
8. Re: Jena adaptor for 11g Release 2 with 11.1.0.7 database
630782 Dec 4, 2009 9:11 PM (in response to alwu-Oracle)Thanks for the helpful info.
Weihua