Re: Find out in data if resources are connected

2021-02-12 Thread Martynas Jusevičius
SPARQL is based on pattern matching, so path traversal is not its strong point. You might want to try a different language like Gremlin. On Fri, 12 Feb 2021 at 15.05, Mikael Pesonen wrote: > > Sorry meant of course to find connections between known nodes, here x and > y: > > ASK { >

Re: Merging a massive amount of RDFs

2021-02-12 Thread emri mbiemri
Hi Mr.Huf, I think your advice worked fine for me. I have in the end on RDF/XML file which I think contains all the data from the other files. Thanks a lot. On Fri, Feb 12, 2021 at 3:43 PM Alexis Armin Huf wrote: > Hi, emri. > > In my experience with Jena I have observed that Graphs are more

Re: Merging a massive amount of RDFs

2021-02-12 Thread Samita Bai / PhD CS Scholar @ City Campus
Hello all, Can anyone suggest me any code for cleaning RDF data? Regards, Samita Get Outlook for Android From: Andy Seaborne Sent: Friday, February 12, 2021 6:59:55 PM To: users@jena.apache.org Subject: Re: Merging a massive amount of

Re: Find out in data if resources are connected

2021-02-12 Thread Mikael Pesonen
Sorry meant of course to find connections between known nodes, here x and y: ASK {       ((<>|!<>)|^(<>|!<>))*   } On 12/02/2021 15.30, Mikael Pesonen wrote: Hi, is there a more efficient way to find out if two entities are connected? This ASK {       ?s ((<>|!<>)|^(<>|!<>))* ?o   }

Re: Merging a massive amount of RDFs

2021-02-12 Thread Andy Seaborne
Yes, getting rid of the union model and using a single model to collect all the RDF is better. Have you detemined where the time is going? On reading or writing? You have a lot of files and starting up the XML parser is expensive let along the RDF/XML parser on top of that. If you have the

Re: Merging a massive amount of RDFs

2021-02-12 Thread Alexis Armin Huf
Hi, emri. In my experience with Jena I have observed that Graphs are more efficient than Models when there is too much data being iterated. Also, at every createUnion() call, your code is creating a new Union graph which in the end will yield a tree of 700 models that will potentially be

Find out in data if resources are connected

2021-02-12 Thread Mikael Pesonen
Hi, is there a more efficient way to find out if two entities are connected? This ASK {       ?s ((<>|!<>)|^(<>|!<>))* ?o   } works for short, couple of relations long, paths but becomes too slow quickly. Maybe something like the list:member method for RDF lists? BR Mikael

Re: Merging a massive amount of RDFs

2021-02-12 Thread emri mbiemri
Hi, the code is: -- public class RDFMerge { private static File folder; private static Model kg; // private static OutputStream out; public static void iterate() { folder = new File("C:\\Users\\Admin\\Desktop\\KG"); kg =

Re: Merging a massive amount of RDFs

2021-02-12 Thread Andy Seaborne
Hi there - the attachment didn't make it through. Could you include the code in the body of the message please? Or put in somewhere like a gist on github / pastebin /... and send a link. Andy On 12/02/2021 11:45, emri mbiemri wrote: Dear all, Do you know how I can merge some thousands

Merging a massive amount of RDFs

2021-02-12 Thread emri mbiemri
Dear all, Do you know how I can merge some thousands RDF models into a single one? I have tried it by iteration through all files within a folder and then using Jena's union function to merge them one by one! The problem is that the program is running for more than 13 hours and is still not