Looking for Roller? The Official Roller Wiki is now hosted by the Apache Software Foundation.
Details a patch (for Atom 1.0 support) that I submitted to the ROME dev list -- DaveJohnson
I've got my Atom Protocol client (~BlogClient) and server (Roller) working with Atom Format 1.0. My protocol client/server pair implements the most recent version of the APP spec and supports get/post/put of entries, categories and resources. I had to modify ROME
to make this happen and now I'd like to figure out how to contribute these mods back to ROME.
I have attached a unified diff format file rome-atom-1.0.patch
with my changes against ROME CVS from Sep 17, 2005 for your evaluation. I've also included below a short demo program, its output and a summary of the changes included in the patch. The code still needs work, but I think it is a good starting point for Atom 1.0 support in ROME and it shouldn't disrupt the existing Atom 0.3 code.
I've also attached a copy of the patched rome-0.8-dave.jar
To test out my ROME mods I wrote a little Groovy program that parses Tim Bray's Atom 1.0 feed and prints out entry title, published date, updated date, links, content type, summary and categories. Tim 's feed is a good test case because he uses xml:base and relative URLs in his links. The code looks like this:
import com.sun.syndication.feed.*;
import com.sun.syndication.io.*;
import java.net.URL;
feedUrl = new URL("http://tbray.org/ongoing/ongoing.atom");
input = new SyndFeedInput();
feed = input.build(new XmlReader(feedUrl));
for (e in feed.entries) {
println "Title: " + e.title;
println "Published: " + e.publishedDate;
println "Updated: " + e.updatedDate;
println "Link: " + e.link;
if (e.description) println "Content type: " + e.description.type;
if (e.summary) println "Summary: " + e.summary.value;
if (e.links != null) {
println "Links collection: "
e.links.each { println " ${it.href} rel=${it.rel}" }
}
if (e.categories != null) {
println "Categories collection: "
e.categories.each { println " ${it.name} scheme=${it.taxonomyUri}" }
}
println "";
}
And here's what the output of testparse.gy looks like:
Title: The Important Things in Life Published: Sat Sep 17 17:00:00 EDT 2005 Updated: Sat Sep 17 17:57:22 EDT 2005 Link: http://www.tbray.org/ongoing/ongoing.atom/When/200x/2005/09/17/Semicolons Content type: xhtml Links collection: http://www.tbray.org/ongoing/ongoing.atom/When/200x/2005/09/17/Semicolons rel=alternate Categories collection: Language scheme=http://www.tbray.org/ongoing/What/ Language scheme=http://www.tbray.org/ongoing/What/ Title: NetBeans 5 Published: Fri Sep 16 17:00:00 EDT 2005 Updated: Sat Sep 17 11:34:34 EDT 2005 Link: http://www.tbray.org/ongoing/ongoing.atom/When/200x/2005/09/16/Netbeans-5 Content type: xhtml Summary: <div xmlns="http://www.w3.org/1999/xhtml">I?ve been running the <a href="http://www.netbeans.org/community/releases/50/index.html">NetBeans 5.0</a> pre-beta for a week or two now, and I thought I?d post some real-time notes for what I turn up. Summary: some really neat stuff, fewer bugs than you?d think, one major disappointment. <i>[Update: Alt-P is gone, good.]</i></div> Links collection: http://www.tbray.org/ongoing/ongoing.atom/When/200x/2005/09/16/Netbeans-5 rel=alternate Categories collection: Technology/Coding/Java scheme=http://www.tbray.org/ongoing/What/ Technology scheme=http://www.tbray.org/ongoing/What/ Coding scheme=http://www.tbray.org/ongoing/What/ Java scheme=http://www.tbray.org/ongoing/What/ . . . etc. etc. . . .
Here is a summary of the change that are included in the patch.
Submitted to ROME Nov. 6th, 2005
Fix a bug and updated the attachments to this page on Nov. 11, 2005
| Kind | Attachment Name | Size | Version | Date Modified | Author | Change note |
|---|---|---|---|---|---|---|
jar |
rome-0.8-dave.jar | 190.4 kB | 3 | 11-Nov-2005 21:44 | DaveJohnson | |
patch |
rome-atom-1.0.patch | 71.6 kB | 3 | 11-Nov-2005 21:45 | DaveJohnson |