How can I get blankNode ID in dotnetrdf librery in C#
Solution
If you really need an explicit ID then you must use the following form of the method:
IBlankNode bnode = g.CreateBlankNode("id");
Note that this does not guarantee that the library won't convert it to the anonymous syntax []
in the N3 output as this is simply a syntax compression. If you really want to avoid this syntax compression you can create and configure a Notation3Writer
manually and set the CompressionLevel
property to be low (anything < 5 should stop the use of []
)
Otherwise if you want to delete an anonynmous blank node this you need to formulate some selection criteria that will allow you to locate the relevant node and then retract triples based upon that
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow