rome/RssAndAtOMUtilitiEsROMEV0.5AndAboveTutorialsAndArticles/FeedsDateElementsMappingToSyndFeedAndSyndEntry.html
2014-04-18 19:37:21 +02:00

175 lines
No EOL
8.9 KiB
HTML

<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia at 2014-04-18
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="author" content="mkurz" />
<meta name="Date-Creation-yyyymmdd" content="20110815" />
<meta name="Date-Revision-yyyymmdd" content="20140418" />
<meta http-equiv="Content-Language" content="en" />
<title>ROME - Feeds Date Elements Mapping to SyndFeed and SyndEntry</title>
<link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
<link rel="stylesheet" href="../css/site.css" />
<link rel="stylesheet" href="../css/print.css" media="print" />
<script type="text/javascript" src="../js/apache-maven-fluido-1.3.0.min.js"></script>
</head>
<body class="topBarDisabled">
<div class="container-fluid">
<div id="banner">
<div class="pull-left">
<a href="http://github.com/rometools/" id="bannerLeft">
<img src="../images/romelogo.png" alt="ROME"/>
</a>
</div>
<div class="pull-right"> </div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate" class="pull-right">Last Published: 2014-04-18</li> <li class="divider pull-right">|</li>
<li id="projectVersion" class="pull-right">Version: 1.5.0-SNAPSHOT</li>
</ul>
</div>
<div class="row-fluid">
<div id="leftColumn" class="span3">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">Rome</li>
<li>
<a href="../index.html" title="Overview">
<i class="none"></i>
Overview</a>
</li>
<li>
<a href="../HowRomeWorks/index.html" title="How Rome Works">
<i class="icon-chevron-right"></i>
How Rome Works</a>
</li>
<li>
<a href="../RssAndAtOMUtilitiEsROMEV0.5AndAboveTutorialsAndArticles/index.html" title="Tutorials And Articles">
<i class="none"></i>
Tutorials And Articles</a>
</li>
<li>
<a href="../ROMEReleases/index.html" title="Releases">
<i class="icon-chevron-right"></i>
Releases</a>
</li>
<li>
<a href="../ROMEDevelopmentProposals/index.html" title="ROME Development Proposals">
<i class="none"></i>
ROME Development Proposals</a>
</li>
<li class="nav-header">Project Documentation</li>
<li>
<a href="../project-info.html" title="Project Information">
<i class="icon-chevron-right"></i>
Project Information</a>
</li>
</ul>
<hr class="divider" />
<div id="poweredBy">
<div class="clear"></div>
<div class="clear"></div>
<div class="clear"></div>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
<img class="builtBy" alt="Built by Maven" src="../images/logos/maven-feather.png" />
</a>
</div>
</div>
</div>
<div id="bodyColumn" class="span9" >
<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>
<hr/>
<footer>
<div class="container-fluid">
<div class="row span12">Copyright &copy; 2014.
All Rights Reserved.
</div>
</div>
</footer>
</body>
</html>