W3C home > Mailing lists > Public > public-rdfa-wg@w3.org > April 2011

Issue on comparing BlankNodes in the RDF API

From: Benjamin Adrian <benjamin.adrian@dfki.de>
Date: Thu, 28 Apr 2011 17:48:06 +0200
Message-ID: <4DB98C36.7030305@dfki.de>
To: RDFa WG <public-rdfa-wg@w3.org>, nathan@webr3.org, Ivan Herman <ivan@w3.org>, Manu Sporny <msporny@digitalbazaar.com>
Hi,

I just want to summarise the problems I had with BlankNodes while
implementing the following methods:

- BlankNodes.equals(RDFNode)
- Graph.import(graph)
- Graph.merge(graph)

As BlankNodes are only valid within the scope of a single Graph,
I felt it hard to implement whether two BlankNodes are the same or not
without having any graph scope defined in the RDF API.

Ivan proposed to add the following:

pass a graph reference in the factory method
* BlankNode createBlankNode(graph);

add a graph reference in BlankNode.
[NoInterfaceObject]
interface BlankNode : RDFNode {
    readonly attribute Graph graph;
    readonly attribute any value;
};

Now, BlankNode.equals(node) can check for the graph the BlankNode was
defined in.

The problem with this solution is that we then need to define a
Graph.equals(graph) method.
Ironically, a graph identifier would solve this issue :)

We could also define any comparison between two BlankNodes to result as
false.

Any other hints or suggestions how we can solve this problem?

Best regards,

Ben


-- 
__________________________________________
Benjamin Adrian
Email : benjamin.adrian@dfki.de
WWW : http://www.dfki.uni-kl.de/~adrian/
Tel.: +49631 20575 1450
Twitter: http://twitter.com/BenBanBun
Skype: benbanbun
__________________________________________
Deutsches Forschungszentrum für Künstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschäftsführung:
Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats:
Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
__________________________________________
Received on Thursday, 28 April 2011 15:48:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:19:51 UTC