rome/RssAndAtOMUtilitiEsROMEV0.5AndAboveTutorialsAndArticles/FeedsDateElementsMappingToSyndFeedAndSyndEntry.html

131 lines
No EOL
8.2 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Generated by Apache Maven Doxia Site Renderer 1.4 at 2013-10-04 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>ROME - Feeds Date Elements Mapping to SyndFeed and SyndEntry</title>
<style type="text/css" media="all">
@import url("../css/maven-base.css");
@import url("../css/maven-theme.css");
@import url("../css/site.css");
</style>
<link rel="stylesheet" href="../css/print.css" type="text/css" media="print" />
<meta name="author" content="mkurz" />
<meta name="Date-Creation-yyyymmdd" content="20110815" />
<meta name="Date-Revision-yyyymmdd" content="20131004" />
<meta http-equiv="Content-Language" content="en" />
</head>
<body class="composite">
<div id="banner">
<a href="http://github.com/rometools/" id="bannerLeft">
<img src="../images/romelogo.png" alt="ROME" />
</a>
<div class="clear">
<hr/>
</div>
</div>
<div id="breadcrumbs">
<div class="xright">
<span id="publishDate">Last Published: 2013-10-04</span>
&nbsp;| <span id="projectVersion">Version: 2.0.0-SNAPSHOT</span>
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="leftColumn">
<div id="navcolumn">
<h5>Rome</h5>
<ul>
<li class="none">
<a href="../index.html" title="Overview">Overview</a>
</li>
<li class="collapsed">
<a href="../HowRomeWorks/index.html" title="How Rome Works">How Rome Works</a>
</li>
<li class="none">
<a href="../RssAndAtOMUtilitiEsROMEV0.5AndAboveTutorialsAndArticles/index.html" title="Tutorials And Articles">Tutorials And Articles</a>
</li>
<li class="collapsed">
<a href="../ROMEReleases/index.html" title="Releases">Releases</a>
</li>
<li class="none">
<a href="../ROMEDevelopmentProposals/index.html" title="ROME Development Proposals">ROME Development Proposals</a>
</li>
</ul>
<h5>Project Documentation</h5>
<ul>
<li class="collapsed">
<a href="../project-info.html" title="Project Information">Project Information</a>
</li>
<li class="collapsed">
<a href="../project-reports.html" title="Project Reports">Project Reports</a>
</li>
</ul>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
<img class="poweredBy" alt="Built by Maven" src="../images/logos/maven-feather.png" />
</a>
</div>
</div>
<div id="bodyColumn">
<div id="contentBox">
<div class="section">
<h2>Feeds Date Elements Mapping to SyndFeed and SyndEntry<a name="Feeds_Date_Elements_Mapping_to_SyndFeed_and_SyndEntry"></a></h2>
<p>The different RSS versions and Atom define different date elements at feed and entry level. Some of them also define syndication information indicating when (and when not) and how often to fetch feeds for updates. There is not always a possible mapping or conversion of this information when going from one format to another.</p>
<p>As this is still subject of debate (<a class="externalLink" href="http://www.tbray.org/ongoing/When/200x/2004/07/30/Dates">How About a Date</a> and <a class="externalLink" href="http://www.intertwingly.net/wiki/pie/DateSurvey">Date Survey</a>), for now, in Rss and atOM utilitiEs (ROME) we've taken a simplistic approach.</p>
<p>When handling feeds at WireFeed level, <tt>rss.Channel</tt> or <tt>atom.Feed</tt>, it is possible to access all the date elements and syndication information available in the feed.</p>
<p>When handling feeds at SyndFeed level, <tt>synd.SyndFeed</tt>, there is only one date element available, the <tt>publishedDate</tt>. Both, <tt>SyndFeed</tt> and <tt>SyndEntry</tt> have the <tt>publisheDate</tt> property. In addition, it is possible to use the Syndication Module.</p>
<p>The mapping of the date elements from the different feed formats to SyndFeed is as follows.</p>
<div class="section">
<h3>For RSS 0.90<a name="For_RSS_0.90"></a></h3>
<p>RSS 0.90 does not define date elements.</p>
<p>There is no mapping to <tt>SyndFeed</tt> and <tt>SyndEntry</tt> date properties.</p></div>
<div class="section">
<h3>For RSS 0.91, 0.92<a name="For_RSS_0.91_0.92"></a></h3>
<p>RSS 0.91 and 0.92 define <tt>pubDate</tt> and <tt>lastBuildDate</tt> at feed level.</p>
<p>The feed <tt>pubDate</tt> element is mapped to the <tt>SyndFeed</tt> <tt>publishedDate</tt> property. The <tt>lastBuildDate</tt> element is lost.</p></div>
<div class="section">
<h3>For RSS 0.93, 0.94 and 2.0<a name="For_RSS_0.93_0.94_and_2.0"></a></h3>
<p>RSS 0.93, 0.94 and 2.0 define <tt>pubDate</tt> and <tt>lastBuildDate</tt> at feed level. They also define <tt>pubDate</tt> and <tt>expirationDate</tt> at item level.</p>
<p>The feed <tt>pubDate</tt> element is mapped to the <tt>SyndFeed</tt> <tt>publishedDate</tt> property. The <tt>lastBuildDate</tt> element is lost.</p>
<p>The item <tt>pubDate</tt> element is mapped to the <tt>SyndEntry</tt> <tt>publishedDate</tt> property. The <tt>expirationDate</tt> element is lost.</p></div>
<div class="section">
<h3>For RSS 1.0<a name="For_RSS_1.0"></a></h3>
<p>RSS 1.0 use DC Module data at feed an item level to indicate date information about the feed and the items.</p>
<p><tt>SyndFeed</tt> and <tt>SyndEntry</tt> use the DC Module <tt>date</tt> element for the <tt>publishedDate</tt> property.</p></div>
<div class="section">
<h3>For Atom 0.3<a name="For_Atom_0.3"></a></h3>
<p>Atom 0.3 defines a <tt>modified</tt> element at feed level and the <tt>modified</tt>, <tt>created</tt> &amp; <tt>issued</tt> elements at entry level.</p>
<p>The feed <tt>modified</tt> element is mapped to the <tt>SyndFeed</tt> <tt>publishedDate</tt> property.</p>
<p>The item <tt>modified</tt> element is mapped to the <tt>SyndEntry</tt> <tt>publishedDate</tt> property. The entry elements, <tt>created</tt> and <tt>issued</tt>, are lost.</p></div>
<div class="section">
<h3>For Atom 1.0<a name="For_Atom_1.0"></a></h3>
<p>(Atom 1.0 supported in ROME since v0.8)</p>
<p>Atom 1.0 defines an <tt>updated</tt> element at the feed level, which ROME maps to <tt>SyndFeed.publishedDate</tt>.</p>
<p>Atom 1.0 defines <tt>updated</tt> and <tt>published</tt> elements at the entry level, which ROME maps to <tt>SyndEntry.updatedDate</tt> and <tt>SyndEntry.publishedDate</tt> respectively.</p></div></div>
</div>
</div>
<div class="clear">
<hr/>
</div>
<div id="footer">
<div class="xright">
Copyright &#169; 2004-2013
<a href="http://www.rometools.org">ROME Project</a>.
All Rights Reserved.
</div>
<div class="clear">
<hr/>
</div>
</div>
</body>
</html>