Menu

#39 RSS feeds for sections

open
5
2011-08-28
2011-03-02
Bob Weigel
No

Each section should have an rss feed. rss feeds for categories of section should be allowed:

rss?section=/News
rss?section=/News/HPDE
rss?section=/News/HPDE&modifiedrecords=true
rss?section=/News/HPDE&newrecords=true

Where modifiedrecords=true will include information about existing records that have been edited and newrecords=true will include information about new records that have been created. (default newrecords=true, modifiedrecords=true).

At present, getRSS.jsp gets info from vo_log.xml. The above will require a query to be made for all documents created or modified in the last 24 hours.

Discussion

  • Bob Weigel

    Bob Weigel - 2011-08-28
    • assigned_to: rweigel --> wrb302
     
  • Bob Weigel

    Bob Weigel - 2011-08-28

    Here is how I think that it should work. The URL will be, for example,

    http://virbo.org/metadev/rss.jsp?section=/News/HPDE

    rss.jsp calls rss.xql, which checks if /db/virbo/cache/News/HDPE/rss.xml exists. If it does, it returns this file and exits. Otherwise it gets a list of all filenames in /virbo/db/News/HPDE and below. (Each filename corresponds to a forum record in /db/virbo/forum.) An rss item should be created for each forum record. The rss items should be sorted by publication date. The output should be saved as /db/virbo/cache/News/HDPE/rss.xml.

    rss.xql should also look through the forum file to see if there were any "Replies" to a record. Here is a record with a reply: http://virbo.org/metadev/viewdata.do?docname=7B5B95B4-F946-8E64-B2CD-C9129A7390A4
    A reply should become an item in the rss feed.

    This jsp shows how to create the rss xml structure: http://virbo.org/metadev/getRSS.jsp

    Another change that needs to happen is that the forum record should contain information on previous versions. At present, the previous version list is generated by looking for records with the same base filename in /db/virbo/previousVersions/. I think that when a record is edited, the previous version should be stored in, e.g., /db/virbo/Previous/PersonUnderReview/7B5B95B4-F946-8E64-B2CD-C9129A7390A4~0.xml and /db/virbo/Previous/PersonUnderReview/7B5B95B4-F946-8E64-B2CD-C9129A7390A4~1.xml and
    the forum record should have something like

    <VERSIONS>
    <VERSION>
    <NUMBER>0</NUMBER>
    <AUTHOR_NAME>admin</AUTHOR_NAME>
    <AUTHOR_ID>CC7796C3-796F-8D39-F315-8C4803F0E1CA</AUTHOR_ID>
    <PUBDATE>2011-01-06T16:48:07</PUBDATE>
    <PUB_PC_DATE>1307378887013</PUB_PC_DATE>
    <SUMMARY></SUMMARY>
    </VERSION>
    <VERSION>
    <NUMBER>0</NUMBER>
    <AUTHOR_NAME>admin</AUTHOR_NAME>
    <AUTHOR_ID>CC7796C3-796F-8D39-F315-8C4803F0E1CA</AUTHOR_ID>
    <PUBDATE>2011-02-06T16:48:07</PUBDATE>
    <PUB_PC_DATE>1307378887013</PUB_PC_DATE>
    <SUMMARY></SUMMARY>
    </VERSION>
    </VERSIONS>

    You'll need to dig around in the source code to figure out where the previousVersions are written and add some code that creates the elements in the forum record as given above. (I find three Java files when I do a search on "previousVersions".)

     
MongoDB Logo MongoDB