Up to seven hashes are generated for each statement - one for each possible combination of predicate, subject, and object values. The hashes are generated by hashing the concatenation of the adornedments of the involved values. The values are always concatenated in the following orders: (PSO, PS, PO, P, SO, S, O). A string is prepended to the result to indicate which columns are involved in the hash. Any combination involving a blank node is discarded. Values are adorned by prepending a single character that indicates type (L=Literal, U=URI). Datatyped literals are appended with ^^ plus the datatype value. Literals with lang ids are appended with @ plus the lang id.
Here's an example:
For the statement:
[ foaf:name "Geoff" ].
The subject is blank, so no combination invlolving the subject will be generated.
The remaining combinations (P, O, PO) are generated accoring to above rules.
hash_p = "P" + SHA1("U" + "http://xmlns.com/foaf/0.1/name");
hash_o = "O" + SHA1("L" + "Geoff");
hash_po = "PO" + SHA1("U" + "http://xmlns.com/foaf/0.1/name" + "L" + "Geoff");
Giving:
hash_p = "P7e2d8376c0825ad025f24554ea71399bcff5d9a1"
hash_o = "Ob0ff576b72b51c15f62f12185ddff3f5d4d78429"
hash_po = "PO44050d489b0c159ad081ea5c4717b3b260b1fb47"