2013-09-27 00:12:22 +02:00
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2013-10-04 20:53:12 +02:00
|
|
|
<!-- Generated by Apache Maven Doxia Site Renderer 1.4 at 2013-10-04 -->
|
2013-09-27 00:12:22 +02:00
|
|
|
<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 - Preserving WireFeeds</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="20110814" />
|
2013-10-04 20:53:12 +02:00
|
|
|
<meta name="Date-Revision-yyyymmdd" content="20131004" />
|
2013-09-27 00:12:22 +02:00
|
|
|
<meta http-equiv="Content-Language" content="en" />
|
|
|
|
|
|
|
|
</head>
|
|
|
|
<body class="composite">
|
|
|
|
<div id="banner">
|
2013-09-27 00:40:14 +02:00
|
|
|
<a href="http://github.com/rometools/" id="bannerLeft">
|
2013-09-27 00:12:22 +02:00
|
|
|
<img src="images/romelogo.png" alt="ROME" />
|
|
|
|
</a>
|
|
|
|
<div class="clear">
|
|
|
|
<hr/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="breadcrumbs">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="xright">
|
|
|
|
|
2013-10-04 20:53:12 +02:00
|
|
|
<span id="publishDate">Last Published: 2013-10-04</span>
|
|
|
|
| <span id="projectVersion">Version: 2.0.0-SNAPSHOT</span>
|
2013-09-27 00:12:22 +02:00
|
|
|
</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>Preserving WireFeeds<a name="Preserving_WireFeeds"></a></h2>
|
|
|
|
<p>WireFeeds will be preserved if the property preserveWireFeed is set on the SyndFeedInput object it is built from:</p>
|
|
|
|
<div class="source">
|
|
|
|
<pre>
|
|
|
|
SyndFeedInput in = new SyndFeedInput();
|
|
|
|
in.setPreserveWireFeed(true);
|
|
|
|
SyndFeed syndFeed = in.build(..);
|
|
|
|
WireFeed wireFeed = syndFeed.originalWireFeed();
|
|
|
|
</pre></div>
|
|
|
|
<p>Atom/RSS Entry/Item objects are also available from SyndEntry objects if the WireFeed is preserved:</p>
|
|
|
|
<div class="source">
|
|
|
|
<pre>
|
|
|
|
Object obj = syndEntry.getWireEntry();
|
|
|
|
if (obj != null && obj instanceof Entry) {
|
|
|
|
// it is an Atom Entry object
|
|
|
|
// do Atom specific stuff, eg:
|
|
|
|
Entry entry = (Entry) o;
|
|
|
|
System.out.println(entry.getRights());
|
|
|
|
} else if (obj != null && obj instanceof Item) {
|
|
|
|
// it is a RSS Item object
|
|
|
|
// do RSS specific stuff eg:
|
|
|
|
Item item = (Item) o;
|
|
|
|
System.out.println(item.getComments());
|
|
|
|
}
|
|
|
|
</pre></div>
|
|
|
|
<p>The Fetcher can be set to preserve WireFeeds by setting the preserveWireFeed property to true:</p>
|
|
|
|
<div class="source">
|
|
|
|
<pre>
|
|
|
|
feedFetcher.setPreserveWireFeed(true);
|
|
|
|
</pre></div>
|
|
|
|
<p>-- Main.nicklothian - 11 Mar 2009</p></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="clear">
|
|
|
|
<hr/>
|
|
|
|
</div>
|
|
|
|
<div id="footer">
|
|
|
|
<div class="xright">
|
|
|
|
Copyright © 2004-2013
|
|
|
|
<a href="http://www.rometools.org">ROME Project</a>.
|
|
|
|
All Rights Reserved.
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="clear">
|
|
|
|
<hr/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|