I’m having yet another problem with (anonymous|blank) nodes: I think I’ve pretty well got the concept down (either you’re talking about something intrinsic to the feed, like the accursed rdf:Seq, or you’re talking about something that you can’t give a resource for (what’s the URI that will return Mark Pilgrim himself?), or something that you can’t be bothered to name (it can be useful to say that some grain of sand weighs this much and has this hardness, but giving that grain of sand a name is a bit much)), but… how the hell do I manage and use #genidx in my app?
My toolkit generates genids like “http://philringnalda.com/index.rdf#genid1” when you are using the raw parser, but using the database class, it just generates “#genid1”, from what seems to be the assumption that you’ll parse a particular file once, and then that’s it.
Of course, parsing RSS isn’t going to work like that. I could just add each hour’s parsing as new documents with a new docKey from the URL + timestamp, but it seems silly to save all the static channel stuff over and over, 24 times a day, not to mention saving a single item dozens of times over until it finally leaves the feed. So, when I parse I only add new statements, and change existing ones as they change. But what am I supposed to do with blank nodes?
I can add a timestamp, so that I can keep #genid1T1032767767 separate from #genid1T1032766067, but then what am I going to do with them? Suppose I have six items from one docKey that I want to display in sequence order. I select everything from my docKey with a <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> of <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq>, getting dozens or hundreds of #genidTns. Then I select everything with those #genids as the subject and a predicate of <http://www.w3.org/1999/02/22-rdf-syntax-ns#_n> and one of my items as the object. Then, what?, I go through each set of #genids, looking for a set that includes all of my items, and there’s no guarantee that I’ll find one, since someone could have posted three of my items one hour, and then another three plus twelve more the next hour, so that all six were never in a single file together. Bah. Unless someone has a workable idea, I think my next revision of the code will add a cleanup routine after the parser finishes, to get every #genid that’s a sequence, and delete everything that’s even vaguely related to it. I’m less of a fan of RDF sequences every time I meet up with them.