Get data from external SMW by inline queries

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Get data from external SMW by inline queries

Wolfgang Fahl


you wrote:

> Dear SMW developers,
> Is there any known configuration, extension or "workaround" to get data from
> an external SMW (W1) by an inline query from another SMW (W2)?
> I am thinking of something like (query from W2) {{ #ask: [[W1:Category:Some
> concept]] | ?W1:Has definition }} where you register "W1" as an interwiki
> link prefix.
> Of course, I am aware of the InterWiki extension which enables querying
> external SPARQL endpoints.
> However, it is a mess to wrap query results by templates into convenient
> wiki pages similar to SMW inline query results.
> Beside the name of the "silver bullet" SMW extension for this linked-data
> feature I would also be happy about any idea "how to" or concern "why not"
> to develop such a feature.
> Looking forward to your comments,
> Yours,
> kai

My two cents would be that technically you'd like to query the triples
from another SMW instance. Those triples might be available as:
* SQLStore3 Triples
* RDF Triples
* Cargo Table content

Then you'd like to have a query that spans the triples of two Wiki
instances. A current workaround would be to create a third Wiki which
contains the content of both wikis.

If you'd only like to get to the query result it would be sufficient to
have a TripleStore that contains the content of both wikis.

With the ProfiWiki approach currently the Cargo and SQLStore3 access has
been tested for importing and exporting all Triples of an SMW Wiki in
SiDIF ( format.

A simplistic comparable approach is shown in

You can use this View to export all your triples to another SQL database
and Query with SQL as you see fit.

I am keen on also getting a true RDF backend for the SiDIF tripleStore
going and looking for volunteers to create an RDF adapter for - there are already
testcases to check the compatibility with some 13 other Triple formats.
There was an intention to add Apache Jena support and or Neo4J
and or Virtuoso. The SiDIF tripleStore is a simplistic implementation of
a very simple interface (which yet has to be recfactored as a separate
piece of sourcecode):

It has functions like:

public TripleQuery complement(TripleQuery otherQuery);
public TripleQuery intersect(TripleQuery otherQuery);
public TripleQuery union(TripleQuery other);
public List<Triple> getTriples();
public int size();

and is therefore fully implementation agnostic.

Since I don't use RDF backends in my environment it would be great to
have some collaborators here.



BITPlan - smart solutions
Wolfgang Fahl
Pater-Delp-Str. 1, D-47877 Willich Schiefbahn
Tel. +49 2154 811-480, Fax +49 2154 811-481
BITPlan GmbH, Willich - HRB 6820 Krefeld, Steuer-Nr.: 10258040548,
Geschäftsführer: Wolfgang Fahl

Semediawiki-devel mailing list
[hidden email]