Hi Rob,

By default, blank node names are not stored in Virtuoso at all. They are kept 
in memory while a single resource is parsed and then forgotten. Hence 
re-loading the same resource to the same graph will result new blank nodes 
(duplicate nodes if the previous content is still in place).

To be compatible with Jena, we provide a non-standard extension for "named 
blank nodes". Their names are kept as if they were plain IRIs but the SPARQL 
isBLANK() built-in function returns 1 as if they were plain bNodes. To write 
them in TURTLE, use the syntax <_:name>, i.e. a mix of _:name of bNode and 
<name> of an IRI. However we wouldn't recommend using this feature without some 
strong compatibility reason.

Regarding JSON serialization we don't know what's the best variant. In our 
opinion they should be no more than unique strings, without any meaning or 
anyway to "decode" the notation "correctly" or "incorrectly".

Best Regards
Hugh Williams
Professional Services
OpenLink Software
Web: http://www.openlinksw.com
Support: http://support.openlinksw.com
Forums: http://boards.openlinksw.com/support
Twitter: http://twitter.com/OpenLink

On 19 Aug 2010, at 14:52, Rob Vesse wrote:

> 
> Hi Hugh and Aleksandr
> 
> I have fixed dotNetRDF as of revision 934 to be more intelligent in the 
> parsing of Blank Node IDs from SPARQL Results.
> 
> Personally I'm inclined to agree with Aleksandr that Virtuoso should really 
> be returning just the labels of the Blank Nodes rather than the full URI form 
> which Virtuoso uses internally.  Not least because the labels you are 
> returning currently would not be valid as-is in most RDF syntaxes which may 
> cause problems when people write applications reusing data extracted from 
> Virtuoso, while the W3C specifications for the SPARQL Results Format don't 
> specify what is and isn't a valid label most systems seem to return simple 
> labels which is much easier to process.
> 
> With regards to Virtuoso's SPARQL Update support when combined with Blank 
> Nodes how does Virtuoso actually behave?  Is there a specific way of 
> referring to Blank Nodes which causes a specific node to be referenced?  My 
> experience in the past was that any time you input data into Virtuoso every 
> Blank Node in the data got a newly minted ID but I don't know if you've 
> changed this?
> 
> Best Regards,
> 
> Rob Vesse
> 
> From: "Hugh Williams" <hwilli...@openlinksw.com>
> Sent: 19 August 2010 13:59
> To: "Aleksandr A. Zaripov" <zari...@tpu.ru>
> Subject: Re: [dotNetRDF-bugs] [Virtuoso-users] >>: The strange naming of 
> blank nodes in JSON
> 
> Hi Aleksandr,
> 
> It would appear your question should also be posed to the dotNetRDF mailing 
> list as the change may be required in this library ...
> 
> What is the form of the insert statement being passed to the dotNetRDF 
> library as it should be responsible for passed blank node values to the 
> various RDF stores it supports in the form they require for storage I would 
> think ...
> 
> Best Regards
> Hugh Williams
> Professional Services
> OpenLink Software
> Web: http://www.openlinksw.com
> Support: http://support.openlinksw.com
> Forums: http://boards.openlinksw.com/support
> Twitter: http://twitter.com/OpenLink
> 
> On 19 Aug 2010, at 04:37, Aleksandr A. Zaripov wrote:
> 
>> 
>> 
>> ? ?????????, ??????? ?????????
>> zari...@tpu.ru
>> 
>> 
>> 
>> -----???????? ?????????-----
>> ??: Aleksandr A. Zaripov
>> ??????????: ??, 31.07.2010 22:06
>> ????: virtuoso-de...@lists.sourceforge.net
>> ????: The strange naming of blank nodes in JSON
>> 
>> Hello
>> 
>> I'm using VOS 6.1.2 and dotNetRDF library and have some question about 
>> naming of blank nodes.
>> For example, I have some node with ID 1000044690
>> In HTML (using default SPARQL endpoint) it returns as "nodeID://1000044690".
>> In JSON it returns as "{ "type": "bnode", "value": "nodeID://1000044690" }"
>> The dotNetRDF parse it using the code
>> 
>> CreateBlankNode(nodeValue.Substring(nodeValue.IndexOf(':') + 1))
>> 
>> as BalnkNode with internal ID "//1000044690"
>> 
>> But to save it, using SPARUL INSERT method, it should be named as 
>> "_:1000044690" (the name "_://1000044690" cause an error).
>> As a temporary solution, I trim the leading '/' form the node ID, but I 
>> think, that it should be a some convention about what is should be returned 
>> as bnode value (I think, it should be "value": "1000044690"). Or should be 
>> changed the algorithm of parsing JSON in dotNetRDF.
>> What do you think about it?
>> 
>> Best regards, Alexander A. Zaripov
>> zari...@tpu.ru
>> 
>> 
>> 
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by 
>> 
>> Make an app they can't live without
>> Enter the BlackBerry Developer Challenge
>> http://p.sf.net/sfu/RIM-dev2dev 
>> _______________________________________________
>> Virtuoso-users mailing list
>> Virtuoso-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by 
> 
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev 
> _______________________________________________
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to