- From: Ivan Herman <ivan@w3.org>
- Date: Thu, 28 Apr 2011 18:49:11 +0200
- To: benjamin.adrian@dfki.de
- Cc: RDFa WG <public-rdfa-wg@w3.org>, nathan@webr3.org, Manu Sporny <msporny@digitalbazaar.com>
On Apr 28, 2011, at 17:48 , Benjamin Adrian wrote: > 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. That I do not really understand, but that may be my Javascript incompetence. If I create a Graph in a programming language, it has some sort of a 'handle'. It is not an identifier in the URI sense, it is, shall we say, pointer to an object in the good old C/C++ sense. That is what is stored in the Blank Node as a reference, and if these pointers are identical then, well, the blank node belongs to the same graph (or context, if you want). So what is the problem? > Ironically, a graph identifier would solve this issue :) > > We could also define any comparison between two BlankNodes to result as > false. > That would be wrong. It would create all kinds of issues if, say, inference is performed on top of the API Ivan > 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 > __________________________________________ ---- Ivan Herman, W3C Semantic Web Activity Lead Home: http://www.w3.org/People/Ivan/ mobile: +31-641044153 PGP Key: http://www.ivan-herman.net/pgpkey.html FOAF: http://www.ivan-herman.net/foaf.rdf
Received on Thursday, 28 April 2011 16:48:16 UTC