marmotta-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ja...@apache.org
Subject [44/51] [abbrv] [partial] MARMOTTA-397: Reorganized and renamed Marmotta Sesame Tools
Date Wed, 08 Jan 2014 15:26:00 GMT
http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndEnclosureImpl.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndEnclosureImpl.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndEnclosureImpl.java
new file mode 100644
index 0000000..2bb64ba
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndEnclosureImpl.java
@@ -0,0 +1,155 @@
+package com.sun.syndication.feed.synd;
+
+import com.sun.syndication.feed.CopyFrom;
+import com.sun.syndication.feed.impl.ObjectBean;
+import com.sun.syndication.feed.impl.CopyFromHelper;
+
+import java.io.Serializable;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Collections;
+
+/**
+ * @author Alejandro Abdelnur
+ */
+public class SyndEnclosureImpl implements Serializable,SyndEnclosure {
+    private ObjectBean _objBean;
+    private String _url;
+    private String _type;
+    private long   _length;
+
+    /**
+     * Default constructor. All properties are set to <b>null</b>.
+     * <p>
+     *
+     */
+    public SyndEnclosureImpl() {
+        _objBean = new ObjectBean(SyndEnclosure.class,this);
+    }
+
+    /**
+     * Creates a deep 'bean' clone of the object.
+     * <p>
+     * @return a clone of the object.
+     * @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
+     *
+     */
+    public Object clone() throws CloneNotSupportedException {
+        return _objBean.clone();
+    }
+
+    /**
+     * Indicates whether some other object is "equal to" this one as defined by the Object equals() method.
+     * <p>
+     * @param other he reference object with which to compare.
+     * @return <b>true</b> if 'this' object is equal to the 'other' object.
+     *
+     */
+    public boolean equals(Object other) {
+        return _objBean.equals(other);
+    }
+
+    /**
+     * Returns a hashcode value for the object.
+     * <p>
+     * It follows the contract defined by the Object hashCode() method.
+     * <p>
+     * @return the hashcode of the bean object.
+     *
+     */
+    public int hashCode() {
+        return _objBean.hashCode();
+    }
+
+    /**
+     * Returns the String representation for the object.
+     * <p>
+     * @return String representation for the object.
+     *
+     */
+    public String toString() {
+        return _objBean.toString();
+    }
+
+    /**
+     * Returns the enclosure URL.
+     * <p/>
+     *
+     * @return the enclosure URL, <b>null</b> if none.
+     */
+    public String getUrl() {
+        return _url;
+    }
+
+    /**
+     * Sets the enclosure URL.
+     * <p/>
+     *
+     * @param url the enclosure URL to set, <b>null</b> if none.
+     */
+    public void setUrl(String url) {
+        _url = url;
+    }
+
+    /**
+     * Returns the enclosure length.
+     * <p/>
+     *
+     * @return the enclosure length, <b>null</b> if none.
+     */
+    public long getLength() {
+        return _length;
+    }
+
+    /**
+     * Sets the enclosure length.
+     * <p/>
+     *
+     * @param length the enclosure length to set, <b>null</b> if none.
+     */
+    public void setLength(long length) {
+        _length = length;
+    }
+
+    /**
+     * Returns the enclosure type.
+     * <p/>
+     *
+     * @return the enclosure type, <b>null</b> if none.
+     */
+    public String getType() {
+        return _type;
+    }
+
+    /**
+     * Sets the enclosure type.
+     * <p/>
+     *
+     * @param type the enclosure type to set, <b>null</b> if none.
+     */
+    public void setType(String type) {
+        _type = type;
+    }
+
+    public Class<? extends CopyFrom> getInterface() {
+        return SyndEnclosure.class;
+    }
+
+    public void copyFrom(CopyFrom obj) {
+        COPY_FROM_HELPER.copy(this,obj);
+    }
+
+    private static final CopyFromHelper COPY_FROM_HELPER;
+
+    static {
+        Map basePropInterfaceMap = new HashMap();
+        basePropInterfaceMap.put("url",String.class);
+        basePropInterfaceMap.put("type",String.class);
+        basePropInterfaceMap.put("length",Long.TYPE);
+
+        Map basePropClassImplMap = Collections.EMPTY_MAP;
+
+        COPY_FROM_HELPER = new CopyFromHelper(SyndEnclosure.class,basePropInterfaceMap,basePropClassImplMap);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndEntry.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndEntry.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndEntry.java
new file mode 100644
index 0000000..fb7a286
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndEntry.java
@@ -0,0 +1,390 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package com.sun.syndication.feed.synd;
+
+import java.util.Date;
+import java.util.List;
+
+import com.sun.syndication.feed.CopyFrom;
+import com.sun.syndication.feed.module.Extendable;
+import com.sun.syndication.feed.module.Module;
+
+/**
+ * Bean interface for entries of SyndFeedImpl feeds.
+ * <p>
+ * @author Alejandro Abdelnur
+ *
+ */
+public interface SyndEntry extends Cloneable, CopyFrom, Extendable {
+
+    /**
+     * Returns the entry URI.
+     * <p>
+     * How the entry URI maps to a concrete feed type (RSS or Atom) depends on
+     * the concrete feed type. This is explained in detail in Rome documentation,
+     * <a href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI mapping</a>.
+     * <p>
+     * The returned URI is a normalized URI as specified in RFC 2396bis.
+     * <p>
+     * @return the entry URI, <b>null</b> if none.
+     *
+     */
+    String getUri();
+
+    /**
+     * Sets the entry URI.
+     * <p>
+     * How the entry URI maps to a concrete feed type (RSS or Atom) depends on
+     * the concrete feed type. This is explained in detail in Rome documentation,
+     * <a href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI mapping</a>.
+     * <p>
+     * @param uri the entry URI to set, <b>null</b> if none.
+     *
+     */
+    void setUri(String uri);
+
+    /**
+     * Returns the entry title.
+     * <p>
+     * @return the entry title, <b>null</b> if none.
+     *
+     */
+    String getTitle();
+
+    /**
+     * Sets the entry title.
+     * <p>
+     * @param title the entry title to set, <b>null</b> if none.
+     *
+     */
+    void setTitle(String title);
+
+    /**
+     * Returns the entry title as a text construct.
+     * <p>
+     * @return the entry title, <b>null</b> if none.
+     *
+     */
+    SyndContent getTitleEx();
+
+    /**
+     * Sets the entry title as a text construct.
+     * <p>
+     * @param title the entry title to set, <b>null</b> if none.
+     *
+     */
+    void setTitleEx(SyndContent title);
+
+    /**
+     * Returns the entry link.
+     * <p>
+     * @return the entry link, <b>null</b> if none.
+     *
+     */
+    String getLink();
+
+    /**
+     * Sets the entry link.
+     * <p>
+     * @param link the entry link to set, <b>null</b> if none.
+     *
+     */
+    void setLink(String link);
+
+    /**
+     * Returns the entry links
+     * <p>
+     * @return the entry links, <b>null</b> if none.
+     *
+     */
+    List<SyndLink> getLinks();
+
+    /**
+     * Sets the entry links.
+     * <p>
+     * @param links the entry links to set, <b>null</b> if none.
+     *
+     */
+    void setLinks(List<SyndLink> links);
+
+    /**
+     * Returns the entry description.
+     * <p>
+     * @return the entry description, <b>null</b> if none.
+     *
+     */
+    SyndContent getDescription();
+
+    /**
+     * Sets the entry description.
+     * <p>
+     * @param description the entry description to set, <b>null</b> if none.
+     *
+     */
+    void setDescription(SyndContent description);
+
+    /**
+     * Returns the entry contents.
+     * <p>
+     * @return a list of SyndContentImpl elements with the entry contents,
+     *         an empty list if none.
+     *
+     */
+    List<SyndContent> getContents();
+
+    /**
+     * Sets the entry contents.
+     * <p>
+     * @param contents the list of SyndContentImpl elements with the entry contents to set,
+     *        an empty list or <b>null</b> if none.
+     *
+     */
+    void setContents(List<SyndContent> contents);
+
+    /**
+     * Returns the entry enclosures.
+     * <p>
+     * @return a list of SyndEnclosure elements with the entry enclosures,
+     *         an empty list if none.
+     *
+     */
+    public List<SyndEnclosure> getEnclosures();
+
+    /**
+     * Sets the entry enclosures.
+     * <p>
+     * @param enclosures the list of SyndEnclosure elements with the entry enclosures to set,
+     *        an empty list or <b>null</b> if none.
+     *
+     */
+    public void setEnclosures(List<SyndEnclosure> enclosures);
+
+    /**
+     * Returns the entry published date.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module date.
+     * <p>
+     * @return the entry published date, <b>null</b> if none.
+     *
+     */
+    Date getPublishedDate();
+
+    /**
+     * Sets the entry published date.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module date.
+     * <p>
+     * @param publishedDate the entry published date to set, <b>null</b> if none.
+     *
+     */
+    void setPublishedDate(Date publishedDate);
+
+    /**
+     * Returns the entry updated date.
+     * <p>
+     * @return the entry updated date, <b>null</b> if none.
+     *
+     */
+    Date getUpdatedDate();
+
+    /**
+     * Sets the entry updated date.
+     * <p>
+     * @param updatedDate the entry updated date to set, <b>null</b> if none.
+     *
+     */
+    void setUpdatedDate(Date updatedDate);
+
+    /**
+     * Returns the entry authors.
+     * <p>
+     * For Atom feeds, this returns the authors as a list of SyndPerson objects, 
+     * for RSS feeds this method is a convenience method, it maps to the 
+     * Dublin Core module creator.
+     * <p>
+     * @return the feed author, <b>null</b> if none.
+     *
+     */
+    List<SyndPerson> getAuthors();
+
+    /**
+     * Sets the entry author.
+     * <p>
+     * For Atom feeds, this sets the authors as a list of SyndPerson 
+     * objects, for RSS feeds this method is a convenience method, it maps 
+     * to the Dublin Core module creator.
+     * <p>
+     * @param authors the feed author to set, <b>null</b> if none.
+     *
+     */
+    void setAuthors(List<SyndPerson> authors);
+    
+    /**
+     * Returns the name of the first entry author in the collection of authors.
+     * <p>
+     * For Atom feeds, this returns the authors as a list of SyndPerson objects, 
+     * for RSS feeds this method is a convenience method, it maps to the 
+     * Dublin Core module creator.
+     * <p>
+     * @return the feed author, <b>null</b> if none.
+     *
+     */
+    String getAuthor();
+
+    /**
+     * Sets the entry author.
+     * <p>
+     * For Atom feeds, this sets the feed author's name, for RSS feeds 
+     * this method is a convenience method, it maps to the Dublin Core 
+     * module creator.
+     * <p>
+     * @param author the feed author to set, <b>null</b> if none.
+     */
+    void setAuthor(String author);
+    
+    /**
+     * Returns the feed author.
+     * <p>
+     * For Atom feeds, this returns the contributors as a list of 
+     * SyndPerson objects
+     * <p>
+     * @return the feed author, <b>null</b> if none.
+     *
+     */
+    List<SyndPerson> getContributors();
+
+    /**
+     * Sets the feed contributors.
+     * <p>
+     * Returns contributors as a list of SyndPerson objects.
+     * <p>
+     * @param contributors the feed contributors to set, <b>null</b> if none.
+     *
+     */
+    void setContributors(List<SyndPerson> contributors);
+
+    /**
+     * Returns the entry categories.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module subjects.
+     * <p>
+     * @return a list of SyndCategoryImpl elements with the entry categories,
+     *         an empty list if none.
+     *
+     */
+    List<SyndCategory> getCategories();
+
+    /**
+     * Sets the entry categories.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module subjects.
+     * <p>
+     * @param categories the list of SyndCategoryImpl elements with the entry categories to set,
+     *        an empty list or <b>null</b> if none.
+     *
+     */
+    void setCategories(List<SyndCategory> categories);
+    
+    /**
+     * Returns the entry source.
+     * <p>
+     * This returns the entry source as a SyndFeed
+     * <p>
+     * @return the SyndFeed to which this entry is attributed
+     * 
+     */
+    SyndFeed getSource();
+    
+    /**
+     * Sets the entry source feed (for use if different from containing feed)
+     * <p>
+     * @param source the original SyndFeed that contained this article
+     * 
+     */
+    void setSource(SyndFeed source);
+    
+    /**
+     * Return the original item this SyndEntry is generated from. 
+     * The type of the object returned depends on the original type of 
+     * the feed. Atom 0.3/1.0 will return com.sun.syndication.feed.atom.Entry,
+     * while RSS will return com.sun.syndication.feed.rss.Item.java.
+     * If this entry was not generated from a WireFeed, or the SyndFeed
+     * was not set to preserve the WireFeed then it will return null
+     * 
+     * @return the WireFeed Item or Entry this Entry is generated from, or null 
+     */
+    Object getWireEntry();
+
+    
+    /**
+     * Returns the module identified by a given URI.
+     * <p>
+     * @param uri the URI of the ModuleImpl.
+     * @return The module with the given URI, <b>null</b> if none.
+     */
+    public Module getModule(String uri);
+
+    /**
+     * Returns the entry modules.
+     * <p>
+     * @return a list of ModuleImpl elements with the entry modules,
+     *         an empty list if none.
+     *
+     */
+    List<Module> getModules();
+
+    /**
+     * Sets the entry modules.
+     * <p>
+     * @param modules the list of ModuleImpl elements with the entry modules to set,
+     *        an empty list or <b>null</b> if none.
+     *
+     */
+    void setModules(List<Module> modules);
+
+    /**
+     * Returns foreign markup found at channel level.
+     * <p>
+     * @return Opaque object to discourage use
+     *
+     */
+    public Object getForeignMarkup();
+
+    /**
+     * Sets foreign markup found at channel level.
+     * <p>
+     * @param foreignMarkup Opaque object to discourage use
+     *
+     */
+    public void setForeignMarkup(Object foreignMarkup);
+    
+    /**
+     * Creates a deep clone of the object.
+     * <p>
+     * @return a clone of the object.
+     * @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
+     *
+     */
+    public Object clone() throws CloneNotSupportedException;
+
+    /**
+     * Returns the first instance of a SyndLink with the specified relation, or null
+     *
+     */
+    public SyndLink findRelatedLink(String relation);
+
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndEntryImpl.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndEntryImpl.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndEntryImpl.java
new file mode 100644
index 0000000..13119cd
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndEntryImpl.java
@@ -0,0 +1,585 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package com.sun.syndication.feed.synd;
+
+import com.sun.syndication.feed.CopyFrom;
+import com.sun.syndication.feed.impl.ObjectBean;
+import com.sun.syndication.feed.module.*;
+import com.sun.syndication.feed.module.impl.ModuleUtils;
+import com.sun.syndication.feed.synd.impl.URINormalizer;
+import com.sun.syndication.feed.impl.CopyFromHelper;
+
+import java.util.*;
+import java.io.Serializable; 
+
+/**
+ * Bean for entries of SyndFeedImpl feeds.
+ * <p>
+ * @author Alejandro Abdelnur
+ *
+ */
+public class SyndEntryImpl implements Serializable,SyndEntry {
+    private ObjectBean _objBean;
+    private String _uri;
+    private String _link;
+    private Date _updatedDate;
+    private SyndContent _title;       
+    private SyndContent _description;
+    private List<SyndLink> _links;
+    private List<SyndContent> _contents; // deprecated by Atom 1.0
+    private List<Module> _modules;
+    private List<SyndEnclosure> _enclosures;
+    private List<SyndPerson> _authors;
+    private List<SyndPerson> _contributors;
+    private SyndFeed _source;
+    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 static final Set IGNORE_PROPERTIES = new HashSet();
+
+    /**
+     * Unmodifiable Set containing the convenience properties of this class.
+     * <p>
+     * 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);
+
+    static {
+        IGNORE_PROPERTIES.add("publishedDate");
+        IGNORE_PROPERTIES.add("author");
+    }
+
+    /**
+     * For implementations extending SyndEntryImpl to be able to use the ObjectBean functionality
+     * with extended interfaces.
+     * <p>
+     * @param beanClass
+     * @param convenienceProperties set containing the convenience properties of the SyndEntryImpl
+     * (the are ignored during cloning, check CloneableBean for details).
+     *
+     */
+    protected SyndEntryImpl(Class beanClass,Set convenienceProperties) {
+        _objBean = new ObjectBean(beanClass,this,convenienceProperties);
+    }
+
+    /**
+     * Default constructor. All properties are set to <b>null</b>.
+     * <p>
+     *
+     */
+    public SyndEntryImpl() {
+        this(SyndEntry.class,IGNORE_PROPERTIES);
+    }
+
+    /**
+     * Creates a deep 'bean' clone of the object.
+     * <p>
+     * @return a clone of the object.
+     * @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
+     *
+     */
+    @Override
+    public Object clone() throws CloneNotSupportedException {
+        return _objBean.clone();
+    }
+
+    /**
+     * Indicates whether some other object is "equal to" this one as defined by the Object equals() method.
+     * <p>
+     * @param other he reference object with which to compare.
+     * @return <b>true</b> if 'this' object is equal to the 'other' object.
+     *
+     */
+    @Override
+    public boolean equals(Object other) {
+        if (other == null) {
+            return false;
+        }
+        // while ObjectBean does this check this method does a cast to obtain the foreign markup
+        // so we need to check before doing so.
+        if (!(other instanceof SyndEntryImpl)) {
+            return false;
+        }
+        // can't use foreign markup in equals, due to JDOM equals impl
+        Object fm = getForeignMarkup();
+        setForeignMarkup(((SyndEntryImpl)other).getForeignMarkup());              
+        boolean ret = _objBean.equals(other);
+        // restore foreign markup
+        setForeignMarkup(fm);
+        return ret;
+    }
+
+    /**
+     * Returns a hashcode value for the object.
+     * <p>
+     * It follows the contract defined by the Object hashCode() method.
+     * <p>
+     * @return the hashcode of the bean object.
+     *
+     */
+    @Override
+    public int hashCode() {
+        return _objBean.hashCode();
+    }
+
+    /**
+     * Returns the String representation for the object.
+     * <p>
+     * @return String representation for the object.
+     *
+     */
+    @Override
+    public String toString() {
+        return _objBean.toString();
+    }
+
+
+    /**
+     * Returns the entry URI.
+     * <p>
+     * How the entry URI maps to a concrete feed type (RSS or Atom) depends on
+     * the concrete feed type. This is explained in detail in Rome documentation,
+     * <a href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI mapping</a>.
+     * <p>
+     * The returned URI is a normalized URI as specified in RFC 2396bis.
+     * <p>
+     * @return the entry URI, <b>null</b> if none.
+     *
+     */
+    public String getUri() {
+        return _uri;
+    }
+
+    /**
+     * Sets the entry URI.
+     * <p>
+     * How the entry URI maps to a concrete feed type (RSS or Atom) depends on
+     * the concrete feed type. This is explained in detail in Rome documentation,
+     * <a href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI mapping</a>.
+     * <p>
+     * @param uri the entry URI to set, <b>null</b> if none.
+     *
+     */
+    public void setUri(String uri) {
+        _uri = URINormalizer.normalize(uri);
+    }
+
+    /**
+     * Returns the entry title.
+     * <p>
+     * @return the entry title, <b>null</b> if none.
+     *
+     */
+    public String getTitle() {
+        if (_title != null) return _title.getValue();
+        return null;
+    }
+
+    /**
+     * Sets the entry title.
+     * <p>
+     * @param title the entry title to set, <b>null</b> if none.
+     *
+     */
+    public void setTitle(String title) {
+        if (_title == null) _title = new SyndContentImpl();
+        _title.setValue(title);
+    }
+
+    /**
+     * Returns the entry title as a text construct.
+     * <p>
+     * @return the entry title, <b>null</b> if none.
+     *
+     */
+    public SyndContent getTitleEx() {
+        return _title;
+    }
+
+    /**
+     * Sets the entry title as a text construct.
+     * <p>
+     * @param title the entry title to set, <b>null</b> if none.
+     *
+     */
+    public void setTitleEx(SyndContent title) {
+        _title = title;
+    }
+
+    /**
+     * Returns the entry link.
+     * <p>
+     * @return the entry link, <b>null</b> if none.
+     *
+     */
+    public String getLink() {
+        return _link;
+    }
+
+    /**
+     * Sets the entry link.
+     * <p>
+     * @param link the entry link to set, <b>null</b> if none.
+     *
+     */
+    public void setLink(String link) {
+        _link = link;
+    }
+
+    /**
+     * Returns the entry description.
+     * <p>
+     * @return the entry description, <b>null</b> if none.
+     *
+     */
+    public SyndContent getDescription() {
+        return _description;
+    }
+
+    /**
+     * Sets the entry description.
+     * <p>
+     * @param description the entry description to set, <b>null</b> if none.
+     *
+     */
+    public void setDescription(SyndContent description) {
+        _description = description;
+    }
+
+    /**
+     * Returns the entry contents.
+     * <p>
+     * @return a list of SyndContentImpl elements with the entry contents,
+     *         an empty list if none.
+     *
+     */
+    public List<SyndContent> getContents() {
+        return (_contents==null) ? (_contents=new ArrayList<SyndContent>()) : _contents;
+    }
+
+    /**
+     * Sets the entry contents.
+     * <p>
+     * @param contents the list of SyndContentImpl elements with the entry contents to set,
+     *        an empty list or <b>null</b> if none.
+     *
+     */
+    public void setContents(List<SyndContent> contents) {
+        _contents = contents;
+    }
+
+    /**
+     * Returns the entry enclosures.
+     * <p>
+     * @return a list of SyndEnclosure elements with the entry enclosures,
+     *         an empty list if none.
+     *
+     */
+    public List<SyndEnclosure> getEnclosures() {
+        return (_enclosures==null) ? (_enclosures=new ArrayList<SyndEnclosure>()) : _enclosures;
+    }
+
+    /**
+     * Sets the entry enclosures.
+     * <p>
+     * @param enclosures the list of SyndEnclosure elements with the entry enclosures to set,
+     *        an empty list or <b>null</b> if none.
+     *
+     */
+    public void setEnclosures(List<SyndEnclosure> enclosures) {
+        _enclosures = enclosures;
+    }
+
+
+    /**
+     * Returns the entry published date.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module date.
+     * <p>
+     * @return the entry published date, <b>null</b> if none.
+     *
+     */
+    public Date getPublishedDate() {
+        return getDCModule().getDate();
+    }
+
+    /**
+     * Sets the entry published date.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module date.
+     * <p>
+     * @param publishedDate the entry published date to set, <b>null</b> if none.
+     *
+     */
+    public void setPublishedDate(Date publishedDate) {
+        getDCModule().setDate(publishedDate);
+    }
+
+    /**
+     * Returns the entry categories.
+     * <p>
+     * @return a list of SyndCategoryImpl elements with the entry categories,
+     *         an empty list if none.
+     *
+     */
+    public List<SyndCategory> getCategories() {
+       return _categories;
+    }
+
+    /**
+     * Sets the entry categories.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module subjects.
+     * <p>
+     * @param categories the list of SyndCategoryImpl elements with the entry categories to set,
+     *        an empty list or <b>null</b> if none.
+     *
+     */
+    public void setCategories(List<SyndCategory> categories) {
+        _categories = categories;
+    }
+
+    /**
+     * Returns the entry modules.
+     * <p>
+     * @return a list of ModuleImpl elements with the entry modules,
+     *         an empty list if none.
+     *
+     */
+    public List<Module> getModules() {
+        if  (_modules==null) {
+            _modules=new ArrayList<Module>();
+        }
+        if (ModuleUtils.getModule(_modules,DCModule.URI)==null) {
+            _modules.add(new DCModuleImpl());
+        }
+        return _modules;
+    }
+
+    /**
+     * Sets the entry modules.
+     * <p>
+     * @param modules the list of ModuleImpl elements with the entry modules to set,
+     *        an empty list or <b>null</b> if none.
+     *
+     */
+    public void setModules(List<Module> modules) {
+        _modules = modules;
+    }
+
+    /**
+     * Returns the module identified by a given URI.
+     * <p>
+     * @param uri the URI of the ModuleImpl.
+     * @return The module with the given URI, <b>null</b> if none.
+     */
+    public Module getModule(String uri) {
+        return ModuleUtils.getModule(getModules(),uri);
+    }
+
+    /**
+     * Returns the Dublin Core module of the feed.
+     * @return the DC module, it's never <b>null</b>
+     *
+     */
+    private DCModule getDCModule() {
+        return (DCModule) getModule(DCModule.URI);
+    }
+
+    public Class getInterface() {
+        return SyndEntry.class;
+    }
+
+    public void copyFrom(CopyFrom obj) {
+        COPY_FROM_HELPER.copy(this,obj);
+    }
+
+    private static final CopyFromHelper COPY_FROM_HELPER;
+
+    static {
+        Map basePropInterfaceMap = new HashMap();
+        basePropInterfaceMap.put("uri",String.class);
+        basePropInterfaceMap.put("title",String.class);
+        basePropInterfaceMap.put("link",String.class);
+        basePropInterfaceMap.put("uri",String.class);
+        basePropInterfaceMap.put("description",SyndContent.class);
+        basePropInterfaceMap.put("contents",SyndContent.class);
+        basePropInterfaceMap.put("enclosures",SyndEnclosure.class);
+        basePropInterfaceMap.put("modules",Module.class);
+
+        Map basePropClassImplMap = new HashMap();
+        basePropClassImplMap.put(SyndContent.class,SyndContentImpl.class);
+        basePropClassImplMap.put(SyndEnclosure.class,SyndEnclosureImpl.class);
+        basePropClassImplMap.put(DCModule.class,DCModuleImpl.class);
+        basePropClassImplMap.put(SyModule.class,SyModuleImpl.class);
+
+        COPY_FROM_HELPER = new CopyFromHelper(SyndEntry.class,basePropInterfaceMap,basePropClassImplMap);
+    }
+
+    /**
+     * Returns the links
+     * <p>
+     * @return Returns the links.
+     */
+    public List<SyndLink> getLinks() {
+        return (_links==null) ? (_links=new ArrayList<SyndLink>()) : _links;
+    }
+    
+    /**
+     * Set the links
+     * <p>
+     * @param links The links to set.
+     */
+    public void setLinks(List links) {
+        _links = links;
+    }    
+    
+    /**
+     * Returns the updatedDate
+     * <p>
+     * @return Returns the updatedDate.
+     */
+    public Date getUpdatedDate() {
+        return _updatedDate == null ? null : new Date(_updatedDate.getTime());
+    }
+    
+    /**
+     * Set the updatedDate
+     * <p>
+     * @param updatedDate The updatedDate to set.
+     */
+    public void setUpdatedDate(Date updatedDate) {
+        _updatedDate = new Date(updatedDate.getTime());
+    }
+
+    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) {
+        _authors = authors;
+    }
+
+    /**
+     * Returns the entry author.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module creator.
+     * <p>
+     * @return the entry author, <b>null</b> if none.
+     *
+     */
+    public String getAuthor() {
+        String author;
+        
+        // Start out looking for one or more authors in _authors. For non-Atom
+        // feeds, _authors may actually be null.
+        if ((_authors != null) && (_authors.size() > 0)) {
+            author = ((SyndPerson)_authors.get(0)).getName();
+        } else {
+            author = getDCModule().getCreator();
+        }
+        if (author == null) {
+            author = "";
+        }
+        
+        return author;
+    }
+
+    /**
+     * Sets the entry author.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module creator.
+     * <p>
+     * @param author the entry author to set, <b>null</b> if none.
+     *
+     */
+    public void setAuthor(String author) {
+        // Get the DCModule so that we can check to see if "creator" is already
+        // set.
+        DCModule dcModule = getDCModule();
+        String currentValue = dcModule.getCreator();
+        
+        if ((currentValue == null) || (currentValue.length() == 0)) {
+            getDCModule().setCreator(author);
+        }
+    }
+    
+    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) {
+        _contributors = contributors;
+    }
+    
+    public SyndFeed getSource() {
+    	return _source;
+    }
+    
+    public void setSource(SyndFeed source) {
+    	_source = source;
+    }
+    
+    /**
+     * Returns foreign markup found at channel level.
+     * <p>
+     * @return list of JDOM nodes containing channel-level foreign markup,
+     *         an empty list if none.
+     *
+     */
+    public Object getForeignMarkup() {
+        return (_foreignMarkup==null) ? (_foreignMarkup=new ArrayList()) : _foreignMarkup;
+    }
+
+    /**
+     * Sets foreign markup found at channel level.
+     * <p>
+     * @param foreignMarkup list of JDOM nodes containing channel-level foreign markup,
+     *         an empty list if none.
+     *
+     */
+    public void setForeignMarkup(Object foreignMarkup) {
+        _foreignMarkup = (List)foreignMarkup;
+    }
+
+	public Object getWireEntry() {
+		return wireEntry;
+	}    
+	
+	public void setWireEntry(Object wireEntry) {
+		this.wireEntry = wireEntry;
+	}
+
+    public SyndLink findRelatedLink(String relation) {
+        for(SyndLink l : this.getLinks()){
+            if(relation.equals(l.getRel())){
+                return l;
+            }
+        }
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndFeed.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndFeed.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndFeed.java
new file mode 100644
index 0000000..c6ba350
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndFeed.java
@@ -0,0 +1,516 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package com.sun.syndication.feed.synd;
+
+import com.sun.syndication.feed.CopyFrom;
+import com.sun.syndication.feed.WireFeed;
+import com.sun.syndication.feed.module.Extendable;
+import com.sun.syndication.feed.module.Module;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Bean interface for all types of feeds.
+ * <p>
+ * It handles all RSS versions and Atom 0.3, it normalizes all info, it may lose information.
+ * <p>
+ * @author Alejandro Abdelnur
+ *
+ */
+public interface SyndFeed extends Cloneable, CopyFrom, Extendable {
+
+    /**
+     * Returns the real feed types the SyndFeedImpl supports when converting from and to.
+     * <p>
+     * @return the real feed type supported.
+     */
+    List<String> getSupportedFeedTypes();
+
+    /**
+     * Creates a real feed containing the information of the SyndFeedImpl.
+     * <p>
+     * The feed type of the created WireFeed is taken from the SyndFeedImpl feedType property.
+     * <p>
+     * @return the real feed.
+     *
+     */
+    WireFeed createWireFeed();
+
+    /**
+     * Creates a real feed containing the information of the SyndFeedImpl.
+     * <p>
+     * @param feedType the feed type for the WireFeed to be created.
+     * @return the real feed.
+     *
+     */
+    WireFeed createWireFeed(String feedType);
+
+    /**
+     * Returns the WireFeed this SyndFeed was created from. 
+     * Will return null if the original feed is not stored or if this SyndFeed was not created from a WireFeed
+     * 
+     * @return The WireFeed this was created from, or null
+     * 
+     */
+    WireFeed originalWireFeed();
+    
+    /**
+     * 
+     * @return true if this SyndFeed preserves the WireFeed it was created from
+     */
+    boolean isPreservingWireFeed(); 
+
+    /**
+     * Returns the wire feed type the feed had/will-have when converted from/to a WireFeed.
+     * <p>
+     * @return the feed type, <b>null</b> if none.
+     *
+     */
+    String getFeedType();
+
+    /**
+     * Sets the wire feed type the feed will-have when coverted to a WireFeed.
+     * <p>
+     * @param feedType the feed type to set, <b>null</b> if none.
+     *
+     */
+    void setFeedType(String feedType);
+
+    /**
+     * Returns the charset encoding of a the feed. This is not set by Rome parsers.
+     * <p>
+     * @return the charset encoding of the feed.
+     *
+     */
+    public String getEncoding();
+
+    /**
+     * Sets the charset encoding of a the feed. This is not set by Rome parsers.
+     * <p>
+     * @param encoding the charset encoding of the feed.
+     *
+     */
+    public void setEncoding(String encoding);
+
+    /**
+     * Returns the feed URI.
+     * <p>
+     * How the feed URI maps to a concrete feed type (RSS or Atom) depends on
+     * the concrete feed type. This is explained in detail in Rome documentation,
+     * <a href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI mapping</a>.
+     * <p>
+     * The returned URI is a normalized URI as specified in RFC 2396bis.
+     * <p>
+     * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is
+     * the GUID, for RSS 1.0 this is the URI attribute of the item. The Link
+     * is the URL that the item is accessible under, the URI is the
+     * permanent identifier which the aggregator should use to reference
+     * this item. Often the URI will use some standardized identifier scheme
+     * such as DOI's so that items can be identified even if they appear in
+     * multiple feeds with different "links" (they might be on different
+     * hosting platforms but be the same item). Also, though rare, there
+     * could be multiple items with the same link but a different URI and
+     * associated metadata which need to be treated as distinct entities.
+     * In the RSS 1.0 case the URI must be a valid RDF URI reference.
+     * <p>
+     * @return the feed URI, <b>null</b> if none.
+     *
+     */
+    String getUri();
+
+    /**
+     * Sets the feed URI.
+     * <p>
+     * How the feed URI maps to a concrete feed type (RSS or Atom) depends on
+     * the concrete feed type. This is explained in detail in Rome documentation,
+     * <a href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI mapping</a>.
+     * <p>
+     * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is
+     * the GUID, for RSS 1.0 this is the URI attribute of the item. The Link
+     * is the URL that the item is accessible under, the URI is the
+     * permanent identifier which the aggregator should use to reference
+     * this item. Often the URI will use some standardized identifier scheme
+     * such as DOI's so that items can be identified even if they appear in
+     * multiple feeds with different "links" (they might be on different
+     * hosting platforms but be the same item). Also, though rare, there
+     * could be multiple items with the same link but a different URI and
+     * associated metadata which need to be treated as distinct entities.
+     * In the RSS 1.0 case the URI must be a valid RDF URI reference.
+     * <p>
+     * @param uri the feed URI to set, <b>null</b> if none.
+     *
+     */
+    void setUri(String uri);
+
+    /**
+     * Returns the feed title.
+     * <p>
+     * @return the feed title, <b>null</b> if none.
+     *
+     */
+    String getTitle();
+
+    /**
+     * Sets the feed title.
+     * <p>
+     * @param title the feed title to set, <b>null</b> if none.
+     *
+     */
+    void setTitle(String title);
+
+    /**
+     * Returns the feed title.
+     * <p>
+     * @return the feed title, <b>null</b> if none.
+     *
+     */
+    SyndContent getTitleEx();
+
+    /**
+     * Sets the feed title.
+     * <p>
+     * @param title the feed title to set, <b>null</b> if none.
+     *
+     */
+    void setTitleEx(SyndContent title);
+
+    /**
+     * Returns the feed link.
+     * <p>
+     * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is
+     * the GUID, for RSS 1.0 this is the URI attribute of the item. The Link
+     * is the URL that the item is accessible under, the URI is the
+     * permanent identifier which the aggregator should use to reference
+     * this item. Often the URI will use some standardized identifier scheme
+     * such as DOI's so that items can be identified even if they appear in
+     * multiple feeds with different "links" (they might be on different
+     * hosting platforms but be the same item). Also, though rare, there
+     * could be multiple items with the same link but a different URI and
+     * associated metadata which need to be treated as distinct entities.
+     * In the RSS 1.0 case the URI must be a valid RDF URI reference.
+     * <p>
+     * @return the feed link, <b>null</b> if none.
+     *
+     */
+    String getLink();
+
+    /**
+     * Sets the feed link.
+     * <p>
+     * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is
+     * the GUID, for RSS 1.0 this is the URI attribute of the item. The Link
+     * is the URL that the item is accessible under, the URI is the
+     * permanent identifier which the aggregator should use to reference
+     * this item. Often the URI will use some standardized identifier scheme
+     * such as DOI's so that items can be identified even if they appear in
+     * multiple feeds with different "links" (they might be on different
+     * hosting platforms but be the same item). Also, though rare, there
+     * could be multiple items with the same link but a different URI and
+     * associated metadata which need to be treated as distinct entities.
+     * In the RSS 1.0 case the URI must be a valid RDF URI reference.
+     * <p>
+     * @param link the feed link to set, <b>null</b> if none.
+     *
+     */
+    void setLink(String link);
+
+    /**
+     * Returns the entry links
+     * <p>
+     * @return the entry links, <b>null</b> if none.
+     *
+     */
+    List<SyndLink> getLinks();
+
+    /**
+     * Sets the entry links.
+     * <p>
+     * @param links the entry links to set, <b>null</b> if none.
+     *
+     */
+    void setLinks(List<SyndLink> links);
+
+    /**
+     * Returns the feed description.
+     * <p>
+     * @return the feed description, <b>null</b> if none.
+     *
+     */
+    String getDescription();
+
+    /**
+     * Sets the feed description.
+     * <p>
+     * @param description the feed description to set, <b>null</b> if none.
+     *
+     */
+    void setDescription(String description);
+    
+    /**
+     * Returns the feed description as a text construct.
+     * <p>
+     * @return the feed description, <b>null</b> if none.
+     *
+     */
+    SyndContent getDescriptionEx();
+
+    /**
+     * Sets the feed description as a text construct.
+     * <p>
+     * @param description the feed description to set, <b>null</b> if none.
+     *
+     */
+    void setDescriptionEx(SyndContent description);
+
+    /**
+     * Returns the feed published date.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module date.
+     * <p>
+     * @return the feed published date, <b>null</b> if none.
+     *
+     */
+    Date getPublishedDate();
+
+    /**
+     * Sets the feed published date.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module date.
+     * <p>
+     * @param publishedDate the feed published date to set, <b>null</b> if none.
+     *
+     */
+    void setPublishedDate(Date publishedDate);
+
+    /**
+     * Returns the feed authors.
+     * <p>
+     * For Atom feeds, this returns the authors as a list of SyndPerson objects,
+     * for RSS feeds this method is a convenience method, it maps to the
+     * Dublin Core module creator.
+     * <p>
+     * @return the feed authors, <b>null</b> if none.
+     *
+     */
+    List<SyndPerson> getAuthors();
+
+    /**
+     * Sets the feed authors.
+     * <p>
+     * For Atom feeds, this sets the authors as a list of SyndPerson
+     * objects, for RSS feeds this method is a convenience method, it maps
+     * to the Dublin Core module creator.
+     * <p>
+     * @param authors the feed authors to set, <b>null</b> if none.
+     *
+     */
+    void setAuthors(List<SyndPerson> authors);
+
+    /**
+     * Returns the name of the first feed author in the collection of authors.
+     * <p>
+     * For Atom feeds, this returns the authors as a list of SyndPerson objects,
+     * for RSS feeds this method is a convenience method, it maps to the
+     * Dublin Core module creator.
+     * <p>
+     * @return the feed author, <b>null</b> if none.
+     *
+     */
+    String getAuthor();
+
+    /**
+     * Sets the feed author.
+     * <p>
+     * For Atom feeds, this sets the feed author's name, for RSS feeds
+     * this method is a convenience method, it maps to the Dublin Core
+     * module creator.
+     * <p>
+     * @param author the feed author to set, <b>null</b> if none.
+     *
+     */
+    void setAuthor(String author);
+
+    /**
+     * Returns the feed author.
+     * <p>
+     * For Atom feeds, this returns the contributors as a list of
+     * SyndPerson objects
+     * <p>
+     * @return the feed author, <b>null</b> if none.
+     *
+     */
+    public List<SyndPerson> getContributors();
+
+    /**
+     * Sets the feed author.
+     * <p>
+     * Returns contributors as a list of SyndPerson objects.
+     * <p>
+     * @param contributors the feed contributors to set, <b>null</b> if none.
+     *
+     */
+    void setContributors(List<SyndPerson> contributors);
+
+    /**
+     * Returns the feed copyright.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module rights.
+     * <p>
+     * @return the feed copyright, <b>null</b> if none.
+     *
+     */
+    String getCopyright();
+
+    /**
+     * Sets the feed copyright.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module rights.
+     * <p>
+     * @param copyright the feed copyright to set, <b>null</b> if none.
+     *
+     */
+    void setCopyright(String copyright);
+
+    /**
+     * Returns the feed image.
+     * <p>
+     * @return the feed image, <b>null</b> if none.
+     *
+     */
+    SyndImage getImage();
+
+    /**
+     * Sets the feed image.
+     * <p>
+     * @param image the feed image to set, <b>null</b> if none.
+     *
+     */
+    void setImage(SyndImage image);
+
+    /**
+     * Returns the feed categories.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module subjects.
+     * <p>
+     * @return a list of SyndCategoryImpl elements with the feed categories,
+     *         an empty list if none.
+     *
+     */
+    List<SyndCategory> getCategories();
+
+    /**
+     * Sets the feed categories.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module subjects.
+     * <p>
+     * @param categories the list of SyndCategoryImpl elements with the feed categories to set,
+     *        an empty list or <b>null</b> if none.
+     *
+     */
+    void setCategories(List<SyndCategory> categories);
+
+    /**
+     * Returns the feed entries.
+     * <p>
+     * @return a list of SyndEntry elements with the feed entries,
+     *         an empty list if none.
+     *
+     */
+    List<SyndEntry> getEntries();
+
+    /**
+     * Sets the feed entries.
+     * <p>
+     * @param entries the list of SyndEntryImpl elements with the feed entries to set,
+     *        an empty list or <b>null</b> if none.
+     *
+     */
+    void setEntries(List<SyndEntry> entries);
+
+    /**
+     * Returns the feed language.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module language.
+     * <p>
+     * @return the feed language, <b>null</b> if none.
+     *
+     */
+    String getLanguage();
+
+    /**
+     * Sets the feed language.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module language.
+     * <p>
+     * @param language the feed language to set, <b>null</b> if none.
+     *
+     */
+    void setLanguage(String language);
+
+    /**
+     * Returns the module identified by a given URI.
+     * <p>
+     * @param uri the URI of the ModuleImpl.
+     * @return The module with the given URI, <b>null</b> if none.
+     */
+    public Module getModule(String uri);
+
+    /**
+     * Returns the feed modules.
+     * <p>
+     * @return a list of ModuleImpl elements with the feed modules,
+     *         an empty list if none.
+     *
+     */
+    List<Module> getModules();
+
+    /**
+     * Sets the feed modules.
+     * <p>
+     * @param modules the list of ModuleImpl elements with the feed modules to set,
+     *        an empty list or <b>null</b> if none.
+     *
+     */
+    void setModules(List modules);
+
+    /**
+     * Returns foreign markup found at channel level.
+     * <p>
+     * @return Opaque object to discourage use
+     *
+     */
+    public Object getForeignMarkup();
+
+    /**
+     * Sets foreign markup found at channel level.
+     * <p>
+     * @param foreignMarkup Opaque object to discourage use
+     *
+     */
+    public void setForeignMarkup(Object foreignMarkup);
+    
+    /**
+     * Creates a deep clone of the object.
+     * <p>
+     * @return a clone of the object.
+     * @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
+     *
+     */
+    public Object clone() throws CloneNotSupportedException;
+
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndFeedImpl.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndFeedImpl.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndFeedImpl.java
new file mode 100644
index 0000000..4e8ff37
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndFeedImpl.java
@@ -0,0 +1,772 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package com.sun.syndication.feed.synd;
+
+import com.sun.syndication.feed.CopyFrom;
+import com.sun.syndication.feed.impl.ObjectBean;
+import com.sun.syndication.feed.impl.CopyFromHelper;
+import com.sun.syndication.feed.WireFeed;
+import com.sun.syndication.feed.module.*;
+import com.sun.syndication.feed.module.impl.ModuleUtils;
+import com.sun.syndication.feed.synd.impl.Converters;
+import com.sun.syndication.feed.synd.impl.URINormalizer;
+
+import java.util.*;
+import java.io.Serializable;
+
+/**
+ * Bean for all types of feeds.
+ * <p>
+ * It handles all RSS versions, Atom 0.3 and Atom 1.0, it normalizes all info, it may lose information.
+ * <p>
+ * @author Alejandro Abdelnur
+ *
+ */
+public class SyndFeedImpl implements Serializable, SyndFeed {
+    
+    private ObjectBean _objBean;
+    
+    private String    _encoding;
+    private String    _uri;
+    private SyndContent _title;
+    private SyndContent _description;
+    private String    _feedType;
+    private String    _link;
+    private List      _links;
+    private SyndImage _image;
+    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();
+
+    /**
+     * Unmodifiable Set containing the convenience properties of this class.
+     * <p>
+     * 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);
+
+    static {
+        IGNORE_PROPERTIES.add("publishedDate");
+        IGNORE_PROPERTIES.add("author");
+        IGNORE_PROPERTIES.add("copyright");
+        IGNORE_PROPERTIES.add("categories");
+        IGNORE_PROPERTIES.add("language");
+    }
+
+    /**
+     * Returns the real feed types the SyndFeedImpl supports when converting from and to.
+     * <p>
+     * @return the real feed type supported.
+     */
+    public List getSupportedFeedTypes() {
+        return CONVERTERS.getSupportedFeedTypes();
+    }
+
+    /**
+     * For implementations extending SyndFeedImpl to be able to use the ObjectBean functionality
+     * with extended interfaces.
+     * <p>
+     * @param beanClass
+     * @param convenienceProperties set containing the convenience properties of the SyndEntryImpl
+     * (the are ignored during cloning, check CloneableBean for details).
+     *
+     */
+    protected SyndFeedImpl(Class beanClass,Set convenienceProperties) {
+        _objBean = new ObjectBean(beanClass,this,convenienceProperties);
+    }
+
+    /**
+     * Default constructor. All properties are set to <b>null</b>.
+     * <p>
+     *
+     */
+    public SyndFeedImpl() {
+        this(null);
+    }
+
+    /**
+     * Creates a SyndFeedImpl and populates all its properties out of the
+     * given RSS Channel or Atom Feed properties.
+     * <p>
+     * @param feed the RSS Channel or the Atom Feed to populate the properties from.
+     *
+     */
+    public SyndFeedImpl(WireFeed feed) {
+        this(feed, false);
+    }
+    
+    /**
+     * Creates a SyndFeedImpl and populates all its properties out of the
+     * given RSS Channel or Atom Feed properties, while optionally preserving
+     * the WireFeed for access via the orignalWireFeed() method.
+     * 
+     * @param feed
+     * @param preserveWireFeed
+     */
+    public SyndFeedImpl(WireFeed feed, boolean preserveWireFeed) {    	
+        this(SyndFeed.class,IGNORE_PROPERTIES);
+
+    	if (preserveWireFeed) {    		
+    		this.wireFeed = feed;
+    		this.preserveWireFeed = preserveWireFeed;
+    	}
+                
+        if (feed!=null) {
+            _feedType = feed.getFeedType();
+            Converter converter = CONVERTERS.getConverter(_feedType);
+            if (converter==null) {
+                throw new IllegalArgumentException("Invalid feed type ["+_feedType+"]");
+            }
+            converter.copyInto(feed,this);
+        }
+        
+    }
+
+    /**
+     * Creates a deep 'bean' clone of the object.
+     * <p>
+     * @return a clone of the object.
+     * @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
+     *
+     */
+    public Object clone() throws CloneNotSupportedException {
+        return _objBean.clone();
+    }
+
+    /**
+     * Indicates whether some other object is "equal to" this one as defined by the Object equals() method.
+     * <p>
+     * @param other he reference object with which to compare.
+     * @return <b>true</b> if 'this' object is equal to the 'other' object.
+     *
+     */
+    public boolean equals(Object other) {
+        if (other == null) {
+            return false;
+        }
+        // can't use foreign markup in equals, due to JDOM equals impl
+        Object fm = getForeignMarkup();
+        setForeignMarkup(((SyndFeedImpl)other).getForeignMarkup());       
+        boolean ret = _objBean.equals(other);
+        // restore foreign markup
+        setForeignMarkup(fm);
+        return ret;
+    }
+
+    /**
+     * Returns a hashcode value for the object.
+     * <p>
+     * It follows the contract defined by the Object hashCode() method.
+     * <p>
+     * @return the hashcode of the bean object.
+     *
+     */
+    public int hashCode() {
+        return _objBean.hashCode();
+    }
+
+    /**
+     * Returns the String representation for the object.
+     * <p>
+     * @return String representation for the object.
+     *
+     */
+    public String toString() {
+        return _objBean.toString();
+    }
+
+    /**
+     * Creates a real feed containing the information of the SyndFeedImpl.
+     * <p>
+     * The feed type of the created WireFeed is taken from the SyndFeedImpl feedType property.
+     * <p>
+     * @return the real feed.
+     *
+     */
+    public WireFeed createWireFeed() {
+        return createWireFeed(_feedType);
+    }
+
+    /**
+     * Creates a real feed containing the information of the SyndFeedImpl.
+     * <p>
+     * @param feedType the feed type for the WireFeed to be created.
+     * @return the real feed.
+     *
+     */
+    public WireFeed createWireFeed(String feedType) {
+        if (feedType==null) {
+            throw new IllegalArgumentException("Feed type cannot be null");
+        }
+        Converter converter = CONVERTERS.getConverter(feedType);
+        if (converter==null) {
+            throw new IllegalArgumentException("Invalid feed type ["+feedType+"]");
+        }
+        return converter.createRealFeed(this);
+    }
+    
+    /**
+     * Returns the WireFeed this SyndFeed was created from. 
+     * Will return null if the original feed is not stored or if this SyndFeed was not created from a WireFeed.
+     * <br />
+     * Note: The wire feed returned here will NOT contain any modifications done on this SyndFeed since it was created.
+     * That is in contrast to the createWireFeed method, which will reflect the current state of the SyndFeed
+     * 
+     * @return The WireFeed this was created from, or null
+     * 
+     */    
+    public WireFeed originalWireFeed() {
+    	return wireFeed;
+    }
+
+    /**
+     * Returns the wire feed type the feed had/will-have when coverted from/to a WireFeed.
+     * <p>
+     * @return the feed type, <b>null</b> if none.
+     *
+     */
+    public String getFeedType() {
+        return _feedType;
+    }
+
+    /**
+     * Sets the wire feed type the feed will-have when coverted to a WireFeed.
+     * <p>
+     * @param feedType the feed type to set, <b>null</b> if none.
+     *
+     */
+    public void setFeedType(String feedType) {
+        _feedType = feedType;
+    }
+
+    /**
+     * Returns the charset encoding of a the feed. This is not set by Rome parsers.
+     * <p>
+     * @return the charset encoding of the feed.
+     *
+     */
+    public String getEncoding() {
+        return _encoding;
+    }
+
+    /**
+     * Sets the charset encoding of a the feed. This is not set by Rome parsers.
+     * <p>
+     * @param encoding the charset encoding of the feed.
+     *
+     */
+    public void setEncoding(String encoding) {
+        _encoding = encoding;
+    }
+
+    /**
+     * Returns the feed URI.
+     * <p>
+     * How the feed URI maps to a concrete feed type (RSS or Atom) depends on
+     * the concrete feed type. This is explained in detail in Rome documentation,
+     * <a href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI mapping</a>.
+     * <p>
+     * The returned URI is a normalized URI as specified in RFC 2396bis.
+     * <p>
+     * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is
+     * the GUID, for RSS 1.0 this is the URI attribute of the item. The Link
+     * is the URL that the item is accessible under, the URI is the
+     * permanent identifier which the aggregator should use to reference
+     * this item. Often the URI will use some standardized identifier scheme
+     * such as DOI's so that items can be identified even if they appear in
+     * multiple feeds with different "links" (they might be on different
+     * hosting platforms but be the same item). Also, though rare, there
+     * could be multiple items with the same link but a different URI and
+     * associated metadata which need to be treated as distinct entities.
+     * In the RSS 1.0 case the URI must be a valid RDF URI reference.
+     * <p>
+     * @return the feed URI, <b>null</b> if none.
+     *
+     */
+    public String getUri() {
+        return _uri;
+    }
+
+    /**
+     * Sets the feed URI.
+     * <p>
+     * How the feed URI maps to a concrete feed type (RSS or Atom) depends on
+     * the concrete feed type. This is explained in detail in Rome documentation,
+     * <a href="http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping">Feed and entry URI mapping</a>.
+     * <p>
+     * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is
+     * the GUID, for RSS 1.0 this is the URI attribute of the item. The Link
+     * is the URL that the item is accessible under, the URI is the
+     * permanent identifier which the aggregator should use to reference
+     * this item. Often the URI will use some standardized identifier scheme
+     * such as DOI's so that items can be identified even if they appear in
+     * multiple feeds with different "links" (they might be on different
+     * hosting platforms but be the same item). Also, though rare, there
+     * could be multiple items with the same link but a different URI and
+     * associated metadata which need to be treated as distinct entities.
+     * In the RSS 1.0 case the URI must be a valid RDF URI reference.
+     * <p>
+     * @param uri the feed URI to set, <b>null</b> if none.
+     *
+     */
+    public void setUri(String uri) {
+        _uri = URINormalizer.normalize(uri);
+    }
+
+    /**
+     * Returns the feed title.
+     * <p>
+     * @return the feed title, <b>null</b> if none.
+     *
+     */
+    public String getTitle() {
+        if (_title != null) return _title.getValue();
+        return null;
+    }
+
+    /**
+     * Sets the feed title.
+     * <p>
+     * @param title the feed title to set, <b>null</b> if none.
+     *
+     */
+    public void setTitle(String title) {
+        if (_title == null) _title = new SyndContentImpl();
+        _title.setValue(title);
+    }
+
+    /**
+     * Returns the feed title as a text construct.
+     * <p>
+     * @return the feed title, <b>null</b> if none.
+     *
+     */
+    public SyndContent getTitleEx() {
+        return _title;
+    }
+
+    /**
+     * Sets the feed title as a text construct.
+     * <p>
+     * @param title the feed title to set, <b>null</b> if none.
+     *
+     */
+    public void setTitleEx(SyndContent title) {
+        _title = title;
+    }
+
+    /**
+     * Returns the feed link.
+     * <p>
+     * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is
+     * the GUID, for RSS 1.0 this is the URI attribute of the item. The Link
+     * is the URL that the item is accessible under, the URI is the
+     * permanent identifier which the aggregator should use to reference
+     * this item. Often the URI will use some standardized identifier scheme
+     * such as DOI's so that items can be identified even if they appear in
+     * multiple feeds with different "links" (they might be on different
+     * hosting platforms but be the same item). Also, though rare, there
+     * could be multiple items with the same link but a different URI and
+     * associated metadata which need to be treated as distinct entities.
+     * In the RSS 1.0 case the URI must be a valid RDF URI reference.
+     * <p>
+     * @return the feed link, <b>null</b> if none.
+     *
+     */
+    public String getLink() {
+        return _link;
+    }
+
+    /**
+     * Sets the feed link.
+     * <p>
+     * Note: The URI is the unique identifier, in the RSS 2.0/atom case this is
+     * the GUID, for RSS 1.0 this is the URI attribute of the item. The Link
+     * is the URL that the item is accessible under, the URI is the
+     * permanent identifier which the aggregator should use to reference
+     * this item. Often the URI will use some standardized identifier scheme
+     * such as DOI's so that items can be identified even if they appear in
+     * multiple feeds with different "links" (they might be on different
+     * hosting platforms but be the same item). Also, though rare, there
+     * could be multiple items with the same link but a different URI and
+     * associated metadata which need to be treated as distinct entities.
+     * In the RSS 1.0 case the URI must be a valid RDF URI reference.
+     * <p>
+     * @param link the feed link to set, <b>null</b> if none.
+     *
+     */
+    public void setLink(String link) {
+        _link = link;
+    }
+
+    /**
+     * Returns the feed description.
+     * <p>
+     * @return the feed description, <b>null</b> if none.
+     *
+     */
+    public String getDescription() {
+        if (_description != null) return _description.getValue();
+        return null;
+    }
+
+    /**
+     * Sets the feed description.
+     * <p>
+     * @param description the feed description to set, <b>null</b> if none.
+     *
+     */
+    public void setDescription(String description) {
+        if (_description == null) _description = new SyndContentImpl();
+        _description.setValue(description);
+    }
+    
+    /**
+     * Returns the feed description as a text construct.
+     * <p>
+     * @return the feed description, <b>null</b> if none.
+     *
+     */
+    public SyndContent getDescriptionEx() {
+        return _description;
+    }
+
+    /**
+     * Sets the feed description as a text construct.
+     * <p>
+     * @param description the feed description to set, <b>null</b> if none.
+     *
+     */
+    public void setDescriptionEx(SyndContent description) {
+        _description = description;
+    }
+
+    /**
+     * Returns the feed published date.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module date.
+     * <p>
+     * @return the feed published date, <b>null</b> if none.
+     *
+     */
+    public Date getPublishedDate() {
+        return getDCModule().getDate();
+    }
+
+    /**
+     * Sets the feed published date.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module date.
+     * <p>
+     * @param publishedDate the feed published date to set, <b>null</b> if none.
+     *
+     */
+    public void setPublishedDate(Date publishedDate) {
+        getDCModule().setDate(publishedDate);
+    }
+
+    /**
+     * Returns the feed copyright.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module rights.
+     * <p>
+     * @return the feed copyright, <b>null</b> if none.
+     *
+     */
+    public String getCopyright() {
+        return getDCModule().getRights();
+    }
+
+    /**
+     * Sets the feed copyright.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module rights.
+     * <p>
+     * @param copyright the feed copyright to set, <b>null</b> if none.
+     *
+     */
+    public void setCopyright(String copyright) {
+        getDCModule().setRights(copyright);
+    }
+
+    /**
+     * Returns the feed image.
+     * <p>
+     * @return the feed image, <b>null</b> if none.
+     *
+     */
+    public SyndImage getImage() {
+        return _image;
+    }
+
+    /**
+     * Sets the feed image.
+     * <p>
+     * @param image the feed image to set, <b>null</b> if none.
+     *
+     */
+    public void setImage(SyndImage image) {
+        _image = image;
+    }
+
+    /**
+     * Returns the feed categories.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module subjects.
+     * <p>
+     * @return a list of SyndCategoryImpl elements with the feed categories,
+     *         an empty list if none.
+     *
+     */
+    public List getCategories() {
+        return new SyndCategoryListFacade(getDCModule().getSubjects());
+    }
+
+    /**
+     * Sets the feed categories.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module subjects.
+     * <p>
+     * @param categories the list of SyndCategoryImpl elements with the feed categories to set,
+     *        an empty list or <b>null</b> if none.
+     *
+     */
+    public void setCategories(List categories) {
+        getDCModule().setSubjects(SyndCategoryListFacade.convertElementsSyndCategoryToSubject(categories));
+    }
+
+    /**
+     * Returns the feed entries.
+     * <p>
+     * @return a list of SyndEntryImpl elements with the feed entries,
+     *         an empty list if none.
+     *
+     */
+    public List getEntries() {
+        return (_entries==null) ? (_entries=new ArrayList()) : _entries;
+    }
+
+    /**
+     * Sets the feed entries.
+     * <p>
+     * @param entries the list of SyndEntryImpl elements with the feed entries to set,
+     *        an empty list or <b>null</b> if none.
+     *
+     */
+    public void setEntries(List entries) {
+        _entries = entries;
+    }
+
+    /**
+     * Returns the feed language.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module language.
+     * <p>
+     * @return the feed language, <b>null</b> if none.
+     *
+     */
+    public String getLanguage() {
+        return getDCModule().getLanguage();
+    }
+
+    /**
+     * Sets the feed language.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module language.
+     * <p>
+     * @param language the feed language to set, <b>null</b> if none.
+     *
+     */
+    public void setLanguage(String language) {
+        getDCModule().setLanguage(language);
+    }
+
+    /**
+     * Returns the feed modules.
+     * <p>
+     * @return a list of ModuleImpl elements with the feed modules,
+     *         an empty list if none.
+     *
+     */
+    public List getModules() {
+        if  (_modules==null) {
+            _modules=new ArrayList();
+        }
+        if (ModuleUtils.getModule(_modules,DCModule.URI)==null) {
+            _modules.add(new DCModuleImpl());
+        }
+        return _modules;
+    }
+
+
+    /**
+     * Sets the feed modules.
+     * <p>
+     * @param modules the list of ModuleImpl elements with the feed modules to set,
+     *        an empty list or <b>null</b> if none.
+     *
+     */
+    public void setModules(List modules) {
+        _modules = modules;
+    }
+
+    /**
+     * Returns the module identified by a given URI.
+     * <p>
+     * @param uri the URI of the ModuleImpl.
+     * @return The module with the given URI, <b>null</b> if none.
+     */
+    public Module getModule(String uri) {
+        return ModuleUtils.getModule(getModules(),uri);
+    }
+
+    /**
+     * Returns the Dublin Core module of the feed.
+     * @return the DC module, it's never <b>null</b>
+     *
+     */
+    private DCModule getDCModule() {
+        return (DCModule) getModule(DCModule.URI);
+    }
+
+    public Class getInterface() {
+        return SyndFeed.class;
+    }
+
+    public void copyFrom(CopyFrom obj) {
+        COPY_FROM_HELPER.copy(this,obj);
+    }
+
+
+    // TODO We need to find out how to refactor this one in a nice reusable way.
+
+    private static final CopyFromHelper COPY_FROM_HELPER;
+
+    static {
+        Map basePropInterfaceMap = new HashMap();
+        basePropInterfaceMap.put("feedType",String.class);
+        basePropInterfaceMap.put("encoding",String.class);
+        basePropInterfaceMap.put("uri",String.class);
+        basePropInterfaceMap.put("title",String.class);
+        basePropInterfaceMap.put("link",String.class);
+        basePropInterfaceMap.put("description",String.class);
+        basePropInterfaceMap.put("image",SyndImage.class);
+        basePropInterfaceMap.put("entries",SyndEntry.class);
+        basePropInterfaceMap.put("modules",Module.class);
+
+        Map basePropClassImplMap = new HashMap();
+        basePropClassImplMap.put(SyndEntry.class,SyndEntryImpl.class);
+        basePropClassImplMap.put(SyndImage.class,SyndImageImpl.class);
+        basePropClassImplMap.put(DCModule.class,DCModuleImpl.class);
+        basePropClassImplMap.put(SyModule.class,SyModuleImpl.class);
+
+        COPY_FROM_HELPER = new CopyFromHelper(SyndFeed.class,basePropInterfaceMap,basePropClassImplMap);
+    }
+
+    /**
+     * Returns the links
+     * <p>
+     * @return Returns the links.
+     */
+    public List getLinks() {
+        return (_links==null) ? (_links=new ArrayList()) : _links;
+    }
+    
+    /**
+     * Set the links
+     * <p>
+     * @param links The links to set.
+     */
+    public void setLinks(List links) {
+        _links = links;
+    }
+
+    public List getAuthors() {
+        return (_authors==null) ? (_authors=new ArrayList()) : _authors;
+    }
+
+    public void setAuthors(List authors) {
+        this._authors = authors;
+    }
+
+    /**
+     * Returns the feed author.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module creator.
+     * <p>
+     * @return the feed author, <b>null</b> if none.
+     *
+     */
+    public String getAuthor() {
+        return getDCModule().getCreator();
+    }
+
+    /**
+     * Sets the feed author.
+     * <p>
+     * This method is a convenience method, it maps to the Dublin Core module creator.
+     * <p>
+     * @param author the feed author to set, <b>null</b> if none.
+     *
+     */
+    public void setAuthor(String author) {
+        getDCModule().setCreator(author);
+    }    
+    
+    public List getContributors() {
+        return (_contributors==null) ? (_contributors=new ArrayList()) : _contributors;
+    }
+
+    public void setContributors(List contributors) {
+        this._contributors = contributors;
+    }
+
+    /**
+     * Returns foreign markup found at channel level.
+     * <p>
+     * @return Opaque object to discourage use
+     *
+     */
+    public Object getForeignMarkup() {
+        return (_foreignMarkup==null) ? (_foreignMarkup=new ArrayList()) : _foreignMarkup;
+    }
+
+    /**
+     * Sets foreign markup found at channel level.
+     * <p>
+     * @param foreignMarkup Opaque object to discourage use
+     *
+     */
+    public void setForeignMarkup(Object foreignMarkup) {
+        _foreignMarkup = (List)foreignMarkup;
+    }
+
+	public boolean isPreservingWireFeed() {		
+		return preserveWireFeed;
+	}
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndImage.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndImage.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndImage.java
new file mode 100644
index 0000000..423530e
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndImage.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc.
+ * Copyright 2011 ROME Team
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package com.sun.syndication.feed.synd;
+
+import com.sun.syndication.feed.CopyFrom;
+
+/**
+ * Bean interface for images of SyndFeedImpl feeds.
+ * <p>
+ * @author Alejandro Abdelnur
+ *
+ */
+public interface SyndImage extends Cloneable,CopyFrom {
+    /**
+     * Returns the image title.
+     * <p>
+     * @return the image title, <b>null</b> if none.
+     *
+     */
+    String getTitle();
+
+    /**
+     * Sets the image title.
+     * <p>
+     * @param title the image title to set, <b>null</b> if none.
+     *
+     */
+    void setTitle(String title);
+
+    /**
+     * Returns the image URL.
+     * <p>
+     * @return the image URL, <b>null</b> if none.
+     *
+     */
+    String getUrl();
+
+    /**
+     * Sets the image URL.
+     * <p>
+     * @param url the image URL to set, <b>null</b> if none.
+     *
+     */
+    void setUrl(String url);
+
+    /**
+     * Returns the image link.
+     * <p>
+     * @return the image link, <b>null</b> if none.
+     *
+     */
+    String getLink();
+
+    /**
+     * Sets the image link.
+     * <p>
+     * @param link the image link to set, <b>null</b> if none.
+     *
+     */
+    void setLink(String link);
+
+    /**
+     * Returns the image description.
+     * <p>
+     * @return the image description, <b>null</b> if none.
+     *
+     */
+    String getDescription();
+
+    /**
+     * Sets the image description.
+     * <p>
+     * @param description the image description to set, <b>null</b> if none.
+     *
+     */
+    void setDescription(String description);
+
+    /**
+     * Creates a deep clone of the object.
+     * <p>
+     * @return a clone of the object.
+     * @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
+     *
+     */
+    public Object clone() throws CloneNotSupportedException;
+
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndImageImpl.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndImageImpl.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndImageImpl.java
new file mode 100644
index 0000000..3193c58
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/feed/synd/SyndImageImpl.java
@@ -0,0 +1,196 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package com.sun.syndication.feed.synd;
+
+import com.sun.syndication.feed.CopyFrom;
+import com.sun.syndication.feed.impl.ObjectBean;
+import com.sun.syndication.feed.impl.CopyFromHelper;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.io.Serializable;
+
+/**
+ * Bean for images of SyndFeedImpl feeds.
+ * <p>
+ * @author Alejandro Abdelnur
+ *
+ */
+public class SyndImageImpl implements Serializable,SyndImage {
+    private ObjectBean _objBean;
+    private String _title;
+    private String _url;
+    private String _link;
+    private String _description;
+
+    /**
+     * Default constructor. All properties are set to <b>null</b>.
+     * <p>
+     *
+     */
+    public SyndImageImpl() {
+        _objBean = new ObjectBean(SyndImage.class,this);
+    }
+
+    /**
+     * Creates a deep 'bean' clone of the object.
+     * <p>
+     * @return a clone of the object.
+     * @throws CloneNotSupportedException thrown if an element of the object cannot be cloned.
+     *
+     */
+    public Object clone() throws CloneNotSupportedException {
+        return _objBean.clone();
+    }
+
+    /**
+     * Indicates whether some other object is "equal to" this one as defined by the Object equals() method.
+     * <p>
+     * @param other he reference object with which to compare.
+     * @return <b>true</b> if 'this' object is equal to the 'other' object.
+     *
+     */
+    public boolean equals(Object other) {
+        return _objBean.equals(other);
+    }
+
+    /**
+     * Returns a hashcode value for the object.
+     * <p>
+     * It follows the contract defined by the Object hashCode() method.
+     * <p>
+     * @return the hashcode of the bean object.
+     *
+     */
+    public int hashCode() {
+        return _objBean.hashCode();
+    }
+
+    /**
+     * Returns the String representation for the object.
+     * <p>
+     * @return String representation for the object.
+     *
+     */
+    public String toString() {
+        return _objBean.toString();
+    }
+
+    /**
+     * Returns the image title.
+     * <p>
+     * @return the image title, <b>null</b> if none.
+     *
+     */
+    public String getTitle() {
+        return _title;
+    }
+
+    /**
+     * Sets the image title.
+     * <p>
+     * @param title the image title to set, <b>null</b> if none.
+     *
+     */
+    public void setTitle(String title) {
+        _title = title;
+    }
+
+    /**
+     * Returns the image URL.
+     * <p>
+     * @return the image URL, <b>null</b> if none.
+     *
+     */
+    public String getUrl() {
+        return _url;
+    }
+
+    /**
+     * Sets the image URL.
+     * <p>
+     * @param url the image URL to set, <b>null</b> if none.
+     *
+     */
+    public void setUrl(String url) {
+        _url = url;
+    }
+
+    /**
+     * Returns the image link.
+     * <p>
+     * @return the image link, <b>null</b> if none.
+     *
+     */
+    public String getLink() {
+        return _link;
+    }
+
+    /**
+     * Sets the image link.
+     * <p>
+     * @param link the image link to set, <b>null</b> if none.
+     *
+     */
+    public void setLink(String link) {
+        _link = link;
+    }
+
+    /**
+     * Returns the image description.
+     * <p>
+     * @return the image description, <b>null</b> if none.
+     *
+     */
+    public String getDescription() {
+        return _description;
+    }
+
+    /**
+     * Sets the image description.
+     * <p>
+     * @param description the image description to set, <b>null</b> if none.
+     *
+     */
+    public void setDescription(String description) {
+        _description = description;
+    }
+
+    public Class getInterface() {
+        return SyndImage.class;
+    }
+
+    public void copyFrom(CopyFrom syndImage) {
+        COPY_FROM_HELPER.copy(this,syndImage);
+    }
+
+    private static final CopyFromHelper COPY_FROM_HELPER;
+
+    static {
+        Map basePropInterfaceMap = new HashMap();
+        basePropInterfaceMap.put("title",String.class);
+        basePropInterfaceMap.put("url",String.class);
+        basePropInterfaceMap.put("link",String.class);
+        basePropInterfaceMap.put("description",String.class);
+
+        Map basePropClassImplMap = Collections.EMPTY_MAP;
+
+        COPY_FROM_HELPER = new CopyFromHelper(SyndImage.class,basePropInterfaceMap,basePropClassImplMap);
+    }
+
+}


Mime
View raw message