Disable preserve bnode IDs and still use bnode IDs from Sesame

瀏覽次數:5 次
跳到第一則未讀訊息

Håvard Ottestad

未讀,
2017年2月2日 上午8:33:332017/2/2
收件者:Stardog
Hi,

I've had to disable preserve bnode IDs so I could load in a bunch of turtle files that had blank nodes in them.

Now I'm having trouble with .remove() operations through a Sesame repository. It won't remove triples with blank nodes. 

My approach is:
 1. Find triples to remove
 2. Collect them in a list
 3. Call connection.remove(list) to remove the triples

With preserve bnode IDs = true, this works fine. When I disable preserve bnode IDs, it only removes triples without blank nodes.

Is there any way to get the best of both worlds? No preserve bnode IDs for loading turtle from CLI, and preserve bnode IDs from Sesame.

Cheers,
Håvard

Michael Grove

未讀,
2017年2月3日 上午11:11:572017/2/3
收件者:stardog
On Thu, Feb 2, 2017 at 8:33 AM, Håvard Ottestad <hmott...@gmail.com> wrote:
Hi,

I've had to disable preserve bnode IDs so I could load in a bunch of turtle files that had blank nodes in them.

Now I'm having trouble with .remove() operations through a Sesame repository. It won't remove triples with blank nodes. 

My approach is:
 1. Find triples to remove
 2. Collect them in a list
 3. Call connection.remove(list) to remove the triples

With preserve bnode IDs = true, this works fine. When I disable preserve bnode IDs, it only removes triples without blank nodes.

Right, because without preserving bnode ids, there's no way to know if the triples you are removing that use bnodes represent the same ones in the database. This is the expected behavior.
 

Is there any way to get the best of both worlds? No preserve bnode IDs for loading turtle from CLI, and preserve bnode IDs from Sesame.

I assume you disabled it so you could avoid collisions when loading the files. You could manually resolve them and leave the option intact.

Cheers,

Mike
 

Cheers,
Håvard

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+unsubscribe@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Håvard Ottestad

未讀,
2017年2月6日 清晨5:08:482017/2/6
收件者:Stardog
Thanks Mike. 

I ended up converting all my files to n-triples and adding a UUID (unique per file) to the blank nodes. 

Would be great if this was configurable on the fly. Or even better, if blank node IDs were stable within a transaction and unique between transactions.

Håvard
回覆所有人
回覆作者
轉寄
0 則新訊息