Author: jonathan Date: Sun Jul 20 23:46:29 2008 New Revision: 19719 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=19719
Log: Embedded API reference from JavaDocs. Modified: trunk/mashup/java/xdocs/feedhostobject.html Modified: trunk/mashup/java/xdocs/feedhostobject.html URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/xdocs/feedhostobject.html?rev=19719&r1=19718&r2=19719&view=diff ============================================================================== --- trunk/mashup/java/xdocs/feedhostobject.html (original) +++ trunk/mashup/java/xdocs/feedhostobject.html Sun Jul 20 23:46:29 2008 @@ -13,81 +13,265 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> -<html><head> - - +<html> +<head> <meta http-equiv="content-type" content=""> - - - - <title>WSO2 Mashup Server, Atom/RSS Feed Host Object Guide</title><link href="css/mashup-docs.css" rel="stylesheet" type="text/css" media="all"></head> + <title>WSO2 Mashup Server, Atom/RSS Feed Host Object Guide</title> + <link href="css/mashup-docs.css" rel="stylesheet" type="text/css" media="all"> +</head> <body> - <div id="main-content"> - <h1> WSO2 Mashup Server, Atom/RSS Feed Host Object Guide </h1> - - - This document describes the set of host objects available for reading - Atom and RSS feeds. These objects are capable of identifying feed types - and handling them accordingly. <br> - - - <br> - - - <h2>1.0 Introduction </h2> - - - The Feed implementation consists of three main host objects, namely - Feed, Entry and FeedReader. <br> - - - <h3> 1.1 Feed and Entry </h3> +<h1> WSO2 Mashup Server, Atom/RSS Feed Host Object Guide </h1> - These host objects are capable of intelligently working with both Atom - and RSS feeds. The underlying protocol implementation is kept - transparent. However, some data might be lost due to this being an - abstraction of both Atom and RSS feeds. The Feed host object is capable - of persisting it's content to disk. <br> +<p>This document describes the set of host objects available for reading +Atom and RSS feeds. These objects are capable of identifying feed types +and handling them accordingly.</p> +<h2>1.0 Introduction </h2> - <br> - - - <h3> 1.2 FeedReader </h3> - +<p>The Feed implementation consists of three main host objects, namely +Feed, Entry and FeedReader.</p> - The FeedReader is a generic reader of Atom and RSS feeds. <br> +<h3> 1.1 Feed and Entry </h3> +<p>These host objects are capable of intelligently working with both Atom +and RSS feeds. The underlying protocol implementation is kept +transparent. However, some data might be lost due to this being an +abstraction of both Atom and RSS feeds. The Feed host object is capable +of persisting it's content to disk.</p> - <br> - - - <br> +<h3> 1.2 FeedReader </h3> +<p>The FeedReader is a generic reader of Atom and RSS feeds. </p> - <h2> 2.0 Examples</h2> +<h3> 1.3 MediaModule </h3> +<p>Provides access to media extensions on an Entry.</p> - <br> +<p></p> - <div class="code"> +<h2> 2.0 Examples</h2> +<p></p> +<div class="code"> <pre>//Creating an RSS 2.0 feed and writing it to file.<br><br>//Creating the Feed<br>var feed = new Feed();<br>feed.feedType = "rss_2.0";<br>feed.title = "This is a test Feed";<br>feed.description = "This feed demonsrates the use of Feed host object to create an RSS 2.0 feed.";<br>feed.link = "http://mooshup.com/rss20.xml";<br><br>//Creating Entries in the Feed <br>var entry = new Entry();<br>entry.title = "This is a test entry.";<br>entry.description = "This is a sample entry demonstrating the use of the Entry host object.";<br>feed.insertEntry(entry);<br><br>var entry2 = new Entry();<br>entry2.title = "This is another test entry.";<br>entry2.description = "This is a sample entry demonstrating the use of the Entry host object.";<br><br>//Adding a Media Module to the entry<br>var mediaModule = new MediaModule("http://www.earthshots.org/photos/387.jpg");<br>mediaModule.copyright = "2007 Tad Bowman";<br>mediaModule.type = "image/jpeg";<br>mediaModule.thumbnail = "http://www.earthshots.org/photos/387.thumb.jpg";<br>entry2.addMediaModule(mediaModule);<br><br>feed.insertEntry(entry2);<br><br>// Writing the newly created Feed to a File<br>var result = feed.writeTo("test-created-rss-feed.xml");<br></pre> +</div> +<br> +<p>For a demonstration of this feature, please refer the <span style="font-weight: bold; font-style: italic;">TomatoTube</span> sample in your WSO2 Mashup +Server distribution.</p> + +<p></p> + + +<h2> 3.0 API Documentation</h2> + <h3>3.1 Feed Host Object API Documentation</h3> + + <table style="margin-left: 0.5in; border-collapse: collapse;" class="MsoTableGrid" border="1" cellpadding="5" cellspacing="0"> + <tbody> + <tr> + <td>Member</td> + <td>Description</td> + </tr> + <tr> + <td><b>Entry[] getEntries()</b></td> + <td>Returns the complete set of entries contained in this feed.<br> + <span style="font-style: italic;">var entries = feed.getEntries();</span></td> + </tr> + <tr> + <td><b>void insertEntry(newEntry)</b></td> + <td>Adds a new Entry to the end of the Feeds collection of entries.<br> + <span style="font-style: italic;">feed.insertEntry(newEntry);</span></td> + </tr> + <tr> + <td><b>void writeTo(fileName)</b></td> + <td>Serializes the Feed to a given local file/<br> + <span style="font-style: italic;">feed.writeTo("file-name.xml");</span></td> + </tr> + <tr> + <td><b>property String author</b></td> + <td>The author of this feed.</td> + </tr> + <tr> + <td><b>property String category</b></td> + <td>The category of this feed.</td> + </tr> + <tr> + <td><b>property String contributor</b></td> + <td>The contributor of this feed.</td> + </tr> + <tr> + <td><b>property String description</b></td> + <td>The description of this feed.</td> + </tr> + <tr> + <td><b>property String feedType</b></td> + <td>The type of this feed ("atom", "rss_2.0", "rss_1.0").</td> + </tr> + <tr> + <td><b>property String link</b></td> + <td>The location of this feed.</td> + </tr> + <tr> + <td><b>property String title</b></td> + <td>The title of this feed.</td> + </tr> + <tr> + <td><b>property String updated</b></td> + <td>The date when this feed was last updated.</td> + </tr> + <tr> + <td><b>property XML XML</b></td> + <td>Returns the E4X XML contents of this AtomFeed object.</td> + </tr> + </tbody> + </table> + + <h3>3.2 Entry Host Object API Documentation</h3> + + <table style="margin-left: 0.5in; border-collapse: collapse;" class="MsoTableGrid" border="1" cellpadding="5" cellspacing="0"> + <tbody> + <tr> + <td>Member</td> + <td>Description</td> + </tr> + <tr> + <td><b>MediaModule[] getMediaModules()</b></td> + <td>Returns the complete set of media modules assocated with this entry.<br> + <span style="font-style: italic;">var mediamodules = feed.getMediaModules();</span></td> + </tr> + <tr> + <td><b>property String author</b></td> + <td>The author of this entry.</td> + </tr> + <tr> + <td><b>property String category</b></td> + <td>The category of this entry.</td> + </tr> + <tr> + <td><b>property String content</b></td> + <td>The content of this entry.</td> + </tr> + <tr> + <td><b>property String contributor</b></td> + <td>The contributor of this entry.</td> + </tr> + <tr> + <td><b>property String description</b></td> + <td>The description of this entry.</td> + </tr> + <tr> + <td><b>property String link</b></td> + <td>The location of this entry.</td> + </tr> + <tr> + <td><b>property String published</b></td> + <td>The date this entry was published.</td> + </tr> + <tr> + <td><b>property String summary</b></td> + <td>The summary of this entry.</td> + </tr> + <tr> + <td><b>property String title</b></td> + <td>The title of this entry.</td> + </tr> + <tr> + <td><b>property String updated</b></td> + <td>The date this entry was updated.</td> + </tr> + <tr> + <td><b>property XML XML</b></td> + <td>Returns the E4X XML contents of this Entry.</td> + </tr> + </tbody> + </table> + + <h3>3.3 FeedReader Host Object API Documentation</h3> + + <table style="margin-left: 0.5in; border-collapse: collapse;" class="MsoTableGrid" border="1" cellpadding="5" cellspacing="0"> + <tbody> + <tr> + <td>Member</td> + <td>Description</td> + </tr> + <tr> + <td><b>Feed get(url)</b></td> + <td>Reads a RSS/Atom feed from a given url.<br/> + <span style="font-style: italic;">var reader = new FeedReader();<br/> + var feed = new Feed();<br/> + feed = reader.get("http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml");</span></td> + </tr> + </tbody> + </table> + + <h3>3.4 MediaModule Host Object API Documentation</h3> + + <table style="margin-left: 0.5in; border-collapse: collapse;" class="MsoTableGrid" border="1" cellpadding="5" cellspacing="0"> + <tbody> + <tr> + <td>Member</td> + <td>Description</td> + </tr> + <tr> + <td><b>property Integer height</b></td> + <td>The height of the media object.</td> + </tr> + <tr> + <td><b>property Float bitrate</b></td> + <td>The kilobytes per second rate of media.</td> + </tr> + <tr> + <td><b>property Integer channels</b></td> + <td>The number of audio channels in the media object.</td> + </tr> + <tr> + <td><b>property Object copyright</b></td> + <td>Copyright information for media object.</td> + </tr> + <tr> + <td><b>property String description</b></td> + <td>Short description describing the media object typically a sentence in length.</td> + </tr> + <tr> + <td><b>property Long duration</b></td> + <td>The number of seconds the media object plays.</td> + </tr> + <tr> + <td><b>property Long fileSize</b></td> + <td>The number of bytes of the media object.</td> + </tr> + <tr> + <td><b>property Float framerate</b></td> + <td>The number of frames per second for the media object.</td> + </tr> + <tr> + <td><b>property String language</b></td> + <td>The primary language encapsulated in the media object.</td> + </tr> + <tr> + <td><b>property Float samplingrate</b></td> + <td>The number of samples per second taken to create the media object.</td> + </tr> + <tr> + <td><b>property String thumbnail</b></td> + <td>Allows particular images to be used as representative images for the media object.</td> + </tr> + <tr> + <td><b>property Object type</b></td> + <td>The standard MIME type of the object.</td> + </tr> + <tr> + <td><b>property Integer width</b></td> + <td>The width of the media object.</td> + </tr> + </tbody> + </table> - </div> - - - <br> - <br> - For a demonstration of this feature, please refer the <span style="font-weight: bold; font-style: italic;">TomatoTube</span> sample in your WSO2 Mashup - Server distribution.<br> - <br> - + <p></p> <h2>3.0 References</h2> _______________________________________________ Mashup-dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/mashup-dev
