Re: query two RDF graphs

Jan Wielemaker <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 01/16/2014 09:36 AM, atom meta wrote:
> Hi,
>
> I am loading two RDF graphs and what I want to do is query them both at the
> same time.
> rdf_load( FilePaths, [ graph(graphInstance) ] )
> rdf_load( FilePaths, [ graph(graphInstance) ] )
>
> So, I tried like :
> rdf(X,_,_,[graphSchema, graphInstance]).
>
> but it didn't work, how could I do it?

May be loading multiple files in a single should be supported. 
Actually, you can do this using something like this (untested,
`cat' is Unix).

	?- open(pipe('cat *.ttl'), read, In),
	   rdf_load(In, [graph(graphInstance)]).

The query alternative is:

	rdf(S,P,O,graph1) ; rdf(S,P,O,graph2).

	Cheers --- Jan

>
> Batselem
> -------------- next part --------------
> HTML attachment scrubbed and removed
> _______________________________________________
> SWI-Prolog mailing list
> [email protected]
> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.