Re: Meaning of RDF:Statement

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 UTC