diff --git a/src/main/java/com/sun/syndication/feed/WireFeed.java b/src/main/java/com/sun/syndication/feed/WireFeed.java
index 1799f9c..670427e 100644
--- a/src/main/java/com/sun/syndication/feed/WireFeed.java
+++ b/src/main/java/com/sun/syndication/feed/WireFeed.java
@@ -26,6 +26,8 @@ import java.util.List;
import java.util.ArrayList;
import java.io.Serializable;
+import org.jdom2.Element;
+
/**
* Parent class of the RSS (Channel) and Atom (Feed) feed beans.
*
@@ -44,7 +46,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
private String _feedType;
private String _encoding;
private List _modules;
- private List _foreignMarkup;
+ private List _foreignMarkup;
/**
* Default constructor, for bean cloning purposes only.
@@ -94,7 +96,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
return false;
}
// can't use foreign markup in equals, due to JDOM equals impl
- Object fm = getForeignMarkup();
+ List fm = getForeignMarkup();
setForeignMarkup(((WireFeed)other).getForeignMarkup());
boolean ret = _objBean.equals(other);
// restore foreign markup
@@ -214,8 +216,8 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
* @return Opaque object to discourage use
*
*/
- public Object getForeignMarkup() {
- return (_foreignMarkup==null) ? (_foreignMarkup=new ArrayList()) : _foreignMarkup;
+ public List getForeignMarkup() {
+ return (_foreignMarkup==null) ? (_foreignMarkup=new ArrayList()) : _foreignMarkup;
}
/**
@@ -224,7 +226,7 @@ public abstract class WireFeed implements Cloneable, Serializable, Extendable {
* @param foreignMarkup Opaque object to discourage use
*
*/
- public void setForeignMarkup(Object foreignMarkup) {
- _foreignMarkup = (List)foreignMarkup;
+ public void setForeignMarkup(List foreignMarkup) {
+ _foreignMarkup = (List)foreignMarkup;
}
}
diff --git a/src/main/java/com/sun/syndication/feed/atom/Entry.java b/src/main/java/com/sun/syndication/feed/atom/Entry.java
index 848188d..e26363d 100644
--- a/src/main/java/com/sun/syndication/feed/atom/Entry.java
+++ b/src/main/java/com/sun/syndication/feed/atom/Entry.java
@@ -16,18 +16,19 @@
*/
package com.sun.syndication.feed.atom;
-import com.sun.syndication.feed.impl.ObjectBean;
-import com.sun.syndication.feed.module.Extendable;
-import com.sun.syndication.feed.module.Module;
-import com.sun.syndication.feed.module.impl.ModuleUtils;
-
import java.io.Serializable;
-
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
+import org.jdom2.Element;
+
+import com.sun.syndication.feed.impl.ObjectBean;
+import com.sun.syndication.feed.module.Extendable;
+import com.sun.syndication.feed.module.Module;
+import com.sun.syndication.feed.module.impl.ModuleUtils;
+
/**
* Bean for entry elements of Atom feeds.
@@ -47,7 +48,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
private List _categories;
private List _contents;
private List _contributors;
- private List _foreignMarkup;
+ private List _foreignMarkup;
private List _modules;
private List _otherLinks;
private ObjectBean _objBean;
@@ -80,7 +81,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @return a list of Link elements with the entry alternate links, an empty list if none.
*/
public List getAlternateLinks() {
- return (_alternateLinks == null) ? (_alternateLinks = new ArrayList()) : _alternateLinks;
+ return (_alternateLinks == null) ? (_alternateLinks = new ArrayList()) : _alternateLinks;
}
/**
@@ -109,7 +110,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @param categories The categories to set.
* @since Atom 1.0
*/
- public void setCategories(List categories) {
+ public void setCategories(List categories) {
_categories = categories;
}
@@ -119,8 +120,8 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @return Returns the categories.
* @since Atom 1.0
*/
- public List getCategories() {
- return (_categories == null) ? (_categories = new ArrayList()) : _categories;
+ public List getCategories() {
+ return (_categories == null) ? (_categories = new ArrayList()) : _categories;
}
/**
@@ -129,7 +130,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @param contents the list of Content elements with the entry contents to set,
* an empty list or null if none.
*/
- public void setContents(List contents) {
+ public void setContents(List contents) {
_contents = contents;
}
@@ -162,7 +163,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
*
*/
public List getContributors() {
- return (_contributors == null) ? (_contributors = new ArrayList()) : _contributors;
+ return (_contributors == null) ? (_contributors = new ArrayList()) : _contributors;
}
/**
@@ -189,8 +190,8 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @param foreignMarkup Opaque object to discourage use
*
*/
- public void setForeignMarkup(Object foreignMarkup) {
- _foreignMarkup = (List) foreignMarkup;
+ public void setForeignMarkup(List foreignMarkup) {
+ _foreignMarkup = (List) foreignMarkup;
}
/**
@@ -199,8 +200,8 @@ public class Entry implements Cloneable, Serializable, Extendable {
* @return list of Opaque object to discourage use
*
*/
- public Object getForeignMarkup() {
- return (_foreignMarkup == null) ? (_foreignMarkup = new ArrayList()) : _foreignMarkup;
+ public List getForeignMarkup() {
+ return (_foreignMarkup == null) ? (_foreignMarkup = new ArrayList()) : _foreignMarkup;
}
/**
@@ -248,7 +249,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
*/
public boolean isMediaEntry() {
boolean mediaEntry = false;
- List links = getOtherLinks();
+ List links = getOtherLinks();
for (Iterator it = links.iterator(); it.hasNext();) {
Link link = it.next();
@@ -298,7 +299,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
* an empty list or null if none.
*
*/
- public void setModules(List modules) {
+ public void setModules(List modules) {
_modules = modules;
}
@@ -309,8 +310,8 @@ public class Entry implements Cloneable, Serializable, Extendable {
* an emtpy list if none.
*
*/
- public List getModules() {
- return (_modules == null) ? (_modules = new ArrayList()) : _modules;
+ public List getModules() {
+ return (_modules == null) ? (_modules = new ArrayList()) : _modules;
}
/**
@@ -527,7 +528,7 @@ public class Entry implements Cloneable, Serializable, Extendable {
return false;
}
// can't use foreign markup in equals, due to JDOM equals impl
- Object fm = getForeignMarkup();
+ List fm = getForeignMarkup();
setForeignMarkup(((Entry) other).getForeignMarkup());
boolean ret = _objBean.equals(other);
diff --git a/src/main/java/com/sun/syndication/feed/atom/Feed.java b/src/main/java/com/sun/syndication/feed/atom/Feed.java
index e79b81b..7a5677f 100644
--- a/src/main/java/com/sun/syndication/feed/atom/Feed.java
+++ b/src/main/java/com/sun/syndication/feed/atom/Feed.java
@@ -161,7 +161,7 @@ public class Feed extends WireFeed {
* an empty list if none.
*/
public List getOtherLinks() {
- return (_otherLinks==null) ? (_otherLinks=new ArrayList()) : _otherLinks;
+ return (_otherLinks==null) ? (_otherLinks=new ArrayList()) : _otherLinks;
}
/**
@@ -346,7 +346,7 @@ public class Feed extends WireFeed {
* an empty list or null if none.
*
*/
- public void setEntries(List entries) {
+ public void setEntries(List entries) {
_entries = entries;
}
@@ -390,8 +390,8 @@ public class Feed extends WireFeed {
* @return Returns the categories.
* @since Atom 1.0
*/
- public List getCategories() {
- return (_categories==null) ? (_categories=new ArrayList()) : _categories;
+ public List getCategories() {
+ return (_categories==null) ? (_categories=new ArrayList()) : _categories;
}
/**
diff --git a/src/main/java/com/sun/syndication/feed/atom/Person.java b/src/main/java/com/sun/syndication/feed/atom/Person.java
index 29f178f..28495d9 100644
--- a/src/main/java/com/sun/syndication/feed/atom/Person.java
+++ b/src/main/java/com/sun/syndication/feed/atom/Person.java
@@ -40,7 +40,7 @@ public class Person implements Cloneable,Serializable, Extendable
private String _uri; // since Atom 1.0 (was called url)
private String _uriResolved;
private String _email;
- private List _modules;
+ private List _modules;
/**
* Default constructor. All properties are set to null.
@@ -192,8 +192,8 @@ public class Person implements Cloneable,Serializable, Extendable
* an emtpy list if none.
*
*/
- public List getModules() {
- return (_modules==null) ? (_modules=new ArrayList()) : _modules;
+ public List getModules() {
+ return (_modules==null) ? (_modules=new ArrayList()) : _modules;
}
/**
@@ -203,7 +203,7 @@ public class Person implements Cloneable,Serializable, Extendable
* an empty list or null if none.
*
*/
- public void setModules(List modules) {
+ public void setModules(List modules) {
_modules = modules;
}
diff --git a/src/main/java/com/sun/syndication/feed/module/DCModuleImpl.java b/src/main/java/com/sun/syndication/feed/module/DCModuleImpl.java
index 7359efc..047666c 100644
--- a/src/main/java/com/sun/syndication/feed/module/DCModuleImpl.java
+++ b/src/main/java/com/sun/syndication/feed/module/DCModuleImpl.java
@@ -51,7 +51,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
/**
* Properties to be ignored when cloning.
*/
- private static final Set IGNORE_PROPERTIES = new HashSet();
+ private static final Set IGNORE_PROPERTIES = new HashSet();
/**
* Unmodifiable Set containing the convenience properties of this class.
@@ -60,7 +60,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* properties can be ignored as the will be copied as part of the module
* cloning.
*/
- public static final Set CONVENIENCE_PROPERTIES = Collections.unmodifiableSet(IGNORE_PROPERTIES);
+ public static final Set CONVENIENCE_PROPERTIES = Collections.unmodifiableSet(IGNORE_PROPERTIES);
static {
IGNORE_PROPERTIES.add("title");
@@ -97,8 +97,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* an empty list if none.
*
*/
- public List getTitles() {
- return (_title == null) ? (_title = new ArrayList()) : _title;
+ public List getTitles() {
+ return (_title == null) ? (_title = new ArrayList()) : _title;
}
/**
@@ -108,7 +108,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* titles to set, an empty list or null if none.
*
*/
- public void setTitles(List titles) {
+ public void setTitles(List titles) {
_title = titles;
}
@@ -130,7 +130,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*
*/
public void setTitle(String title) {
- _title = new ArrayList();
+ _title = new ArrayList();
_title.add(title);
}
@@ -141,8 +141,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* an empty list if none.
*
*/
- public List getCreators() {
- return (_creator == null) ? (_creator = new ArrayList()) : _creator;
+ public List getCreators() {
+ return (_creator == null) ? (_creator = new ArrayList()) : _creator;
}
/**
@@ -152,7 +152,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* creators to set, an empty list or null if none.
*
*/
- public void setCreators(List creators) {
+ public void setCreators(List creators) {
_creator = creators;
}
@@ -174,7 +174,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*
*/
public void setCreator(String creator) {
- _creator = new ArrayList();
+ _creator = new ArrayList();
_creator.add(creator);
}
@@ -185,8 +185,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* an empty list if none.
*
*/
- public List getSubjects() {
- return (_subject == null) ? (_subject = new ArrayList()) : _subject;
+ public List getSubjects() {
+ return (_subject == null) ? (_subject = new ArrayList()) : _subject;
}
/**
@@ -196,7 +196,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* module subjects to set, an empty list or null if none.
*
*/
- public void setSubjects(List subjects) {
+ public void setSubjects(List subjects) {
_subject = subjects;
}
@@ -219,7 +219,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*
*/
public void setSubject(DCSubject subject) {
- _subject = new ArrayList();
+ _subject = new ArrayList();
_subject.add(subject);
}
@@ -230,8 +230,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* description, an empty list if none.
*
*/
- public List getDescriptions() {
- return (_description == null) ? (_description = new ArrayList()) : _description;
+ public List getDescriptions() {
+ return (_description == null) ? (_description = new ArrayList()) : _description;
}
/**
@@ -241,7 +241,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* module descriptions to set, an empty list or null if none.
*
*/
- public void setDescriptions(List descriptions) {
+ public void setDescriptions(List descriptions) {
_description = descriptions;
}
@@ -264,7 +264,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*
*/
public void setDescription(String description) {
- _description = new ArrayList();
+ _description = new ArrayList();
_description.add(description);
}
@@ -275,8 +275,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* an empty list if none.
*
*/
- public List getPublishers() {
- return (_publisher == null) ? (_publisher = new ArrayList()) : _publisher;
+ public List getPublishers() {
+ return (_publisher == null) ? (_publisher = new ArrayList()) : _publisher;
}
/**
@@ -286,7 +286,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* publishers to set, an empty list or null if none.
*
*/
- public void setPublishers(List publishers) {
+ public void setPublishers(List publishers) {
_publisher = publishers;
}
@@ -309,7 +309,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*
*/
public void setPublisher(String publisher) {
- _publisher = new ArrayList();
+ _publisher = new ArrayList();
_publisher.add(publisher);
}
@@ -320,8 +320,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* an empty list if none.
*
*/
- public List getContributors() {
- return (_contributors == null) ? (_contributors = new ArrayList()) : _contributors;
+ public List getContributors() {
+ return (_contributors == null) ? (_contributors = new ArrayList()) : _contributors;
}
/**
@@ -331,7 +331,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* module contributors to set, an empty list or null if none.
*
*/
- public void setContributors(List contributors) {
+ public void setContributors(List contributors) {
_contributors = contributors;
}
@@ -354,7 +354,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*
*/
public void setContributor(String contributor) {
- _contributors = new ArrayList();
+ _contributors = new ArrayList();
_contributors.add(contributor);
}
@@ -366,7 +366,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*
*/
public List getDates() {
- return (_date == null) ? (_date = new ArrayList()) : _date;
+ return (_date == null) ? (_date = new ArrayList()) : _date;
}
/**
@@ -398,7 +398,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*
*/
public void setDate(Date date) {
- _date = new ArrayList();
+ _date = new ArrayList();
_date.add(date);
}
@@ -409,8 +409,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* an empty list if none.
*
*/
- public List getTypes() {
- return (_type == null) ? (_type = new ArrayList()) : _type;
+ public List getTypes() {
+ return (_type == null) ? (_type = new ArrayList()) : _type;
}
/**
@@ -420,7 +420,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* to set, an empty list or null if none.
*
*/
- public void setTypes(List types) {
+ public void setTypes(List types) {
_type = types;
}
@@ -443,7 +443,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*
*/
public void setType(String type) {
- _type = new ArrayList();
+ _type = new ArrayList();
_type.add(type);
}
@@ -454,8 +454,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* an empty list if none.
*
*/
- public List getFormats() {
- return (_format == null) ? (_format = new ArrayList()) : _format;
+ public List getFormats() {
+ return (_format == null) ? (_format = new ArrayList()) : _format;
}
/**
@@ -465,7 +465,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* formats to set, an empty list or null if none.
*
*/
- public void setFormats(List formats) {
+ public void setFormats(List formats) {
_format = formats;
}
@@ -488,7 +488,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*
*/
public void setFormat(String format) {
- _format = new ArrayList();
+ _format = new ArrayList();
_format.add(format);
}
@@ -499,8 +499,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* an empty list if none.
*
*/
- public List getIdentifiers() {
- return (_identifier == null) ? (_identifier = new ArrayList()) : _identifier;
+ public List getIdentifiers() {
+ return (_identifier == null) ? (_identifier = new ArrayList()) : _identifier;
}
/**
@@ -510,7 +510,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* identifiers to set, an empty list or null if none.
*
*/
- public void setIdentifiers(List identifiers) {
+ public void setIdentifiers(List identifiers) {
_identifier = identifiers;
}
@@ -533,7 +533,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*
*/
public void setIdentifier(String identifier) {
- _identifier = new ArrayList();
+ _identifier = new ArrayList();
_identifier.add(identifier);
}
@@ -544,8 +544,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* an empty list if none.
*
*/
- public List getSources() {
- return (_source == null) ? (_source = new ArrayList()) : _source;
+ public List getSources() {
+ return (_source == null) ? (_source = new ArrayList()) : _source;
}
/**
@@ -555,7 +555,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* sources to set, an empty list or null if none.
*
*/
- public void setSources(List sources) {
+ public void setSources(List sources) {
_source = sources;
}
@@ -578,7 +578,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*
*/
public void setSource(String source) {
- _source = new ArrayList();
+ _source = new ArrayList();
_source.add(source);
}
@@ -589,8 +589,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* an empty list if none.
*
*/
- public List getLanguages() {
- return (_language == null) ? (_language = new ArrayList()) : _language;
+ public List getLanguages() {
+ return (_language == null) ? (_language = new ArrayList()) : _language;
}
/**
@@ -600,7 +600,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* languages to set, an empty list or null if none.
*
*/
- public void setLanguages(List languages) {
+ public void setLanguages(List languages) {
_language = languages;
}
@@ -622,7 +622,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*
*/
public void setLanguage(String language) {
- _language = new ArrayList();
+ _language = new ArrayList();
_language.add(language);
}
@@ -633,8 +633,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* an empty list if none.
*
*/
- public List getRelations() {
- return (_relation == null) ? (_relation = new ArrayList()) : _relation;
+ public List getRelations() {
+ return (_relation == null) ? (_relation = new ArrayList()) : _relation;
}
/**
@@ -644,7 +644,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* relations to set, an empty list or null if none.
*
*/
- public void setRelations(List relations) {
+ public void setRelations(List relations) {
_relation = relations;
}
@@ -667,7 +667,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*
*/
public void setRelation(String relation) {
- _relation = new ArrayList();
+ _relation = new ArrayList();
_relation.add(relation);
}
@@ -678,8 +678,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* an empty list if none.
*
*/
- public List getCoverages() {
- return (_coverage == null) ? (_coverage = new ArrayList()) : _coverage;
+ public List getCoverages() {
+ return (_coverage == null) ? (_coverage = new ArrayList()) : _coverage;
}
/**
@@ -689,7 +689,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* coverages to set, an empty list or null if none.
*
*/
- public void setCoverages(List coverages) {
+ public void setCoverages(List coverages) {
_coverage = coverages;
}
@@ -712,7 +712,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*
*/
public void setCoverage(String coverage) {
- _coverage = new ArrayList();
+ _coverage = new ArrayList();
_coverage.add(coverage);
}
@@ -723,8 +723,8 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* an empty list if none.
*
*/
- public List getRightsList() {
- return (_rights == null) ? (_rights = new ArrayList()) : _rights;
+ public List getRightsList() {
+ return (_rights == null) ? (_rights = new ArrayList()) : _rights;
}
/**
@@ -734,7 +734,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
* rights to set, an empty list or null if none.
*
*/
- public void setRightsList(List rights) {
+ public void setRightsList(List rights) {
_rights = rights;
}
@@ -757,7 +757,7 @@ public class DCModuleImpl extends ModuleImpl implements DCModule {
*
*/
public void setRights(String rights) {
- _rights = new ArrayList();
+ _rights = new ArrayList();
_rights.add(rights);
}
diff --git a/src/main/java/com/sun/syndication/feed/rss/Channel.java b/src/main/java/com/sun/syndication/feed/rss/Channel.java
index a9e6749..53273ba 100644
--- a/src/main/java/com/sun/syndication/feed/rss/Channel.java
+++ b/src/main/java/com/sun/syndication/feed/rss/Channel.java
@@ -60,7 +60,7 @@ public class Channel extends WireFeed {
private String _link;
private String _uri;
private Image _image;
- private List _items;
+ private List _items;
private TextInput _textInput;
private String _language;
private String _rating;
@@ -403,7 +403,7 @@ public class Channel extends WireFeed {
*
*/
public List getSkipHours() {
- return (_skipHours!=null) ? _skipHours : new ArrayList();
+ return (_skipHours!=null) ? _skipHours : new ArrayList();
}
/**
diff --git a/src/main/java/com/sun/syndication/feed/rss/Item.java b/src/main/java/com/sun/syndication/feed/rss/Item.java
index 9931dd8..9063bd1 100644
--- a/src/main/java/com/sun/syndication/feed/rss/Item.java
+++ b/src/main/java/com/sun/syndication/feed/rss/Item.java
@@ -27,6 +27,8 @@ import java.util.Date;
import java.util.List;
import java.io.Serializable;
+import org.jdom2.Element;
+
/**
* Bean for items of RSS feeds.
*
@@ -54,7 +56,7 @@ public class Item implements Cloneable, Serializable, Extendable {
private Date _pubDate;
private Date _expirationDate;
private List _modules;
- private List _foreignMarkup;
+ private List _foreignMarkup;
/**
* Default constructor. All properties are set to null.
@@ -90,7 +92,7 @@ public class Item implements Cloneable, Serializable, Extendable {
return false;
}
// can't use foreign markup in equals, due to JDOM equals impl
- Object fm = getForeignMarkup();
+ List fm = getForeignMarkup();
setForeignMarkup(((Item)other).getForeignMarkup());
boolean ret = _objBean.equals(other);
// restore foreign markup
@@ -269,7 +271,7 @@ public class Item implements Cloneable, Serializable, Extendable {
* an empty list if none.
*
*/
- public List getCategories() {
+ public List getCategories() {
return (_categories==null) ? (_categories=new ArrayList()) : _categories;
}
@@ -423,8 +425,8 @@ public class Item implements Cloneable, Serializable, Extendable {
* @return Opaque object to discourage use
*
*/
- public Object getForeignMarkup() {
- return (_foreignMarkup==null) ? (_foreignMarkup=new ArrayList()) : _foreignMarkup;
+ public List getForeignMarkup() {
+ return (_foreignMarkup==null) ? (_foreignMarkup=new ArrayList()) : _foreignMarkup;
}
/**
@@ -433,8 +435,8 @@ public class Item implements Cloneable, Serializable, Extendable {
* @param foreignMarkup Opaque object to discourage use
*
*/
- public void setForeignMarkup(Object foreignMarkup) {
- _foreignMarkup = (List)foreignMarkup;
+ public void setForeignMarkup(List foreignMarkup) {
+ _foreignMarkup = (List)foreignMarkup;
}
}
diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndCategoryImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndCategoryImpl.java
index eacefbb..746eeb3 100644
--- a/src/main/java/com/sun/syndication/feed/synd/SyndCategoryImpl.java
+++ b/src/main/java/com/sun/syndication/feed/synd/SyndCategoryImpl.java
@@ -271,7 +271,7 @@ class SyndCategoryListFacade extends AbstractList {
public static List convertElementsSyndCategoryToSubject(List cList) {
List sList = null;
if (cList!=null) {
- sList = new ArrayList();
+ sList = new ArrayList();
for (int i=0;i getForeignMarkup();
/**
* Sets foreign markup found at channel level.
@@ -370,7 +372,7 @@ public interface SyndEntry extends Cloneable, CopyFrom, Extendable {
* @param foreignMarkup Opaque object to discourage use
*
*/
- public void setForeignMarkup(Object foreignMarkup);
+ public void setForeignMarkup(List foreignMarkup);
/**
* Creates a deep clone of the object.
diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndEntryImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndEntryImpl.java
index 13119cd..1fac5e9 100644
--- a/src/main/java/com/sun/syndication/feed/synd/SyndEntryImpl.java
+++ b/src/main/java/com/sun/syndication/feed/synd/SyndEntryImpl.java
@@ -26,6 +26,8 @@ import com.sun.syndication.feed.impl.CopyFromHelper;
import java.util.*;
import java.io.Serializable;
+import org.jdom2.Element;
+
/**
* Bean for entries of SyndFeedImpl feeds.
*
@@ -46,13 +48,13 @@ public class SyndEntryImpl implements Serializable,SyndEntry {
private List _authors;
private List _contributors;
private SyndFeed _source;
- private List _foreignMarkup;
+ private List _foreignMarkup;
private Object wireEntry; // com.sun.syndication.feed.atom.Entry or com.sun.syndication.feed.rss.Item
// ISSUE: some converters assume this is never null
- private List _categories = new ArrayList();
+ private List _categories = new ArrayList();
- private static final Set IGNORE_PROPERTIES = new HashSet();
+ private static final Set IGNORE_PROPERTIES = new HashSet();
/**
* Unmodifiable Set containing the convenience properties of this class.
@@ -60,7 +62,7 @@ public class SyndEntryImpl implements Serializable,SyndEntry {
* Convenience properties are mapped to Modules, for cloning the convenience properties
* can be ignored as the will be copied as part of the module cloning.
*/
- public static final Set CONVENIENCE_PROPERTIES = Collections.unmodifiableSet(IGNORE_PROPERTIES);
+ public static final Set CONVENIENCE_PROPERTIES = Collections.unmodifiableSet(IGNORE_PROPERTIES);
static {
IGNORE_PROPERTIES.add("publishedDate");
@@ -119,7 +121,7 @@ public class SyndEntryImpl implements Serializable,SyndEntry {
return false;
}
// can't use foreign markup in equals, due to JDOM equals impl
- Object fm = getForeignMarkup();
+ List fm = getForeignMarkup();
setForeignMarkup(((SyndEntryImpl)other).getForeignMarkup());
boolean ret = _objBean.equals(other);
// restore foreign markup
@@ -448,7 +450,7 @@ public class SyndEntryImpl implements Serializable,SyndEntry {
*
* @param links The links to set.
*/
- public void setLinks(List links) {
+ public void setLinks(List links) {
_links = links;
}
@@ -470,14 +472,14 @@ public class SyndEntryImpl implements Serializable,SyndEntry {
_updatedDate = new Date(updatedDate.getTime());
}
- public List getAuthors() {
- return (_authors==null) ? (_authors=new ArrayList()) : _authors;
+ public List getAuthors() {
+ return (_authors==null) ? (_authors=new ArrayList()) : _authors;
}
/* (non-Javadoc)
* @see com.sun.syndication.feed.synd.SyndEntry#setAuthors(java.util.List)
*/
- public void setAuthors(List authors) {
+ public void setAuthors(List authors) {
_authors = authors;
}
@@ -525,14 +527,14 @@ public class SyndEntryImpl implements Serializable,SyndEntry {
}
}
- public List getContributors() {
- return (_contributors==null) ? (_contributors=new ArrayList()) : _contributors;
+ public List getContributors() {
+ return (_contributors==null) ? (_contributors=new ArrayList()) : _contributors;
}
/* (non-Javadoc)
* @see com.sun.syndication.feed.synd.SyndEntry#setContributors(java.util.List)
*/
- public void setContributors(List contributors) {
+ public void setContributors(List contributors) {
_contributors = contributors;
}
@@ -551,8 +553,8 @@ public class SyndEntryImpl implements Serializable,SyndEntry {
* an empty list if none.
*
*/
- public Object getForeignMarkup() {
- return (_foreignMarkup==null) ? (_foreignMarkup=new ArrayList()) : _foreignMarkup;
+ public List getForeignMarkup() {
+ return (_foreignMarkup==null) ? (_foreignMarkup=new ArrayList()) : _foreignMarkup;
}
/**
@@ -562,8 +564,8 @@ public class SyndEntryImpl implements Serializable,SyndEntry {
* an empty list if none.
*
*/
- public void setForeignMarkup(Object foreignMarkup) {
- _foreignMarkup = (List)foreignMarkup;
+ public void setForeignMarkup(List foreignMarkup) {
+ _foreignMarkup = (List)foreignMarkup;
}
public Object getWireEntry() {
diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndFeed.java b/src/main/java/com/sun/syndication/feed/synd/SyndFeed.java
index c6ba350..97e0dba 100644
--- a/src/main/java/com/sun/syndication/feed/synd/SyndFeed.java
+++ b/src/main/java/com/sun/syndication/feed/synd/SyndFeed.java
@@ -24,6 +24,8 @@ import com.sun.syndication.feed.module.Module;
import java.util.Date;
import java.util.List;
+import org.jdom2.Element;
+
/**
* Bean interface for all types of feeds.
*
@@ -486,7 +488,7 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable {
* an empty list or null if none.
*
*/
- void setModules(List modules);
+ void setModules(List modules);
/**
* Returns foreign markup found at channel level.
@@ -494,7 +496,7 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable {
* @return Opaque object to discourage use
*
*/
- public Object getForeignMarkup();
+ public List getForeignMarkup();
/**
* Sets foreign markup found at channel level.
@@ -502,7 +504,7 @@ public interface SyndFeed extends Cloneable, CopyFrom, Extendable {
* @param foreignMarkup Opaque object to discourage use
*
*/
- public void setForeignMarkup(Object foreignMarkup);
+ public void setForeignMarkup(List foreignMarkup);
/**
* Creates a deep clone of the object.
diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndFeedImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndFeedImpl.java
index 4e8ff37..64d8848 100644
--- a/src/main/java/com/sun/syndication/feed/synd/SyndFeedImpl.java
+++ b/src/main/java/com/sun/syndication/feed/synd/SyndFeedImpl.java
@@ -17,6 +17,7 @@
package com.sun.syndication.feed.synd;
import com.sun.syndication.feed.CopyFrom;
+import com.sun.syndication.feed.atom.Person;
import com.sun.syndication.feed.impl.ObjectBean;
import com.sun.syndication.feed.impl.CopyFromHelper;
import com.sun.syndication.feed.WireFeed;
@@ -28,6 +29,8 @@ import com.sun.syndication.feed.synd.impl.URINormalizer;
import java.util.*;
import java.io.Serializable;
+import org.jdom2.Element;
+
/**
* Bean for all types of feeds.
*
@@ -46,20 +49,20 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
private SyndContent _description;
private String _feedType;
private String _link;
- private List _links;
+ private List _links;
private SyndImage _image;
- private List _entries;
- private List _modules;
- private List _authors;
- private List _contributors;
- private List _foreignMarkup;
+ private List _entries;
+ private List _modules;
+ private List _authors;
+ private List _contributors;
+ private List _foreignMarkup;
private WireFeed wireFeed = null;
private boolean preserveWireFeed = false;
private static final Converters CONVERTERS = new Converters();
- private static final Set IGNORE_PROPERTIES = new HashSet();
+ private static final Set IGNORE_PROPERTIES = new HashSet();
/**
* Unmodifiable Set containing the convenience properties of this class.
@@ -68,7 +71,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
* can be ignored as the will be copied as part of the module cloning.
*/
- public static final Set CONVENIENCE_PROPERTIES = Collections.unmodifiableSet(IGNORE_PROPERTIES);
+ public static final Set CONVENIENCE_PROPERTIES = Collections.unmodifiableSet(IGNORE_PROPERTIES);
static {
IGNORE_PROPERTIES.add("publishedDate");
@@ -170,7 +173,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
return false;
}
// can't use foreign markup in equals, due to JDOM equals impl
- Object fm = getForeignMarkup();
+ List fm = getForeignMarkup();
setForeignMarkup(((SyndFeedImpl)other).getForeignMarkup());
boolean ret = _objBean.equals(other);
// restore foreign markup
@@ -543,7 +546,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
* an empty list if none.
*
*/
- public List getCategories() {
+ public List getCategories() {
return new SyndCategoryListFacade(getDCModule().getSubjects());
}
@@ -556,7 +559,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
* an empty list or null if none.
*
*/
- public void setCategories(List categories) {
+ public void setCategories(List categories) {
getDCModule().setSubjects(SyndCategoryListFacade.convertElementsSyndCategoryToSubject(categories));
}
@@ -567,8 +570,8 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
* an empty list if none.
*
*/
- public List getEntries() {
- return (_entries==null) ? (_entries=new ArrayList()) : _entries;
+ public List getEntries() {
+ return (_entries==null) ? (_entries=new ArrayList()) : _entries;
}
/**
@@ -578,7 +581,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
* an empty list or null if none.
*
*/
- public void setEntries(List entries) {
+ public void setEntries(List entries) {
_entries = entries;
}
@@ -613,9 +616,9 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
* an empty list if none.
*
*/
- public List getModules() {
+ public List getModules() {
if (_modules==null) {
- _modules=new ArrayList();
+ _modules=new ArrayList();
}
if (ModuleUtils.getModule(_modules,DCModule.URI)==null) {
_modules.add(new DCModuleImpl());
@@ -631,7 +634,7 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
* an empty list or null if none.
*
*/
- public void setModules(List modules) {
+ public void setModules(List modules) {
_modules = modules;
}
@@ -693,8 +696,8 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*
* @return Returns the links.
*/
- public List getLinks() {
- return (_links==null) ? (_links=new ArrayList()) : _links;
+ public List getLinks() {
+ return (_links==null) ? (_links=new ArrayList()) : _links;
}
/**
@@ -702,15 +705,15 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
*
* @param links The links to set.
*/
- public void setLinks(List links) {
+ public void setLinks(List links) {
_links = links;
}
- public List getAuthors() {
- return (_authors==null) ? (_authors=new ArrayList()) : _authors;
+ public List getAuthors() {
+ return (_authors==null) ? (_authors=new ArrayList()) : _authors;
}
- public void setAuthors(List authors) {
+ public void setAuthors(List authors) {
this._authors = authors;
}
@@ -738,11 +741,11 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
getDCModule().setCreator(author);
}
- public List getContributors() {
- return (_contributors==null) ? (_contributors=new ArrayList()) : _contributors;
+ public List getContributors() {
+ return (_contributors==null) ? (_contributors=new ArrayList()) : _contributors;
}
- public void setContributors(List contributors) {
+ public void setContributors(List contributors) {
this._contributors = contributors;
}
@@ -752,8 +755,8 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
* @return Opaque object to discourage use
*
*/
- public Object getForeignMarkup() {
- return (_foreignMarkup==null) ? (_foreignMarkup=new ArrayList()) : _foreignMarkup;
+ public List getForeignMarkup() {
+ return (_foreignMarkup==null) ? (_foreignMarkup=new ArrayList()) : _foreignMarkup;
}
/**
@@ -762,8 +765,8 @@ public class SyndFeedImpl implements Serializable, SyndFeed {
* @param foreignMarkup Opaque object to discourage use
*
*/
- public void setForeignMarkup(Object foreignMarkup) {
- _foreignMarkup = (List)foreignMarkup;
+ public void setForeignMarkup(List foreignMarkup) {
+ _foreignMarkup = (List)foreignMarkup;
}
public boolean isPreservingWireFeed() {
diff --git a/src/main/java/com/sun/syndication/feed/synd/SyndPersonImpl.java b/src/main/java/com/sun/syndication/feed/synd/SyndPersonImpl.java
index c6c7989..19e20bc 100644
--- a/src/main/java/com/sun/syndication/feed/synd/SyndPersonImpl.java
+++ b/src/main/java/com/sun/syndication/feed/synd/SyndPersonImpl.java
@@ -36,7 +36,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
private String _name;
private String _uri;
private String _email;
- private List _modules;
+ private List _modules;
/**
* For implementations extending SyndContentImpl to be able to use the ObjectBean functionality
@@ -163,10 +163,10 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
* @return a list of ModuleImpl elements with the person modules,
* an empty list if none.
*/
- public List getModules()
+ public List getModules()
{
if (_modules==null) {
- _modules=new ArrayList();
+ _modules=new ArrayList();
}
return _modules;
}
@@ -178,7 +178,7 @@ public class SyndPersonImpl implements Serializable, SyndPerson {
* an empty list or null if none.
*
*/
- public void setModules(List modules) {
+ public void setModules(List modules) {
_modules = modules;
}
diff --git a/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom03.java b/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom03.java
index 74dd500..ff1612a 100644
--- a/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom03.java
+++ b/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom03.java
@@ -42,6 +42,8 @@ import java.util.List;
import java.util.Date;
import java.util.Iterator;
+import org.jdom2.Element;
+
/**
*/
public class ConverterForAtom03 implements Converter {
@@ -64,7 +66,7 @@ public class ConverterForAtom03 implements Converter {
syndFeed.setModules(ModuleUtils.cloneModules(aFeed.getModules()));
- if (((List)feed.getForeignMarkup()).size() > 0) {
+ if (((List)feed.getForeignMarkup()).size() > 0) {
syndFeed.setForeignMarkup(feed.getForeignMarkup());
}
@@ -81,7 +83,7 @@ public class ConverterForAtom03 implements Converter {
syndFeed.setLink(theLink.getHrefResolved());
}
// lump alternate and other links together
- List syndLinks = new ArrayList();
+ List syndLinks = new ArrayList();
if (aFeed.getAlternateLinks() != null
&& aFeed.getAlternateLinks().size() > 0) {
syndLinks.addAll(createSyndLinks(aFeed.getAlternateLinks()));
@@ -98,7 +100,7 @@ public class ConverterForAtom03 implements Converter {
}
- List aEntries = aFeed.getEntries();
+ List aEntries = aFeed.getEntries();
if (aEntries!=null) {
syndFeed.setEntries(createSyndEntries(aEntries, syndFeed.isPreservingWireFeed()));
}
@@ -111,7 +113,7 @@ public class ConverterForAtom03 implements Converter {
syndFeed.setLanguage(language);
}
- List authors = aFeed.getAuthors();
+ List authors = aFeed.getAuthors();
if (authors!=null && authors.size() > 0) {
syndFeed.setAuthors(createSyndPersons(authors));
}
@@ -128,9 +130,9 @@ public class ConverterForAtom03 implements Converter {
}
- protected List createSyndLinks(List aLinks) {
- ArrayList sLinks = new ArrayList();
- for (Iterator iter = aLinks.iterator(); iter.hasNext();) {
+ protected List createSyndLinks(List aLinks) {
+ ArrayList sLinks = new ArrayList();
+ for (Iterator iter = aLinks.iterator(); iter.hasNext();) {
Link link = (Link)iter.next();
if (!link.getRel().equals("enclosure")) {
SyndLink sLink = createSyndLink(link);
@@ -149,8 +151,8 @@ public class ConverterForAtom03 implements Converter {
return syndLink;
}
- protected List createSyndEntries(List atomEntries, boolean preserveWireItems) {
- List syndEntries = new ArrayList();
+ protected List createSyndEntries(List atomEntries, boolean preserveWireItems) {
+ List syndEntries = new ArrayList();
for (int i=0;i 0) {
- syndEntry.setForeignMarkup((List)entry.getForeignMarkup());
+ if (((List)entry.getForeignMarkup()).size() > 0) {
+ syndEntry.setForeignMarkup((List)entry.getForeignMarkup());
}
syndEntry.setTitle(entry.getTitle());
@@ -179,10 +181,10 @@ public class ConverterForAtom03 implements Converter {
}
// Create synd enclosures from enclosure links
- List syndEnclosures = new ArrayList();
+ List syndEnclosures = new ArrayList();
if (entry.getOtherLinks() != null && entry.getOtherLinks().size() > 0) {
- List oLinks = entry.getOtherLinks();
- for (Iterator iter = oLinks.iterator(); iter.hasNext(); ) {
+ List oLinks = entry.getOtherLinks();
+ for (Iterator iter = oLinks.iterator(); iter.hasNext(); ) {
Link thisLink = (Link)iter.next();
if ("enclosure".equals(thisLink.getRel()))
syndEnclosures.add(createSyndEnclosure(entry, thisLink));
@@ -191,7 +193,7 @@ public class ConverterForAtom03 implements Converter {
syndEntry.setEnclosures(syndEnclosures);
// lump alternate and other links together
- List syndLinks = new ArrayList();
+ List syndLinks = new ArrayList();
if (entry.getAlternateLinks() != null
&& entry.getAlternateLinks().size() > 0) {
syndLinks.addAll(createSyndLinks(entry.getAlternateLinks()));
@@ -213,7 +215,7 @@ public class ConverterForAtom03 implements Converter {
Content content = entry.getSummary();
if (content==null) {
- List contents = entry.getContents();
+ List contents = entry.getContents();
if (contents!=null && contents.size()>0) {
content = (Content) contents.get(0);
}
@@ -225,9 +227,9 @@ public class ConverterForAtom03 implements Converter {
syndEntry.setDescription(sContent);
}
- List contents = entry.getContents();
+ List contents = entry.getContents();
if (contents.size()>0) {
- List sContents = new ArrayList();
+ List sContents = new ArrayList();
for (int i=0;i authors = entry.getAuthors();
if (authors!=null && authors.size() > 0) {
syndEntry.setAuthors(createSyndPersons(authors));
SyndPerson person0 = (SyndPerson)syndEntry.getAuthors().get(0);
@@ -292,11 +294,11 @@ public class ConverterForAtom03 implements Converter {
}
// separate SyndEntry's links collection into alternate and other links
- List alternateLinks = new ArrayList();
- List otherLinks = new ArrayList();
- List slinks = syndFeed.getLinks();
+ List alternateLinks = new ArrayList();
+ List otherLinks = new ArrayList();
+ List slinks = syndFeed.getLinks();
if (slinks != null) {
- for (Iterator iter=slinks.iterator(); iter.hasNext();) {
+ for (Iterator iter=slinks.iterator(); iter.hasNext();) {
SyndLink syndLink = (SyndLink)iter.next();
Link link = createAtomLink(syndLink);
if (link.getRel() == null ||
@@ -328,7 +330,7 @@ public class ConverterForAtom03 implements Converter {
aFeed.setLanguage(syndFeed.getLanguage());
- List authors = syndFeed.getAuthors();
+ List authors = syndFeed.getAuthors();
if (authors!=null && authors.size() > 0) {
aFeed.setAuthors(createAtomPersons(authors));
}
@@ -337,7 +339,7 @@ public class ConverterForAtom03 implements Converter {
aFeed.setModified(syndFeed.getPublishedDate());
- List sEntries = syndFeed.getEntries();
+ List sEntries = syndFeed.getEntries();
if (sEntries!=null) {
aFeed.setEntries(createAtomEntries(sEntries));
}
@@ -345,9 +347,9 @@ public class ConverterForAtom03 implements Converter {
return aFeed;
}
- protected static List createAtomPersons(List sPersons) {
- List persons = new ArrayList();
- for (Iterator iter = sPersons.iterator(); iter.hasNext(); ) {
+ protected static List createAtomPersons(List sPersons) {
+ List persons = new ArrayList();
+ for (Iterator iter = sPersons.iterator(); iter.hasNext(); ) {
SyndPerson sPerson = (SyndPerson)iter.next();
Person person = new Person();
person.setName(sPerson.getName());
@@ -359,9 +361,9 @@ public class ConverterForAtom03 implements Converter {
return persons;
}
- protected static List createSyndPersons(List aPersons) {
- List persons = new ArrayList();
- for (Iterator iter = aPersons.iterator(); iter.hasNext(); ) {
+ protected static List createSyndPersons(List aPersons) {
+ List persons = new ArrayList();
+ for (Iterator iter = aPersons.iterator(); iter.hasNext(); ) {
Person aPerson = (Person)iter.next();
SyndPerson person = new SyndPersonImpl();
person.setName(aPerson.getName());
@@ -373,8 +375,8 @@ public class ConverterForAtom03 implements Converter {
return persons;
}
- protected List createAtomEntries(List syndEntries) {
- List atomEntries = new ArrayList();
+ protected List createAtomEntries(List syndEntries) {
+ List atomEntries = new ArrayList();
for (int i=0;i alternateLinks = new ArrayList();
+ List otherLinks = new ArrayList();
+ List slinks = sEntry.getLinks();
if (slinks != null) {
- for (Iterator iter=slinks.iterator(); iter.hasNext();) {
+ for (Iterator iter=slinks.iterator(); iter.hasNext();) {
SyndLink syndLink = (SyndLink)iter.next();
Link link = createAtomLink(syndLink);
if (link.getRel() == null ||
@@ -427,9 +429,9 @@ public class ConverterForAtom03 implements Converter {
alternateLinks.add(link);
}
- List sEnclosures = sEntry.getEnclosures();
+ List sEnclosures = sEntry.getEnclosures();
if (sEnclosures != null) {
- for (Iterator iter=sEnclosures.iterator(); iter.hasNext();) {
+ for (Iterator iter=sEnclosures.iterator(); iter.hasNext();) {
SyndEnclosure syndEnclosure = (SyndEnclosure) iter.next();
Link link = createAtomEnclosure(syndEnclosure);
otherLinks.add(link);
@@ -449,9 +451,9 @@ public class ConverterForAtom03 implements Converter {
aEntry.setSummary(content);
}
- List contents = sEntry.getContents();
+ List contents = sEntry.getContents();
if (contents.size()>0) {
- List aContents = new ArrayList();
+ List aContents = new ArrayList();
for (int i=0;i sAuthors = sEntry.getAuthors();
if (sAuthors!=null && sAuthors.size() > 0) {
aEntry.setAuthors(createAtomPersons(sAuthors));
} else if (sEntry.getAuthor() != null) {
Person person = new Person();
person.setName(sEntry.getAuthor());
- List authors = new ArrayList();
+ List authors = new ArrayList();
authors.add(person);
aEntry.setAuthors(authors);
}
diff --git a/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom10.java b/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom10.java
index 8f9a6b3..751ceb4 100644
--- a/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom10.java
+++ b/src/main/java/com/sun/syndication/feed/synd/impl/ConverterForAtom10.java
@@ -21,6 +21,8 @@ import java.util.Date;
import java.util.Iterator;
import java.util.List;
+import org.jdom2.Element;
+
import com.sun.syndication.feed.WireFeed;
import com.sun.syndication.feed.atom.Category;
import com.sun.syndication.feed.atom.Content;
@@ -67,8 +69,8 @@ public class ConverterForAtom10 implements Converter {
syndFeed.setModules(ModuleUtils.cloneModules(aFeed.getModules()));
- if (((List)feed.getForeignMarkup()).size() > 0) {
- syndFeed.setForeignMarkup((List)feed.getForeignMarkup());
+ if (((List)feed.getForeignMarkup()).size() > 0) {
+ syndFeed.setForeignMarkup((List)feed.getForeignMarkup());
}
syndFeed.setEncoding(aFeed.getEncoding());
@@ -98,7 +100,7 @@ public class ConverterForAtom10 implements Converter {
syndFeed.setLink(theLink.getHrefResolved());
}
// lump alternate and other links together
- List syndLinks = new ArrayList();
+ List syndLinks = new ArrayList();
if (aFeed.getAlternateLinks() != null
&& aFeed.getAlternateLinks().size() > 0) {
syndLinks.addAll(createSyndLinks(aFeed.getAlternateLinks()));
@@ -109,7 +111,7 @@ public class ConverterForAtom10 implements Converter {
}
syndFeed.setLinks(syndLinks);
- List aEntries = aFeed.getEntries();
+ List aEntries = aFeed.getEntries();
if (aEntries!=null) {
syndFeed.setEntries(createSyndEntries(aFeed, aEntries, syndFeed.isPreservingWireFeed()));
}
@@ -117,12 +119,12 @@ public class ConverterForAtom10 implements Converter {
// Core Atom language/author/copyright/modified elements have precedence
// over DC equivalent info.
- List authors = aFeed.getAuthors();
+ List authors = aFeed.getAuthors();
if (authors!=null && authors.size() > 0) {
syndFeed.setAuthors(ConverterForAtom03.createSyndPersons(authors));
}
- List contributors = aFeed.getContributors();
+ List contributors = aFeed.getContributors();
if (contributors!=null && contributors.size() > 0) {
syndFeed.setContributors(ConverterForAtom03.createSyndPersons(contributors));
}
@@ -139,9 +141,9 @@ public class ConverterForAtom10 implements Converter {
}
- protected List createSyndLinks(List aLinks) {
- ArrayList sLinks = new ArrayList();
- for (Iterator iter = aLinks.iterator(); iter.hasNext();) {
+ protected List createSyndLinks(List aLinks) {
+ ArrayList sLinks = new ArrayList();
+ for (Iterator iter = aLinks.iterator(); iter.hasNext();) {
Link link = (Link)iter.next();
SyndLink sLink = createSyndLink(link);
sLinks.add(sLink);
@@ -149,8 +151,8 @@ public class ConverterForAtom10 implements Converter {
return sLinks;
}
- protected List createSyndEntries(Feed feed, List atomEntries, boolean preserveWireItems) {
- List syndEntries = new ArrayList();
+ protected List createSyndEntries(Feed feed, List atomEntries, boolean preserveWireItems) {
+ List syndEntries = new ArrayList();
for (int i=0;i 0) {
- syndEntry.setForeignMarkup((List)entry.getForeignMarkup());
+ if (((List)entry.getForeignMarkup()).size() > 0) {
+ syndEntry.setForeignMarkup((List)entry.getForeignMarkup());
}
Content eTitle = entry.getTitleEx();
@@ -178,24 +180,24 @@ public class ConverterForAtom10 implements Converter {
syndEntry.setDescription(createSyndContent(summary));
}
- List contents = entry.getContents();
+ List contents = entry.getContents();
if (contents != null && contents.size() > 0) {
- List sContents = new ArrayList();
- for (Iterator iter=contents.iterator(); iter.hasNext();) {
+ List sContents = new ArrayList();
+ for (Iterator iter=contents.iterator(); iter.hasNext();) {
Content content = (Content)iter.next();
sContents.add(createSyndContent(content));
}
syndEntry.setContents(sContents);
}
- List authors = entry.getAuthors();
+ List authors = entry.getAuthors();
if (authors!=null && authors.size() > 0) {
syndEntry.setAuthors(ConverterForAtom03.createSyndPersons(authors));
SyndPerson person0 = (SyndPerson)syndEntry.getAuthors().get(0);
syndEntry.setAuthor(person0.getName());
}
- List contributors = entry.getContributors();
+ List