1. Atom Feed for CIMA Web 2.0
(1) CIMA persons click the link to feeds which will pop up on all the parameters for them to subscribe;
(2) CIMA Client gets the http request and registers a CIMA service;
(3) CIMA Service sends a parcel with the service information users required;
(4) Atom Feed parses the parcel and convert service information into Atom Syndication format and send them back to users
2. Research methods
(1) Create a simple atom feed (xml file) sample by hand
A brief instruction to create an atom feed:
(a) requirements: JDK 1.4.2 or 1.5
(b) download the following jar and war files at http://www.colorfulsoftware.com/projects/atomsphere
- atmosphere which includes atomsphere-1.0.1.0.jar, atomsphere-1.0.1.0-javadoc.jar, atomsphere-1.0.1.0-sources.jar
- atmosphere-taglib which includes atomsphere-taglib-1.0.1.0.jar, atomsphere-taglib-1.0.1.0-sources.jar
- atmosphere-webapp which includes atomsphere-webapp-1.0.1.0.war
- atomphere-weblib which includes atomsphere-weblib-1.0.1.0.jar, atomsphere-weblib-1.0.1.0-sources.jar
- jsr173_1.0_api.jar, sjsxp_101.class, sjsxp_fcs_1_0.class, StAX Utilities Project
(c) export all the jar files above in the java project
(d) API(JavaDoc) http://www.colorfulsoftware.com/projects/atomsphere/api/
(e) create an atom feed by atmosphere library (sample code is shown below)
Feed feed = new Feed();
feed.addAuthor(new Author("Yu(Carol) Deng"));
feed.setId(new Id("tag:www.xxxxxxxx.com"));
feed.setTitle(new Title("Cool Atom Feed"));
feed.setUpdated(new Updated(new Date(2005,3,2)));
Entry firstEntry = new Entry();
firstEntry.setTitle(new Title("Some interesting stuff"));
firstEntry.setId(new Id("tag:www.XMML.com/2004/12/08.html"));
firstEntry.setUpdated(new Updated(new Date(2006,3,1)));
feed.addEntry(firstEntry);
FeedDoc.writeFeedDoc("foo.xml",feed,FeedDoc.encoding,FeedDoc.xml_version);
(3) Repeat step(2), use xml beans (apache project) instead;
I tried to write a program in XML beans (http://xmlbeans.apache.org/) to create an atom feed. But I found that the schema of Atom 1.0 feed follows RELAX NG Compact Schema while xml beans supports XML Schema not RELAX NG Compact Schema. I tried to find the conversion between these two, but failed. I am wondering if there is some kind of conversion between RELAX NG Compact Schema and XML Schema.
Discussion
1. The format of parcel from CIMA Service
2. The storage of the Atom feed
Future work
1. The issues described in Discussion section
No comments:
Post a Comment