Perhaps there is a third solution that won't get me into the lengthy debates on Feed is a Entry, which if it is going to be argued would be better argued separately. If possible I would like to keep the issues separated.


This is to point out the following. Currently you have created a head data structure
that has an title, an author etc. You have no problems accepting that the title in the head is a property of the Feed. So similarly you should have no problem accepting that the title in an Entry that is the head of a feed is the title of the feed.


Henry


On 16 Nov 2004, at 12:58, Henry Story wrote:


The mere fact that we've chosen to provide a "title" in both head
and entry does not mean they are the same nor does it mean that "title"
means the same in both contexts. In fact, it does not. The "title" of a head
is not the head's title. Rather, it is the title of the feed that contains
the head. The title of an entry, on the other hand, is that of the entry
itself. One element contains data that describes itself -- the other
contains data that describes its parent and the parent of the entries in the
same feed. These differences are significant.

That is a good constructive point. :-)

There are I think, two different solutions to this.

1. Feed is a pair feed(head,stream)

a) The title of the Entry that goes into the head is the title of that Entry.
b) The feed has a head relationship to one and only one Entry.
This 'head' relationship is a special relationship, which makes an assertion about the Feed and the Entry. This can be paraphrased as saying that the Entry related to the Feed by the head relationship, that that Entry, call it headentry, that its copyright is the feed's copyright, that the headeantry's title is the feed's title, etc...


2. A Feed is a Entry

The feed *is* the Entry that is its head. This is simplest to understand. The
copyright of the head entry is the copyright of the feed, since that feed and the head Entry are the same object. A Feed in this conceptualization, simply is an Entry that points to other Entries.


        in programming terms

        class Feed extends Entry {
                List<Entry> entries = new ArrayList<Entry>();

                Entry getHead() {
                        return (Entry)this;
                }

                List<Entry> getEntries() {
                        return entries;
                }

                void addEntry(Entry e) {
                        entries.add(e);
                }
        }

In both situations you end up with the same result.

note: There may be another solution I have not thought of.



Reply via email to