[redland-dev] Java Language Bindings for SPARQL?
Dave Beckett
dave at dajobe.org
Thu Sep 28 02:29:25 UTC 2006
David Wood wrote:
> Hi all,
>
> I am creating a NetKernel (http://1060.org) module for Redland using
> Redland's Java language bindings. Unfortunately, my installation has no
> references to the C function librdf_new_query, except in
> org/librdf/redland/core.java. That file contains:
>
> public final static native long librdf_new_query(long jarg1, String
> jarg2, long jarg3, String jarg
> 4, long jarg5);
>
> But there is no other reference to an implementation:
>
> [mackerel:redland]$ grep -il query *.java
> core.java
> [mackerel:redland]$ ls
> Hash.class Makefile.am Node.java Statement.class
> Stream.java core.class
> Hash.java Makefile.in Parser.class Statement.java
> URI.class core.java
> Iterator.class Model.class Parser.java Storage.class
> URI.java core.java.in
> Iterator.java Model.java Serializer.class Storage.java World.class
> Makefile Node.class Serializer.java Stream.class World.java
> [mackerel:redland]$
Sure, but it's a native function in the C librdf library.
> Access to the function librdf_new_query is necessary to process SPARQL
> and RDQL queries, which is pretty much what I am trying to accomplish
> :) The Perl bindings have the wrapper for this function in
> .../RDF/Redland/Query.pm.
>
> Did I miss something during the build process? Is there something I
> should have added to this configure line when building the language
> bindings?
>
> ./configure --with-java --with-perl --with-jdkdir=/Library/Java/Home/
>
> I built redland-1.0.4 and redland-bindings-1.0.4.1 on Mac OS X.4.7 using
> Apple's Java 1.5.0_06.
It seems to be in the Java bindings in Subversion last touched in June 2006:
Query.java:
public Query (World world, String s, URI base_uri, String query_language,
URI query_uri)
{
this.world=world;
long ibase_uri=(base_uri != null) ? base_uri.__get_object() : 0;
long iquery_uri=(query_uri != null) ? query_uri.__get_object() : 0;
this.object=core.librdf_new_query (world.__get_object(),
query_language, iquery_uri, s, ibase_uri);
}
which I added after the 1.0.4.1 release.
So you should be able to grab it from subversion. Instructions are at
http://svn.librdf.org/
Dave
More information about the redland-dev
mailing list