Below 2 questions, 2 assumptions of mine I am uncertain of, and 1 worry.

I now have a pretty complete model of the atom-syntax document [1]. So as I am starting to implement the Atom Protocol (sorry for being a little late), and since this contains a new XML document, and since I need to store that info in my rdf database, I need to model that document in rdf.

Here are my first questions:

q1. is there any relation between the title of a collection and the name of the feed it is pointing to?
q2. what is the point of secondary entry or media collections?

So before modeling this I rewrote the example in N3. I created a collections relation that points to a list of collections, as the spec gives a distinct semantic meaning (though exactly what the point of this is I am not clear about (see q2)) to the Collections given their order. This is my first naïve rewriting:

[] a :Service;
   :workspace [ a :Workspace;
               :title "Main Site"@en;
               :collections ( [ a :Collection;
                                :title "entries"@en;
                                :href <http://example.org/myblog/entries>;
                                :member-type :entry ]
                              [ a :Collection;
                                :title "photos"@en;
                                :href <http://example.org/myblog/fotes>
                                :member-type :media ]
                            )
             ];
   :workspace [ a :Workspace;
               :title "Side Bar Blog"@en;
               :collections ( [ a :Collection;
                                :title "Remaindered Links"@en;
                                :member-type :entry ]
                            )
             ] .


Now I notice that the Service class here does not do very much. Perhaps it should less be affirming the existence of some :Service thing, as saying that this (<>) document is a :Service document. Also it may be better to distinguish between primary collections and the other collections directly instead of leaving it to be inferred by the position of a collection in the list above.

:primaryCollection rdfs:subPropertyOf :collection .

<> a :Service;
   :workspace [ a :Workspace;
               :title "Main Site"@en;
               :primaryCollection [ a :Collection;
                                    :title "entries"@en;
                                    :href <http://example.org/myblog/entries>;
                                    :member-type :entry ];
               :primaryCollection [ a :Collection;
                                    :title "photos"@en;
                                    :href <http://example.org/myblog/fotes>
                                    :member-type :media ]
             ];
   :workspace [ a :Workspace;
               :title "Side Bar Blog"@en;
               :primaryCollection  [ a :Collection;
                                     :title "Remaindered Links"@en;
:href <http://example.org/ reilly/list>;
                                     :member-type :entry ]
             ] .



So clearly this gives us a :Service, :Workspace, and :Collection class. The relation between the :Collections of type :entry and :media and the feeds they point to can be specified by the N3 rule

{ ?c a :Collection;
     :href ?feedUrl;
     :member-type :entry .
  ?feedUrl a atom:Feed;
           atom:id ?feedId .
  ?feedId atom:update ?entry .
} => { ?entry atom:content [ a owl:unionOf ( atom:TextContent atom:XHtmlContent ) ] } .

The above should say that for any collection of member-type entry pointing to ?feedUrl with atom id ?feedId, all the entries on feeds with that id will have contents of type text or xhtml.

Note: atom:update is the relation that a feed id has to all entries that are part of feed documents with that id. In N3

{ ?feed a :Feed, :Version;
          :id ?feedId;
          :entry ?entry . } => { ?feedId :update ?entry } .


Anyway Here I am making 2 assumptions:

a1. that the linked list of feeds at ?feedUrl all have the same id and that these are all the feeds with that id. a2. that the content of those entries are limited to things of mime type text/html, text/xhtml, text/plain.

I wonder what people on this group think about assumption a1.
Thinking about it assumption a2 is very likely wrong. My guess is that the difference between entry collections and media collections is purely procedural, ie, how one interacts with them.

I suppose a test would be what your answer to the following question would be: could it be that there is no syntactic way to distinguish an entry collection and a media collection. For example is it possible that someone could post some html to a media collection?

POST /myblog/entry HTTP/1.1
Host: example.org
User-Agent: Thingio/1.0
Content-Type: text/html
Content-Length: nnnn
Title: Atom-Powered Robots run Amok

<html><body>Hello there</body></html>

Ok I suppose the entry created would then look something like this

<entry>
   <title>Atom-Powered Robots run Amok</title>
   <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
   <updated>2003-12-13T18:30:02Z</updated>
   <content src="http://eg.com/xxx.html";>
</entry>


Worry 1:
The fact that posting to a media collection does not return an entry, even though requesting the feed for the collection returns a feed of entries, worries me a little. It means that if one wanted to find the id for the posted object one would have to scroll through the feed to find it. Is that asymetry really necessary?


Well so that's probably enough for now. I have a couple of questions, 2 assumptions and 1 worry.

        Henry Story


[1] see presentation at http://bblfish.net/work/atom-owl/2006-03-02/
    and ontology at http://bblfish.net/work/atom-owl/2005-10-23/

Reply via email to