THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
Status | Proposed |
Target Release | 4.1 |
Issue | |
Original Authors | Dave Johnson |
...
- /roller-services/tagdata - get tag data for entire site
- /roller-services/tagdata/weblogs/handle <handle> - get tag data for specific weblog
Request parameters supported:
- page: page number of results to be returned
- prefix: only return tags that start with this string
- format: format to be returned 'xml' for Atom categories, 'json' for JSON
New classes to be created
- TagDataServlet: New Servlet that returns tag data
- TagDataCache: New cache to be used by Servlet to cache tag content
Format to be returned
Instead of inventing a new format, return tag data in Atom protocol Categories format and add a couple of extension elements to hold tag frequency and view URI. If there are a large number of tags, server can use the <atom:link> element to specify a next and previous URI for paging. For example:
Code Block |
---|
<categories fixed="no" xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:tagdata="http://roller.apache.org/ns/tagdata"> <atom:category term="java" tagdata:frequency="2" tagdata:href="http://localhost:8080/roller/myblog/tags/java" /> <atom:category term="monkey" tagdata:frequency="1" tagdata:href="http://localhost:8080/roller/myblog/tags/monkey" /> <atom:category term="monkeys" tagdata:frequency="1" tagdata:href="http://localhost:8080/roller/myblog/tags/monkeys" /> <atom:category term="music" tagdata:frequency="1" tagdata:href="http://localhost:8080/roller/myblog/tags/music" /> <atom:link rel="next" href="http://localhost:8080//roller/roller-services/tagdata/weblog/myblog/?page=1" /> </categories> |
...