In an eternal quest to find a simple way to express relationships/hierachies among atom resources (entries), I have come up with the following. My criteria:
- simple to manage w/ the RDBMS backend - straightforward to express w/ standard atom constructs - relatively easy to manipulate w/ AtomPub The basic idea is that a link and a category will share the same URI for the [EMAIL PROTECTED] and [EMAIL PROTECTED] The parent has the link, the children have the category. The [EMAIL PROTECTED] is the atom id of the parent, and the [EMAIL PROTECTED] expresses a search over the category scheme, filtered by the parent id. For example, a set of entries in a Art & Art History Collection, one concerning the artist, and two about individual works: <!-- artist entry --> <entry> <id>tag:example.com/000123</id> <title>Vincent Van Gogh</title> <content>essay about Van Gogh...</content> <link rel="http://example.com/link/artist_works" href="http://example.com/link/artist_works?term=tag:example.com/000123" type="application/atom+xml" title="Artist Works: Vincent Van Gogh"/> </entry> <!-- two work entries --> <entry> <id>tag:example.com/000124</id> <title>Harvest in Provence</title> <x:artist>Vincent Van Gogh</x:artist> <content>essay about this painting...</content> <category scheme="http://example.com/link/artist_works" term="tag:example.com/000123"/> </entry> <entry> <id>tag:example.com/000125</id> <title>The Sower</title> <x:artist>Vincent Van Gogh</x:artist> <content>essay about this painting...</content> <category scheme="http://example.com/link/artist_works" term="tag:example.com/000123"/> </entry> I can now use AtomPub to add or remove by simply PUTting the entry with/without proper category. (There'll be some service doc & category doc choreography to make most of this discoverable). I am less concerned about fully functional interop, more concerned with an extensible method to do these sorts of operations w/ standard atom tools. Evil hack? Any other thoughts? --peter keane
