Re: [Tracker] tracker-sparql dbus sparql results



;-) just found out how i can do this myself... i'll provide a patch for tracker-resource.vala during the next coming days, just in case some finds this interesting..

wkr turnguard

| 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-17 21:40 GMT+02:00 Jürgen Jakobitsch <j jakobitsch semantic-web at>:
hi ivan, thanks for you replay...

i'm translating the the values (literals, uris, ...) in my wrapper at the moment... but parsing strings can go wrong sometimes...
i also just read about dbus types (aas) [1].

there could be an easy workaround, which would make the calls more user friendly, but it would have to be in a future release on the tracker side, where the information is apparently still available.

you could return 

<${uriString}> for URIs (e.g.: "<http://example.org/some/path>")
_:${bNodeId} for BNodes (e.g.: "_:xpd154")
"${literalString}" for untyped literals (e.g.: ""plain literal"")
"${literalString}"@${language} for language tagged literals (e.g.: ""plain english text"@en")
"${literalString}"^^<${dataTypeURIString}> for typed literal (e.g.: ""2014-03-30T14:32:09Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>")

this way tracker could stay with "aas" response (Vector<Vector<String>>) is still return rdf term information. this would also correspond to rdf formats like turtle [1]. 
can i add this as a feature request somewhere?

wkr turnguard



| 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-17 20:14 GMT+02:00 Ivan Frade <ivan frade gmail com>:

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..



| 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






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