Re: [Tracker] tracker-sparql dbus sparql results



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi Jürgen,

In that case you should use the Steroids1 DBus object which works by
passing file descriptors and pipe(). I'm guessing that in Java you can
use the type FileDescriptor to turn that to a InputStream.

https://git.gnome.org/browse/tracker/tree/src/tracker-store/tracker-steroids.vala

Steroid1's protocol that goes over pipe()/vmsplice() already passes
the variable-names and column-types over.

Usage of Resources1 is very slow and on top it's not really a
supported interface. Resources1 is actually only for the GraphUpdated
signal, which is the only officially supported interface that the DBus
object exports.

The Steroids1 DBus object is going to stay and is used for write
queries and fallback for libtracker-sparql in case WAL direct access
mode can't be used.

Kind regards,

Philip


Jürgen Jakobitsch schreef op 18/04/2014 15:53:
hi philipp,

i'm currently using the dbus resource because i'm writing the
openrdf repository in java and didn't want to got down the jni, jna
road...

i already have built in a switch in tracker-resource.vala, about
here [1], testing the cursor.get_value_type, but the returned
value_types are not totally correct. for some uris the value is 1
for other uris the value type is 2... i'm gonna issue a bug report,
as soon as i have verified, that i'm not doing something wrong.. 
also the returned value_types are only 1 or 2.. there are not other
values (like bnode, double, date...) although the returned string
suggest they should be used..

wkr turnguard

[1] 
https://git.gnome.org/browse/tracker/tree/src/tracker-store/tracker-resources.vala#n102

 | Jürgen Jakobitsch, | Software Developer | Semantic Web Company
GmbH | Mariahilfer Straße 70 / Neubaugasse 1, Top 8 | A - 1070
Wien, Austria | Mob +43 676 62 12 710 | Fax +43.1.402 12 35 - 22

COMPANY INFORMATION | web       : http://www.semantic-web.at/ |
foaf      :
http://company.semantic-web.at/person/juergen_jakobitsch PERSONAL
INFORMATION | web       : http://www.turnguard.com | foaf      :
http://www.turnguard.com/turnguard | g+        :
https://plus.google.com/111233759991616358206/posts | skype     :
jakobitsch-punkt | xmlns:tg  =
"http://www.turnguard.com/turnguard#";


2014-04-18 11:32 GMT+02:00 Philip Van Hoof <philip codeminded be>:


get_value_type and get_variable_name:


https://git.gnome.org/browse/tracker/tree/src/libtracker-sparql/tracker-cursor.vala#n126



https://git.gnome.org/browse/tracker/tree/src/libtracker-sparql/tracker-cursor.vala#n139

 You btw shouldn't use the DBus Resources1 object, but use 
libtracker-sparql instead.


Ivan Frade schreef op 17/04/2014 20:14:
Hi Jürgen,

Yes, tracker does not return bindingNames or types of the
resulting nodes. It assumes the client takes care of
interpreting the results of its query.

A workaround would be to parse the SparQL in the wrapper and
add that information when translating the DBus result set to
the openrdf format. The binding Names can be added straight
forward from the SELECT of the query. The type information is
more complicated to deduce, based on the position in the
query and/or the rdfs:range of the properties (defined in the
ontology).

Regards,

Ivan


On Thu, Apr 17, 2014 at 10:11 AM, Jürgen Jakobitsch < 
j jakobitsch semantic-web at> wrote:

hi,

i'm currently developing an openrdf [1] repository
implementation with a tracker-sparql backend via dbus. this
will enable java developers to include tracker-sparql
results in any application (or create a sparql endpoint)
extremly easily. openrdf's api is quite common in the
semweb community..

everything is working very nice already  the only trouble
i'm having is that i get a vector of vectors containing
simple strings as a result object, meaning i need to find
out types (literals, uris, bnodes, typed literals)..

is there any known way to retrieve some more information in
the results given via dbus? also bindingNames are
missing...

any pointer really appreciated wkr turnguard..


[1] http://www.openrdf.org/

| Jürgen Jakobitsch, | Software Developer | Semantic Web
Company GmbH | Mariahilfer Straße 70 / Neubaugasse 1, Top 8
| A - 1070 Wien, Austria | Mob +43 676 62 12 710 | Fax
+43.1.402 12 35 - 22

COMPANY INFORMATION | web       :
http://www.semantic-web.at/ | foaf      : 
http://company.semantic-web.at/person/juergen_jakobitsch
PERSONAL INFORMATION | web       : http://www.turnguard.com
| foaf      : http://www.turnguard.com/turnguard | g+
: https://plus.google.com/111233759991616358206/posts |
skype     : jakobitsch-punkt | xmlns:tg  = 
"http://www.turnguard.com/turnguard#";

_______________________________________________
tracker-list mailing list tracker-list gnome org 
https://mail.gnome.org/mailman/listinfo/tracker-list





_______________________________________________ tracker-list 
mailing list tracker-list gnome org 
https://mail.gnome.org/mailman/listinfo/tracker-list






_______________________________________________ tracker-list
mailing list tracker-list gnome org 
https://mail.gnome.org/mailman/listinfo/tracker-list


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTUYVcAAoJEEP2NSGEz4aD1eAH/j59ejV3/wkgPzUR22trrNOj
KqFBT1YRP9631NyZmphdP5q3giRnihBEjkLjF1P46eqOoO6zhRP8jo/qj64amHW8
nUZ96/21ZBPp0kNeKij5vjIq5SxrqSAh6n4e0VQTP/rpwm70OoCz9h/6yKskk9Ln
EUYIHb3b4T1YUPHleuJ2SkFNsDgx71MmT2nXvCzKxf2DSB9XGupOCysPPuPbxEBf
4QofLlZmbyxiftz+Hb0g6PLFm0SFIAxGz1sWVVZHoxy7Ff2+xMrrFl3p+3ktlx6w
kZkqN7cEcqdzxzNqzqGlB7i67wIHfN3OtYMbhaZlt3UsfAsvKSRDbl/LONuilkM=
=D9Uo
-----END PGP SIGNATURE-----


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]