bterlson / cadl-rdfs

A cadl to rdfs emitter
0 stars 0 forks source link

Fix namespacing issue with 3 writers logic #10

Open mspaulik opened 2 years ago

mspaulik commented 2 years ago

Copy pasting from PR chat:

Just to explain, since I really need writer.blank() function to be present (and its not present in Store() which I tried to use in the first place, only addBlankNode() function exists which doesn't produce same effect), I couldn't really create 3 arrays as you suggested and simply add quads to them. So what I did instead was creating 3 different writers and iterating through all 3 of them at the very end.

However, I am getting an issue with namespacing - namespaces are written to ttl 3 times and example namespace is not picked up? I am a bit confused by the function 'getNsForModel' and didn't know how to modify it to make it work. Would you mind altering the code in this function so that it works with '3 writers' logic I am currently doing? I couldn't come with better solution due to blank() function needed.