Thursday, May 17, 2007

Status Report for 04/25/2007 -- 05/16/2007

Progress

Detail design for Bay1Temp Atom Feed (method1 shown in the last report is used here)

1. Create an atom feed document

  • New a feed

Feed theFeed = new Feed();

  • Add "xmlns" attribute to the feed

theFeed.addAttribute(new Attribute("xmlns","http://www.w3.org/2005/Atom"));

  • Add Author

theFeed.addAuthor(new Author("Yu(Carol) Deng"));

  • Set a universally unique Id for the feed

theFeed.setId(new Id("urn:uuid:" + new UID().toString()));

  • Add Title

Title feedTitle = new Title("text"); // Set title type for the feed

feedTitle.setText("Bay1Temp Atom Feed"); // Set title content

theFeed.setTitle(feedTitle); // Set the title

  • Add Link

Link feedLink = new Link(); // New a Link in the feed

feedLink.setRel(new Attribute("rel", "self")); // Set "rel" attribute of the link

feedLink.setType(new Attribute("type", "application/atom+xml")); //Set "type" attribute of the link

feedLink.setHref(new Attribute("href", FeedHref)); //Set "href" attribute of the link

theFeed.addLink(feedLink); //Add the link

  • Set Updated to the entry

theFeed.setUpdated(new Updated(new Date()));

2. Add an entry document to the feed

  • New an Entry

parcelEntry = new Entry();

  • Add Author

parcelEntry.addAuthor(new Author("Yu(Carol) Deng"));

  • Add Title

Title parcelTitle = new Title("text"); // Set title type for the feed

parcelTitle.setText("SensorName, TimeStamp, DoubleData"); // Set title content

parcelEntry.setTitle(parcelTitle); // Set the title

  • Set a universally unique Id for the entry

parcelEntry.setId(new Id("urn:uuid:" + new UID().toString()));

  • Set Updated to the entry

Calendar cal = new GregorianCalendar();

parcelEntry.setUpdated(new Updated(cal.getTime()));

  • Set the current data to the Content

parcelEntry.setContent(nodeSensorName + nodeTimeStamp + nodeDoubleData);

  • Add the Entry to the feed

currentFeed.addEntry(parcelEntry);

3. Atom Feed for Bay1Temp

?>
- <feed xmlns="http://www.w3.org/2005/Atom">
<id>urn:uuid:-7012692:11296d2cefc:-8000id>
<updated>2007-05-17T01:15:29.205-05:00updated>
<title type="text">Bay1Temp Atom Feedtitle>
- <author>
<name>Yu(Carol) Dengname>
author>
<link rel="self" type="application/atom+xml" href="http://hagar.cs.indiana.edu:8181/foo.xml" />
- <entry>
<id>urn:uuid:-7012692:11296d2cefc:-7fffid>
<updated>2007-05-16T17:37:17.66-05:00updated>
<title type="text">SensorName, TimeStamp, DoubleDatatitle>
- <author>
<name>Yu(Carol) Dengname>
author>
<content type="html">Bay1Temp 2007-05-17 05:14:48Z 25.5
Bay1Temp 2007-05-17 05:15:08Z 25.5
Bay1Temp 2007-05-17 05:15:28Z 25.5
content>
entry>
feed>

4. Bay1Temp Atom Feed in iGoogle

Add the url of Bay1Temp Atom Feed to iGoogle, the screen shot below shows the Atom Feed in iGoogle.

Discussion & Questions

1. In iGoogle, it shows 3 links for Bay1Temp in the feed area

-- I tried to clean some cookies or cache, but they are still there.

2. In iGoogle, after refreshing the current webpage, click the content of feed which had content, is not available for the data.

-- I kept clicking the "+" button in the feed area, data is still not available.

Future work

1. Get all sensors from a lab going to individual feeds;

2. The issues described in Discussion section