SeamFramework.orgCommunity Documentation

第20章 RSSサポート

20.1. インストール
20.2. フィードを生成する
20.3. フィード
20.4. エントリ
20.5. リンクと、より詳細な文書について

YARFRAWライブラリを通してSeamにRSSフィードを統合する事は、今では容易に行えます。RSSサポートは現在、最新のリリースにおいて"テクノロジ プレビュー"の状態にあります。

RSSサポートを可能にするためには、あなたのアプリケーションのWEB-INF/libディレクトリにjboss-seam-rss.jarを含めるようにして下さい。RSSライブラリには、依存関係にあるいくつかのライブラリもあり、それらのライブラリはRSSライブラリと同じディレクトリに置かなければなりません。含めなければならないライブラリの一覧は項42.2.6. 「Seam RSS サポート」を参照して下さい。

Seam RSSサポートは、ビュー テクノロジとしてFaceletsの利用を必要とします。

examples/rss プロジェクトには実行可能なデモ用 RSS サポートのサンプルが含まれています。このプロジェクトは、デプロイ可能なパッケージとして適切なデモであり、RSSサポートの持つ機能をあらわにします。

フィードは、フィードと入れ子になったエントリ項目のリストから成るxhtmlページです。



            <r:feed 
               xmlns="http://www.w3.org/1999/xhtml" 
               xmlns:ui="http://java.sun.com/jsf/facelets" 
               xmlns:r="http://jboss.com/products/seam/rss"
               title="#{rss.feed.title}"
               uid="#{rss.feed.uid}"
               subtitle="#{rss.feed.subtitle}"
               updated="#{rss.feed.updated}"
               link="#{rss.feed.link}">
               <ui:repeat value="#{rss.feed.entries}" var="entry">
                  <r:entry
                     uid="#{entry.uid}"
                     title="#{entry.title}"
                     link="#{entry.link}"
                     author="#{entry.author}"
                     summary="#{entry.summary}"
                     published="#{entry.published}"
                     updated="#{entry.updated}"
                          />
                   </ui:repeat>
            </r:feed>
        
      

フィードは、情報源の属性を説明する最上位のエンティティです。それは、0層以上の入れ子となったエントリを含みます。

<r:feed>

属性

  • uid — An optional unique feed id. The value is a string.

  • title — The title of the feed. The value is a string.

  • subtitle — The subtitle of the feed. The value is a string.

  • updated — When was the feed updated? The value is a date.

  • link — The link to the source of the information. The value is a string.

  • feedFormat — The feed format. The value is a string and defaults to ATOM1. Valid values are RSS10, RSS20, ATOM03 and ATOM10.

子要素

  • 0以上のフィードエントリです。

ファセット

  • なし

エントリはフィード中の"headlines"にあたります。

<r:feed>

属性

  • uid — An optional unique entry id. The value is a string.

  • title — The title of the entry. The value is a string.

  • link — A link to the item. The value is a string.

  • author — The author of the story. The value is a string.

  • summary — The body of the story. The value is a string.

  • textFormat — The format of the body and title of the story. The value is a string and valid values are "text" and "html". Defaults to "html".

  • published — When was the story first published? The value is a date.

  • updated — When was the story updated? The value is a date.

子要素

  • なし

ファセット

  • なし

The core of the RSs functionality is based on the YARFRAW library which can be found on http://yarfraw.sourceforge.net/ and most features and possible limitations are inherited from here.

ATOM 1.0形式についての詳細は、ATOM1.0仕様を見て下さい。

RSS 2.0形式についての詳細は、RSS 2.0仕様を見て下さい。