W3C home > Mailing lists > Public > www-rdf-interest@w3.org > December 1999

Re: Meaning of RDF:Statement

From: Sergey Melnik <melnik@DB.Stanford.EDU>
Date: Mon, 13 Dec 1999 18:29:37 -0800
Message-ID: <3855AB91.C886AB93@db.stanford.edu>
To: Guha <guha@epinions-inc.com>
CC: Dan Brickley <Daniel.Brickley@bristol.ac.uk>, Dan Brickley <danbri@w3.org>, RDF Interest Group <www-rdf-interest@w3.org>, swick@w3.org
In the implementation of an RDF API [1] the following algorithm is used:

if object (o) is a literal:

d(triple(s,p,o)) = d(s) XOR rotateLeft(d(p), 8) XOR rotateLeft(d(o), 16)

else if o is a resource:

d(triple(s,p,o)) = d(s) XOR rotateLeft(d(p), 8) XOR rotateLeft(d(o), 24)

whereas d(x) is the MD5 (128 bit ;) hash of x.

Rotation is used to make sure that d(triple(s,p,o)) != d(triple(p,s,o))
etc.

Sergey

[1] http://www-db.stanford.edu/~melnik/rdf/api.html


Guha wrote:
> 
> You are absolutely right. The spec is not clear about the
> identity of reified statements.
> 
> However is seems to me that the triple (s u v) should have
> a stable identifier. Generating one is not a problem. We
> could just use a 64 bit MD5 hash ...
> 
> guha
Received on Tuesday, 14 December 1999 09:49:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:42 GMT