You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ja...@apache.org on 2014/01/08 16:25:54 UTC

[38/51] [abbrv] [partial] MARMOTTA-397: Reorganized and renamed Marmotta Sesame Tools

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/RSS10Generator.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/RSS10Generator.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/RSS10Generator.java
new file mode 100644
index 0000000..9ffdc7d
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/RSS10Generator.java
@@ -0,0 +1,126 @@
+/*
+ * 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.io.impl;
+
+import com.sun.syndication.feed.rss.Description;
+import com.sun.syndication.feed.rss.Item;
+import com.sun.syndication.feed.rss.Channel;
+import com.sun.syndication.io.FeedException;
+import org.jdom2.Element;
+import org.jdom2.Namespace;
+
+import java.util.List;
+
+/**
+ * Feed Generator for RSS 1.0
+ * <p/>
+ *
+ * @author Elaine Chien
+ *
+ */
+
+public class RSS10Generator extends RSS090Generator {
+    
+    private static final String RSS_URI = "http://purl.org/rss/1.0/";
+    private static final Namespace RSS_NS = Namespace.getNamespace(RSS_URI);
+    
+    public RSS10Generator() {
+        super("rss_1.0");
+    }
+
+    protected RSS10Generator(String feedType) {
+        super(feedType);
+    }
+
+    protected Namespace getFeedNamespace() {
+        return RSS_NS;
+    }
+
+    protected void populateChannel(Channel channel,Element eChannel) {
+        super.populateChannel(channel,eChannel);
+        if (channel.getUri() != null) {
+            eChannel.setAttribute("about", channel.getUri(), getRDFNamespace());
+        }
+        List items = channel.getItems();
+        if (items.size()>0) {
+            Element eItems = new Element("items",getFeedNamespace());
+            Element eSeq = new Element("Seq",getRDFNamespace());
+            for (int i=0;i<items.size();i++) {
+                Item item = (Item) items.get(i);
+                Element eLi = new Element("li",getRDFNamespace());
+                String uri = item.getUri();
+                if (uri!=null) {
+                    eLi.setAttribute("resource",uri,getRDFNamespace());
+                }
+                eSeq.addContent(eLi);
+            }
+            eItems.addContent(eSeq);
+            eChannel.addContent(eItems);
+        }
+    }
+    
+    protected void populateItem(Item item, Element eItem, int index) {
+        super.populateItem(item,eItem, index);
+        String link = item.getLink();
+        String uri = item.getUri();
+        
+        if (uri != null) {
+            eItem.setAttribute("about", uri, getRDFNamespace());
+        } else if (link != null) {
+            eItem.setAttribute("about", link, getRDFNamespace());
+        }
+        
+        Description description = item.getDescription();
+        if (description!=null) {
+            eItem.addContent(generateSimpleElement("description", description.getValue()));
+        }
+        if (item.getModule(getContentNamespace().getURI()) == null && item.getContent() != null) {
+            Element elem = new Element("encoded", getContentNamespace());
+            elem.addContent(item.getContent().getValue());
+            eItem.addContent(elem);
+        }
+    }
+
+    protected void checkChannelConstraints(Element eChannel) throws FeedException {
+        checkNotNullAndLength(eChannel,"title", 0, -1);
+        checkNotNullAndLength(eChannel,"description", 0, -1);
+        checkNotNullAndLength(eChannel,"link", 0, -1);
+    }
+
+    protected void checkImageConstraints(Element eImage) throws FeedException {
+        checkNotNullAndLength(eImage,"title", 0, -1);
+        checkNotNullAndLength(eImage,"url", 0, -1);
+        checkNotNullAndLength(eImage,"link", 0, -1);
+    }
+
+    protected void checkTextInputConstraints(Element eTextInput) throws FeedException {
+        checkNotNullAndLength(eTextInput,"title", 0, -1);
+        checkNotNullAndLength(eTextInput,"description", 0, -1);
+        checkNotNullAndLength(eTextInput,"name", 0, -1);
+        checkNotNullAndLength(eTextInput,"link", 0, -1);
+    }
+
+    protected void checkItemsConstraints(Element parent) throws FeedException {
+    }
+
+    protected void checkItemConstraints(Element eItem) throws FeedException {
+        checkNotNullAndLength(eItem,"title", 0, -1);
+        checkNotNullAndLength(eItem,"link", 0, -1);
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/RSS10Parser.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/RSS10Parser.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/RSS10Parser.java
new file mode 100644
index 0000000..0547211
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/RSS10Parser.java
@@ -0,0 +1,137 @@
+/*
+ * 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.io.impl;
+
+import com.sun.syndication.feed.WireFeed;
+import com.sun.syndication.feed.rss.Channel;
+import com.sun.syndication.feed.rss.Content;
+import com.sun.syndication.feed.rss.Description;
+import com.sun.syndication.feed.rss.Item;
+import org.jdom2.Document;
+import org.jdom2.Element;
+import org.jdom2.Namespace;
+
+import java.util.List;
+
+/**
+ */
+public class RSS10Parser extends RSS090Parser {
+
+    private static final String RSS_URI = "http://purl.org/rss/1.0/";
+    private static final Namespace RSS_NS = Namespace.getNamespace(RSS_URI);
+
+    public RSS10Parser() {
+        this("rss_1.0", RSS_NS);
+    }
+
+    protected RSS10Parser(String type, Namespace ns) {
+        super(type, ns);
+    }
+
+    /**
+     * Indicates if a JDom document is an RSS instance that can be parsed with the parser.
+     * <p/>
+     * It checks for RDF ("http://www.w3.org/1999/02/22-rdf-syntax-ns#") and
+     * RSS ("http://purl.org/rss/1.0/") namespaces being defined in the root element.
+     *
+     * @param document document to check if it can be parsed with this parser implementation.
+     * @return <b>true</b> if the document is RSS1., <b>false</b> otherwise.
+     */
+    public boolean isMyType(Document document) {
+        boolean ok = false;
+
+        Element rssRoot = document.getRootElement();
+        Namespace defaultNS = rssRoot.getNamespace();
+        List additionalNSs = rssRoot.getAdditionalNamespaces();
+
+        ok = defaultNS!=null && defaultNS.equals(getRDFNamespace());
+        if (ok) {
+            if (additionalNSs==null) {
+                ok = false;
+            }
+            else {
+                ok = false;
+                for (int i=0;!ok && i<additionalNSs.size();i++) {
+                    ok = getRSSNamespace().equals(additionalNSs.get(i));
+                }
+            }
+        }
+        return ok;
+    }
+
+    /**
+     * Returns the namespace used by RSS elements in document of the RSS 1.0
+     * <P>
+     *
+     * @return returns "http://purl.org/rss/1.0/".
+     */
+    protected Namespace getRSSNamespace() {
+        return Namespace.getNamespace(RSS_URI);
+    }
+
+    /**
+     * Parses an item element of an RSS document looking for item information.
+     * <p/>
+     * It first invokes super.parseItem and then parses and injects the description property if present.
+     * <p/>
+     *
+     * @param rssRoot the root element of the RSS document in case it's needed for context.
+     * @param eItem the item element to parse.
+     * @return the parsed RSSItem bean.
+     */
+    protected Item parseItem(Element rssRoot,Element eItem) {
+        Item item = super.parseItem(rssRoot,eItem);
+        Element e = eItem.getChild("description", getRSSNamespace());
+        if (e!=null) {
+            item.setDescription(parseItemDescription(rssRoot,e));
+        }
+        Element ce = eItem.getChild("encoded", getContentNamespace());
+        if (ce != null) {
+            Content content = new Content();
+            content.setType(Content.HTML);
+            content.setValue(ce.getText());
+            item.setContent(content);
+        }
+
+        String uri = eItem.getAttributeValue("about", getRDFNamespace());
+        if (uri != null) {
+            item.setUri(uri);
+        }
+
+        return item;
+    }
+
+    protected WireFeed parseChannel(Element rssRoot) {
+        Channel channel = (Channel) super.parseChannel(rssRoot);
+
+        Element eChannel = rssRoot.getChild("channel", getRSSNamespace());
+        String uri = eChannel.getAttributeValue("about", getRDFNamespace());
+        if (uri != null) {
+            channel.setUri(uri);
+        }
+
+        return channel;
+    }
+
+    protected Description parseItemDescription(Element rssRoot,Element eDesc) {
+        Description desc = new Description();
+        desc.setType("text/plain");
+        desc.setValue(eDesc.getText());
+        return desc;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/RSS20Generator.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/RSS20Generator.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/RSS20Generator.java
new file mode 100644
index 0000000..14e23ab
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/RSS20Generator.java
@@ -0,0 +1,92 @@
+/*
+ * 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.io.impl;
+
+import com.sun.syndication.feed.rss.Category;
+import com.sun.syndication.feed.rss.Channel;
+import com.sun.syndication.feed.rss.Guid;
+import com.sun.syndication.feed.rss.Item;
+import org.jdom2.Element;
+
+import java.util.List;
+
+
+/**
+ * Feed Generator for RSS 2.0
+ * <p/>
+ *
+ * @author Elaine Chien
+ *
+ */
+
+public class RSS20Generator extends RSS094Generator {
+
+    public RSS20Generator() {
+        this("rss_2.0","2.0");
+    }
+
+    protected RSS20Generator(String feedType,String version) {
+        super(feedType,version);
+    }
+
+    protected void populateChannel(Channel channel,Element eChannel) {
+        super.populateChannel(channel,eChannel);
+
+        String generator = channel.getGenerator();
+        if (generator != null) {
+            eChannel.addContent(generateSimpleElement("generator", generator));
+        }
+
+        int ttl = channel.getTtl();
+        if (ttl>-1) {
+            eChannel.addContent(generateSimpleElement("ttl", String.valueOf(ttl)));
+        }
+
+        List categories = channel.getCategories();
+        for(int i = 0; i < categories.size(); i++) {
+            eChannel.addContent(generateCategoryElement((Category)categories.get(i)));
+        }
+
+    }
+
+    public void populateItem(Item item, Element eItem, int index) {
+        super.populateItem(item,eItem, index);
+
+        Element eDescription = eItem.getChild("description",getFeedNamespace());
+        if (eDescription != null) eDescription.removeAttribute("type");
+
+        String author = item.getAuthor();
+        if (author != null) {
+            eItem.addContent(generateSimpleElement("author", author));
+        }
+
+        String comments = item.getComments();
+        if (comments != null) {
+            eItem.addContent(generateSimpleElement("comments", comments));
+        }
+
+        Guid guid = item.getGuid();
+        if (guid != null) {
+            Element eGuid = generateSimpleElement("guid",guid.getValue());
+            if (!guid.isPermaLink()) {
+                eGuid.setAttribute("isPermaLink", "false");
+            }
+            eItem.addContent(eGuid);
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/RSS20Parser.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/RSS20Parser.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/RSS20Parser.java
new file mode 100644
index 0000000..e3e6e66
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/RSS20Parser.java
@@ -0,0 +1,66 @@
+/*
+ * 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.io.impl;
+
+import com.sun.syndication.feed.rss.Description;
+import org.jdom2.Attribute;
+import org.jdom2.Document;
+import org.jdom2.Element;
+
+/**
+ */
+public class RSS20Parser extends RSS094Parser {
+
+    public RSS20Parser() {
+        this("rss_2.0");
+    }
+
+    protected RSS20Parser(String type) {
+        super(type);
+    }
+
+    protected String getRSSVersion() {
+            return "2.0";
+    }
+
+    protected boolean isHourFormat24(Element rssRoot) {
+        return false;
+    }
+
+    protected Description parseItemDescription(Element rssRoot,Element eDesc) {
+        Description desc = super.parseItemDescription(rssRoot,eDesc);
+        desc.setType("text/html"); // change as per https://rome.dev.java.net/issues/show_bug.cgi?id=26 
+        return desc;
+    }
+    
+    public boolean isMyType(Document document) {
+        boolean ok;
+        Element rssRoot = document.getRootElement();
+        ok = rssRoot.getName().equals("rss");
+        if (ok) {
+            ok = false;
+            Attribute version = rssRoot.getAttribute("version");
+            if (version!=null) {
+                // At this point, as far ROME is concerned RSS 2.0, 2.00 and 
+                // 2.0.X are all the same, so let's use startsWith for leniency.
+                ok = version.getValue().startsWith(getRSSVersion());
+            }
+        }
+        return ok;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/RSS20wNSParser.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/RSS20wNSParser.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/RSS20wNSParser.java
new file mode 100644
index 0000000..d981f0f
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/RSS20wNSParser.java
@@ -0,0 +1,73 @@
+/*
+ * 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.io.impl;
+
+import org.jdom2.Document;
+import org.jdom2.Element;
+import org.jdom2.Namespace;
+import com.sun.syndication.feed.WireFeed;
+
+
+/**
+ * To address issue with certain feeds (brought up by Charles Miller):
+ *
+ * "During the debacle that was the rollout of RSS2.0, this namespace was tried,
+ * and even appeared in Dave Winer's Scripting News feed for a while. It was
+ * then withdrawn, but the wonderful thing about standards is the moment you
+ * roll one out, even if it's marked as unfinished and subject to change,
+ * someone will end up stuck with it forever."
+ *
+ * Note that there is not counter part on the generator, we only generate the final RSS2
+ * 
+ */
+public class RSS20wNSParser extends RSS20Parser {
+    private static String RSS20_URI = "http://backend.userland.com/rss2";
+
+    public RSS20wNSParser() {
+        this("rss_2.0wNS");
+    }
+
+    protected RSS20wNSParser(String type) {
+        super(type);
+    }
+
+    public boolean isMyType(Document document) {
+        Element rssRoot = document.getRootElement();
+        Namespace defaultNS = rssRoot.getNamespace();
+        boolean ok = defaultNS!=null && defaultNS.equals(getRSSNamespace());
+        if (ok) {
+            ok = super.isMyType(document);
+        }
+        return ok;
+    }
+
+    protected Namespace getRSSNamespace() {
+        return Namespace.getNamespace(RSS20_URI);
+    }
+
+    /**
+     * After we parse the feed we put "rss_2.0" in it (so converters and generators work)
+     * this parser is a phantom.
+     *
+     */
+    protected WireFeed parseChannel(Element rssRoot)  {
+        WireFeed wFeed = super.parseChannel(rssRoot);
+        wFeed.setFeedType("rss_2.0");
+        return wFeed;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/SyModuleGenerator.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/SyModuleGenerator.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/SyModuleGenerator.java
new file mode 100644
index 0000000..e432e1a
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/SyModuleGenerator.java
@@ -0,0 +1,87 @@
+/*
+ * 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.io.impl;
+
+import com.sun.syndication.feed.module.Module;
+import com.sun.syndication.feed.module.SyModule;
+import com.sun.syndication.io.ModuleGenerator;
+import org.jdom2.Element;
+import org.jdom2.Namespace;
+
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+
+/**
+ * Feed Generator for SY ModuleImpl
+ * <p/>
+ *
+ * @author Elaine Chien
+ *
+ */
+
+public class SyModuleGenerator implements ModuleGenerator {
+
+    private static final String SY_URI  = "http://purl.org/rss/1.0/modules/syndication/";
+    private static final Namespace SY_NS  = Namespace.getNamespace("sy", SY_URI);
+
+    private static final Set NAMESPACES;
+
+    static {
+        Set nss = new HashSet();
+        nss.add(SY_NS);
+        NAMESPACES = Collections.unmodifiableSet(nss);
+    }
+
+    public String getNamespaceUri() {
+        return SY_URI;
+    }
+
+    /**
+     * Returns a set with all the URIs (JDOM Namespace elements) this module generator uses.
+     * <p/>
+     * It is used by the the feed generators to add their namespace definition in
+     * the root element of the generated document (forward-missing of Java 5.0 Generics).
+     * <p/>
+     *
+     * @return a set with all the URIs (JDOM Namespace elements) this module generator uses.
+     */
+    public Set getNamespaces() {
+        return NAMESPACES;
+    }
+
+    public void generate(Module module, Element element) {
+
+        SyModule syModule = (SyModule)module;
+
+        if (syModule.getUpdatePeriod() != null) {
+            Element updatePeriodElement = new Element("updatePeriod", SY_NS);
+            updatePeriodElement.addContent(syModule.getUpdatePeriod());
+            element.addContent(updatePeriodElement);
+        }
+
+        Element updateFrequencyElement = new Element("updateFrequency", SY_NS);
+        updateFrequencyElement.addContent(String.valueOf(syModule.getUpdateFrequency()));
+        element.addContent(updateFrequencyElement);
+
+        if (syModule.getUpdateBase() != null) {
+            Element updateBaseElement = new Element("updateBase", SY_NS);
+            updateBaseElement.addContent(DateParser.formatW3CDateTime(syModule.getUpdateBase()));
+            element.addContent(updateBaseElement);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/SyModuleParser.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/SyModuleParser.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/SyModuleParser.java
new file mode 100644
index 0000000..ac1961a
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/SyModuleParser.java
@@ -0,0 +1,59 @@
+/*
+ * 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.io.impl;
+
+import com.sun.syndication.feed.module.Module;
+import com.sun.syndication.feed.module.SyModule;
+import com.sun.syndication.feed.module.SyModuleImpl;
+import com.sun.syndication.io.ModuleParser;
+import org.jdom2.Element;
+import org.jdom2.Namespace;
+
+/**
+ */
+public class SyModuleParser implements ModuleParser {
+    public String getNamespaceUri() {
+        return SyModule.URI;
+    }
+
+    private Namespace getDCNamespace() {
+        return Namespace.getNamespace(SyModule.URI);
+    }
+
+    public Module parse(Element syndRoot) {
+        boolean foundSomething = false;
+        SyModule sm = new SyModuleImpl();
+
+        Element e = syndRoot.getChild("updatePeriod",getDCNamespace());
+        if (e!=null) {
+            foundSomething = true;
+            sm.setUpdatePeriod(e.getText());
+        }
+        e = syndRoot.getChild("updateFrequency",getDCNamespace());
+        if (e!=null) {
+            foundSomething = true;
+            sm.setUpdateFrequency(Integer.parseInt(e.getText().trim()));
+        }
+        e = syndRoot.getChild("updateBase",getDCNamespace());
+        if (e!=null) {
+            foundSomething = true;
+            sm.setUpdateBase(DateParser.parseDate(e.getText()));
+        }
+        return (foundSomething) ? sm : 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/io/impl/XmlFixerReader.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/XmlFixerReader.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/XmlFixerReader.java
new file mode 100644
index 0000000..88a98b2
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/com/sun/syndication/io/impl/XmlFixerReader.java
@@ -0,0 +1,652 @@
+/*
+ * Copyright 2005 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.io.impl;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.regex.Pattern;
+import java.util.regex.Matcher;
+
+/**
+ * @author Alejandro Abdelnur
+ */
+public class XmlFixerReader extends Reader {
+
+    protected Reader in;
+
+    public XmlFixerReader(Reader in) {
+        super(in);
+        this.in = in;
+        _buffer = new StringBuffer();
+        _state = 0;
+    }
+
+    private boolean trimmed;
+    private StringBuffer _buffer;
+    private int _bufferPos;
+    private int _state = 0;
+
+    private boolean trimStream() throws IOException {
+        boolean hasContent = true;
+        int state = 0;
+        boolean loop;
+        int c;
+        do {
+            switch (state) {
+                case 0:
+                    c = in.read();
+                    if (c==-1) {
+                        loop = false;
+                        hasContent = false;
+                    }
+                    else
+                    if (c==' ' || c=='\n' || c=='\r' || c=='\t') {
+                        loop = true;
+                    }
+                    else
+                    if (c=='<') {
+                        state = 1;
+                        _buffer.setLength(0);
+                        _bufferPos = 0;
+                        _buffer.append((char)c);
+                        loop = true;
+                    }
+                    else {
+                        _buffer.setLength(0);
+                        _bufferPos = 0;
+                        _buffer.append((char)c);
+                        loop = false;
+                        hasContent = true;
+                        _state = 3;
+                    }
+                    break;
+                case 1:
+                    c = in.read();
+                    if (c==-1) {
+                        loop = false;
+                        hasContent = true;
+                        _state = 3;
+                    }
+                    else
+                    if (c!='!') {
+                        _buffer.append((char)c);
+                        _state = 3;
+                        loop = false;
+                        hasContent = true;
+                        _state = 3;
+                    }
+                    else {
+                        _buffer.append((char)c);
+                        state = 2;
+                        loop = true;
+                    }
+                    break;
+                case 2:
+                    c = in.read();
+                    if (c==-1) {
+                        loop = false;
+                        hasContent = true;
+                        _state = 3;
+                    }
+                    else
+                    if (c=='-') {
+                        _buffer.append((char)c);
+                        state = 3;
+                        loop = true;
+                    }
+                    else {
+                        _buffer.append((char)c);
+                        loop = false;
+                        hasContent = true;
+                        _state = 3;
+                    }
+                    break;
+                case 3:
+                    c = in.read();
+                    if (c==-1) {
+                        loop = false;
+                        hasContent = true;
+                        _state = 3;
+                    }
+                    else
+                    if (c=='-') {
+                        _buffer.append((char)c);
+                        state = 4;
+                        loop = true;
+                    }
+                    else {
+                        _buffer.append((char)c);
+                        loop = false;
+                        hasContent = true;
+                        _state = 3;
+                    }
+                    break;
+                case 4:
+                    c = in.read();
+                    if (c==-1) {
+                        loop = false;
+                        hasContent = true;
+                        _state = 3;
+                    }
+                    else
+                    if (c!='-') {
+                        _buffer.append((char)c);
+                        loop = true;
+                    }
+                    else {
+                        _buffer.append((char)c);
+                        state = 5;
+                        loop = true;
+                    }
+                    break;
+                case 5:
+                    c = in.read();
+                    if (c==-1) {
+                        loop = false;
+                        hasContent = true;
+                        _state = 3;
+                    }
+                    else
+                    if (c!='-') {
+                        _buffer.append((char)c);
+                        loop = true;
+                        state = 4;
+                    }
+                    else {
+                        _buffer.append((char)c);
+                        state = 6;
+                        loop = true;
+                    }
+                    break;
+                case 6:
+                    c = in.read();
+                    if (c==-1) {
+                        loop = false;
+                        hasContent = true;
+                        _state = 3;
+                    }
+                    else
+                    if (c!='>') {
+                        _buffer.append((char)c);
+                        loop = true;
+                        state = 4;
+                    }
+                    else {
+                        _buffer.setLength(0);
+                        state = 0;
+                        loop = true;
+                    }
+                    break;
+                default:
+                    throw new IOException("It shouldn't happen");
+            }
+        } while (loop);
+        return hasContent;
+    }
+
+    public int read() throws IOException {
+        boolean loop;
+        if (!trimmed) { // trims XML stream
+            trimmed = true;
+            if (!trimStream()) {
+                return -1;
+            }
+        }
+        int c;
+        do { // converts literal entities to coded entities
+            switch (_state) {
+                case 0: // reading chars from stream
+                    c = in.read();
+                    if (c>-1) {
+                        if (c=='&') {
+                            _state = 1;
+                            _buffer.setLength(0);
+                            _bufferPos = 0;
+                            _buffer.append((char)c);
+                            _state = 1;
+                            loop = true;
+                        }
+                        else {
+                            loop = false;
+                        }
+                    }
+                    else {
+                        loop = false;
+                    }
+                    break;
+                case 1: // reading entity from stream
+                    c = in.read();
+                    if (c>-1) {
+                        if (c==';') {
+                            _buffer.append((char)c);
+                            _state = 2;
+                            loop = true;
+                        }
+                        else
+                        if ((c>='a' && c<='z') || (c>='A' && c<='Z') || (c=='#') || (c>='0' && c<='9')) {
+                            _buffer.append((char)c);
+                            loop = true;
+                        }
+                        else {
+                            // no ';' to match the '&' lets just make the '&'
+                            // a legal xml character entity '&amp;'
+                            _buffer.insert(1, "amp;");
+                            _buffer.append((char)c);
+                            _state = 3;
+                            loop = true;
+                        }
+                    }
+                    else {
+                        // no ';' to match the '&' lets just make the '&'
+                        // a legal xml character entity '&amp;'
+                        _buffer.insert(1, "amp;");
+                        _state = 3;
+                        loop = true;
+                    }
+                    break;
+                case 2: // replacing entity
+                    c = 0;
+                    String literalEntity = _buffer.toString();
+                    String codedEntity = (String) CODED_ENTITIES.get(literalEntity);
+                    if (codedEntity!=null) {
+                        _buffer.setLength(0);
+                        _buffer.append(codedEntity);
+                    } // else we leave what was in the stream
+                    _state = 3;
+                    loop = true;
+                    break;
+                case 3: // consuming buffer
+                    if (_bufferPos<_buffer.length()) {
+                        c = _buffer.charAt(_bufferPos++);
+                        loop = false;
+                    }
+                    else {
+                        c = 0;
+                        _state = 0;
+                        loop = true;
+                    }
+                    break;
+                 default:
+                    throw new IOException("It shouldn't happen");
+            }
+        } while (loop);
+        return c;
+    }
+
+    public int read(char[] buffer,int offset,int len) throws IOException {
+        int charsRead = 0;
+        int c = read();
+        if (c==-1) {
+            return -1;
+        }
+        buffer[offset+(charsRead++)] = (char) c;
+        while (charsRead<len && (c=read())>-1) {
+            buffer[offset+(charsRead++)] = (char) c;
+        }
+        return charsRead;
+    }
+
+    public long skip(long n) throws IOException {
+        if (n==0) {
+            return 0;
+        }
+        else
+        if (n<0) {
+            throw new IllegalArgumentException("'n' cannot be negative");
+        }
+        int c = read();
+        long counter = 1;
+        while (c>-1 && counter<n) {
+            c = read();
+            counter++;
+        }
+        return counter;
+    }
+
+    public boolean ready() throws IOException {
+        return (_state!=0) || in.ready();
+    }
+
+    public boolean markSupported() {
+        return false;
+    }
+
+    public void mark(int readAheadLimit) throws IOException {
+        throw new IOException("Stream does not support mark");
+    }
+
+    public void reset() throws IOException {
+        throw new IOException("Stream does not support mark");
+    }
+
+    public void close() throws IOException {
+        in.close();
+    }
+
+    private static Map CODED_ENTITIES = new HashMap();
+
+    static {
+        // note: refer to Character entity references in HTML 4
+        // at http://www.w3.org/TR/REC-html40/sgml/entities.html
+
+    	// Character entity set.
+    	// HTMLlat1 "-//W3C//ENTITIES Latin 1//EN//HTML"
+
+    	CODED_ENTITIES.put("&nbsp;",  "&#160;");
+        CODED_ENTITIES.put("&iexcl;", "&#161;");
+        CODED_ENTITIES.put("&cent;",  "&#162;");
+        CODED_ENTITIES.put("&pound;", "&#163;");
+        CODED_ENTITIES.put("&curren;","&#164;");
+        CODED_ENTITIES.put("&yen;",   "&#165;");
+        CODED_ENTITIES.put("&brvbar;","&#166;");
+        CODED_ENTITIES.put("&sect;",  "&#167;");
+        CODED_ENTITIES.put("&uml;",   "&#168;");
+        CODED_ENTITIES.put("&copy;",  "&#169;");
+        CODED_ENTITIES.put("&ordf;",  "&#170;");
+        CODED_ENTITIES.put("&laquo;", "&#171;");
+        CODED_ENTITIES.put("&not;",   "&#172;");
+        CODED_ENTITIES.put("&shy;",   "&#173;");
+        CODED_ENTITIES.put("&reg;",   "&#174;");
+        CODED_ENTITIES.put("&macr;",  "&#175;");
+        CODED_ENTITIES.put("&deg;",   "&#176;");
+        CODED_ENTITIES.put("&plusmn;","&#177;");
+        CODED_ENTITIES.put("&sup2;",  "&#178;");
+        CODED_ENTITIES.put("&sup3;",  "&#179;");
+        CODED_ENTITIES.put("&acute;", "&#180;");
+        CODED_ENTITIES.put("&micro;", "&#181;");
+        CODED_ENTITIES.put("&para;",  "&#182;");
+        CODED_ENTITIES.put("&middot;","&#183;");
+        CODED_ENTITIES.put("&cedil;", "&#184;");
+        CODED_ENTITIES.put("&sup1;",  "&#185;");
+        CODED_ENTITIES.put("&ordm;",  "&#186;");
+        CODED_ENTITIES.put("&raquo;", "&#187;");
+        CODED_ENTITIES.put("&frac14;","&#188;");
+        CODED_ENTITIES.put("&frac12;","&#189;");
+        CODED_ENTITIES.put("&frac34;","&#190;");
+        CODED_ENTITIES.put("&iquest;","&#191;");
+        CODED_ENTITIES.put("&Agrave;","&#192;");
+        CODED_ENTITIES.put("&Aacute;","&#193;");
+        CODED_ENTITIES.put("&Acirc;", "&#194;");
+        CODED_ENTITIES.put("&Atilde;","&#195;");
+        CODED_ENTITIES.put("&Auml;",  "&#196;");
+        CODED_ENTITIES.put("&Aring;", "&#197;");
+        CODED_ENTITIES.put("&AElig;", "&#198;");
+        CODED_ENTITIES.put("&Ccedil;","&#199;");
+        CODED_ENTITIES.put("&Egrave;","&#200;");
+        CODED_ENTITIES.put("&Eacute;","&#201;");
+        CODED_ENTITIES.put("&Ecirc;", "&#202;");
+        CODED_ENTITIES.put("&Euml;",  "&#203;");
+        CODED_ENTITIES.put("&Igrave;","&#204;");
+        CODED_ENTITIES.put("&Iacute;","&#205;");
+        CODED_ENTITIES.put("&Icirc;", "&#206;");
+        CODED_ENTITIES.put("&Iuml;",  "&#207;");
+        CODED_ENTITIES.put("&ETH;",   "&#208;");
+        CODED_ENTITIES.put("&Ntilde;","&#209;");
+        CODED_ENTITIES.put("&Ograve;","&#210;");
+        CODED_ENTITIES.put("&Oacute;","&#211;");
+        CODED_ENTITIES.put("&Ocirc;", "&#212;");
+        CODED_ENTITIES.put("&Otilde;","&#213;");
+        CODED_ENTITIES.put("&Ouml;",  "&#214;");
+        CODED_ENTITIES.put("&times;", "&#215;");
+        CODED_ENTITIES.put("&Oslash;","&#216;");
+        CODED_ENTITIES.put("&Ugrave;","&#217;");
+        CODED_ENTITIES.put("&Uacute;","&#218;");
+        CODED_ENTITIES.put("&Ucirc;", "&#219;");
+        CODED_ENTITIES.put("&Uuml;",  "&#220;");
+        CODED_ENTITIES.put("&Yacute;","&#221;");
+        CODED_ENTITIES.put("&THORN;", "&#222;");
+        CODED_ENTITIES.put("&szlig;", "&#223;");
+        CODED_ENTITIES.put("&agrave;","&#224;");
+        CODED_ENTITIES.put("&aacute;","&#225;");
+        CODED_ENTITIES.put("&acirc;", "&#226;");
+        CODED_ENTITIES.put("&atilde;","&#227;");
+        CODED_ENTITIES.put("&auml;",  "&#228;");
+        CODED_ENTITIES.put("&aring;", "&#229;");
+        CODED_ENTITIES.put("&aelig;", "&#230;");
+        CODED_ENTITIES.put("&ccedil;","&#231;");
+        CODED_ENTITIES.put("&egrave;","&#232;");
+        CODED_ENTITIES.put("&eacute;","&#233;");
+        CODED_ENTITIES.put("&ecirc;", "&#234;");
+        CODED_ENTITIES.put("&euml;",  "&#235;");
+        CODED_ENTITIES.put("&igrave;","&#236;");
+        CODED_ENTITIES.put("&iacute;","&#237;");
+        CODED_ENTITIES.put("&icirc;", "&#238;");
+        CODED_ENTITIES.put("&iuml;",  "&#239;");
+        CODED_ENTITIES.put("&eth;",   "&#240;");
+        CODED_ENTITIES.put("&ntilde;","&#241;");
+        CODED_ENTITIES.put("&ograve;","&#242;");
+        CODED_ENTITIES.put("&oacute;","&#243;");
+        CODED_ENTITIES.put("&ocirc;", "&#244;");
+        CODED_ENTITIES.put("&otilde;","&#245;");
+        CODED_ENTITIES.put("&ouml;",  "&#246;");
+        CODED_ENTITIES.put("&divide;","&#247;");
+        CODED_ENTITIES.put("&oslash;","&#248;");
+        CODED_ENTITIES.put("&ugrave;","&#249;");
+        CODED_ENTITIES.put("&uacute;","&#250;");
+        CODED_ENTITIES.put("&ucirc;", "&#251;");
+        CODED_ENTITIES.put("&uuml;",  "&#252;");
+        CODED_ENTITIES.put("&yacute;","&#253;");
+        CODED_ENTITIES.put("&thorn;", "&#254;");
+        CODED_ENTITIES.put("&yuml;",  "&#255;");
+
+        // Mathematical, Greek and Symbolic characters for HTML.
+        // HTMLsymbol "-//W3C//ENTITIES Symbols//EN//HTML"
+
+        CODED_ENTITIES.put("&fnof;",     "&#402;");
+        CODED_ENTITIES.put("&Alpha;",    "&#913;");
+        CODED_ENTITIES.put("&Beta;",     "&#914;");
+        CODED_ENTITIES.put("&Gamma;",    "&#915;");
+        CODED_ENTITIES.put("&Delta;",    "&#916;");
+        CODED_ENTITIES.put("&Epsilon;",  "&#917;");
+        CODED_ENTITIES.put("&Zeta;",     "&#918;");
+        CODED_ENTITIES.put("&Eta;",      "&#919;");
+        CODED_ENTITIES.put("&Theta;",    "&#920;");
+        CODED_ENTITIES.put("&Iota;",     "&#921;");
+        CODED_ENTITIES.put("&Kappa;",    "&#922;");
+        CODED_ENTITIES.put("&Lambda;",   "&#923;");
+        CODED_ENTITIES.put("&Mu;",       "&#924;");
+        CODED_ENTITIES.put("&Nu;",       "&#925;");
+        CODED_ENTITIES.put("&Xi;",       "&#926;");
+        CODED_ENTITIES.put("&Omicron;",  "&#927;");
+        CODED_ENTITIES.put("&Pi;",       "&#928;");
+        CODED_ENTITIES.put("&Rho;",      "&#929;");
+        CODED_ENTITIES.put("&Sigma;",    "&#931;");
+        CODED_ENTITIES.put("&Tau;",      "&#932;");
+        CODED_ENTITIES.put("&Upsilon;",  "&#933;");
+        CODED_ENTITIES.put("&Phi;",      "&#934;");
+        CODED_ENTITIES.put("&Chi;",      "&#935;");
+        CODED_ENTITIES.put("&Psi;",      "&#936;");
+        CODED_ENTITIES.put("&Omega;",    "&#937;");
+        CODED_ENTITIES.put("&alpha;",    "&#945;");
+        CODED_ENTITIES.put("&beta;",     "&#946;");
+        CODED_ENTITIES.put("&gamma;",    "&#947;");
+        CODED_ENTITIES.put("&delta;",    "&#948;");
+        CODED_ENTITIES.put("&epsilon;",  "&#949;");
+        CODED_ENTITIES.put("&zeta;",     "&#950;");
+        CODED_ENTITIES.put("&eta;",      "&#951;");
+        CODED_ENTITIES.put("&theta;",    "&#952;");
+        CODED_ENTITIES.put("&iota;",     "&#953;");
+        CODED_ENTITIES.put("&kappa;",    "&#954;");
+        CODED_ENTITIES.put("&lambda;",   "&#955;");
+        CODED_ENTITIES.put("&mu;",       "&#956;");
+        CODED_ENTITIES.put("&nu;",       "&#957;");
+        CODED_ENTITIES.put("&xi;",       "&#958;");
+        CODED_ENTITIES.put("&omicron;",  "&#959;");
+        CODED_ENTITIES.put("&pi;",       "&#960;");
+        CODED_ENTITIES.put("&rho;",      "&#961;");
+        CODED_ENTITIES.put("&sigmaf;",   "&#962;");
+        CODED_ENTITIES.put("&sigma;",    "&#963;");
+        CODED_ENTITIES.put("&tau;",      "&#964;");
+        CODED_ENTITIES.put("&upsilon;",  "&#965;");
+        CODED_ENTITIES.put("&phi;",      "&#966;");
+        CODED_ENTITIES.put("&chi;",      "&#967;");
+        CODED_ENTITIES.put("&psi;",      "&#968;");
+        CODED_ENTITIES.put("&omega;",    "&#969;");
+        CODED_ENTITIES.put("&thetasym;", "&#977;");
+        CODED_ENTITIES.put("&upsih;",    "&#978;");
+        CODED_ENTITIES.put("&piv;",      "&#982;");
+        CODED_ENTITIES.put("&bull;",     "&#8226;");
+        CODED_ENTITIES.put("&hellip;",   "&#8230;");
+        CODED_ENTITIES.put("&prime;",    "&#8242;");
+        CODED_ENTITIES.put("&Prime;",    "&#8243;");
+        CODED_ENTITIES.put("&oline;",    "&#8254;");
+        CODED_ENTITIES.put("&frasl;",    "&#8260;");
+        CODED_ENTITIES.put("&weierp;",   "&#8472;");
+        CODED_ENTITIES.put("&image;",    "&#8465;");
+        CODED_ENTITIES.put("&real;",     "&#8476;");
+        CODED_ENTITIES.put("&trade;",    "&#8482;");
+        CODED_ENTITIES.put("&alefsym;",  "&#8501;");
+        CODED_ENTITIES.put("&larr;",     "&#8592;");
+        CODED_ENTITIES.put("&uarr;",     "&#8593;");
+        CODED_ENTITIES.put("&rarr;",     "&#8594;");
+        CODED_ENTITIES.put("&darr;",     "&#8595;");
+        CODED_ENTITIES.put("&harr;",     "&#8596;");
+        CODED_ENTITIES.put("&crarr;",    "&#8629;");
+        CODED_ENTITIES.put("&lArr;",     "&#8656;");
+        CODED_ENTITIES.put("&uArr;",     "&#8657;");
+        CODED_ENTITIES.put("&rArr;",     "&#8658;");
+        CODED_ENTITIES.put("&dArr;",     "&#8659;");
+        CODED_ENTITIES.put("&hArr;",     "&#8660;");
+        CODED_ENTITIES.put("&forall;",   "&#8704;");
+        CODED_ENTITIES.put("&part;",     "&#8706;");
+        CODED_ENTITIES.put("&exist;",    "&#8707;");
+        CODED_ENTITIES.put("&empty;",    "&#8709;");
+        CODED_ENTITIES.put("&nabla;",    "&#8711;");
+        CODED_ENTITIES.put("&isin;",     "&#8712;");
+        CODED_ENTITIES.put("&notin;",    "&#8713;");
+        CODED_ENTITIES.put("&ni;",       "&#8715;");
+        CODED_ENTITIES.put("&prod;",     "&#8719;");
+        CODED_ENTITIES.put("&sum;",      "&#8721;");
+        CODED_ENTITIES.put("&minus;",    "&#8722;");
+        CODED_ENTITIES.put("&lowast;",   "&#8727;");
+        CODED_ENTITIES.put("&radic;",    "&#8730;");
+        CODED_ENTITIES.put("&prop;",     "&#8733;");
+        CODED_ENTITIES.put("&infin;",    "&#8734;");
+        CODED_ENTITIES.put("&ang;",      "&#8736;");
+        CODED_ENTITIES.put("&and;",      "&#8743;");
+        CODED_ENTITIES.put("&or;",       "&#8744;");
+        CODED_ENTITIES.put("&cap;",      "&#8745;");
+        CODED_ENTITIES.put("&cup;",      "&#8746;");
+        CODED_ENTITIES.put("&int;",      "&#8747;");
+        CODED_ENTITIES.put("&there4;",   "&#8756;");
+        CODED_ENTITIES.put("&sim;",      "&#8764;");
+        CODED_ENTITIES.put("&cong;",     "&#8773;");
+        CODED_ENTITIES.put("&asymp;",    "&#8776;");
+        CODED_ENTITIES.put("&ne;",       "&#8800;");
+        CODED_ENTITIES.put("&equiv;",    "&#8801;");
+        CODED_ENTITIES.put("&le;",       "&#8804;");
+        CODED_ENTITIES.put("&ge;",       "&#8805;");
+        CODED_ENTITIES.put("&sub;",      "&#8834;");
+        CODED_ENTITIES.put("&sup;",      "&#8835;");
+        CODED_ENTITIES.put("&nsub;",     "&#8836;");
+        CODED_ENTITIES.put("&sube;",     "&#8838;");
+        CODED_ENTITIES.put("&supe;",     "&#8839;");
+        CODED_ENTITIES.put("&oplus;",    "&#8853;");
+        CODED_ENTITIES.put("&otimes;",   "&#8855;");
+        CODED_ENTITIES.put("&perp;",     "&#8869;");
+        CODED_ENTITIES.put("&sdot;",     "&#8901;");
+        CODED_ENTITIES.put("&lceil;",    "&#8968;");
+        CODED_ENTITIES.put("&rceil;",    "&#8969;");
+        CODED_ENTITIES.put("&lfloor;",   "&#8970;");
+        CODED_ENTITIES.put("&rfloor;",   "&#8971;");
+        CODED_ENTITIES.put("&lang;",     "&#9001;");
+        CODED_ENTITIES.put("&rang;",     "&#9002;");
+        CODED_ENTITIES.put("&loz;",      "&#9674;");
+        CODED_ENTITIES.put("&spades;",   "&#9824;");
+        CODED_ENTITIES.put("&clubs;",    "&#9827;");
+        CODED_ENTITIES.put("&hearts;",   "&#9829;");
+        CODED_ENTITIES.put("&diams;",    "&#9830;");
+
+       // Special characters for HTML.
+       // HTMLspecial "-//W3C//ENTITIES Special//EN//HTML"
+
+        CODED_ENTITIES.put("&quot;",      "&#34;");
+        CODED_ENTITIES.put("&amp;",       "&#38;");
+        CODED_ENTITIES.put("&lt;",        "&#60;");
+        CODED_ENTITIES.put("&gt;",        "&#62;");
+        CODED_ENTITIES.put("&OElig;",     "&#338;");
+        CODED_ENTITIES.put("&oelig;",     "&#339;");
+        CODED_ENTITIES.put("&Scaron;",    "&#352;");
+        CODED_ENTITIES.put("&scaron;",    "&#353;");
+        CODED_ENTITIES.put("&Yuml;",      "&#376;");
+        CODED_ENTITIES.put("&circ;",      "&#710;");
+        CODED_ENTITIES.put("&tilde;",     "&#732;");
+        CODED_ENTITIES.put("&ensp;",      "&#8194;");
+        CODED_ENTITIES.put("&emsp;",      "&#8195;");
+        CODED_ENTITIES.put("&thinsp;",    "&#8201;");
+        CODED_ENTITIES.put("&zwnj;",      "&#8204;");
+        CODED_ENTITIES.put("&zwj;",       "&#8205;");
+        CODED_ENTITIES.put("&lrm;",       "&#8206;");
+        CODED_ENTITIES.put("&rlm;",       "&#8207;");
+        CODED_ENTITIES.put("&ndash;",     "&#8211;");
+        CODED_ENTITIES.put("&mdash;",     "&#8212;");
+        CODED_ENTITIES.put("&lsquo;",     "&#8216;");
+        CODED_ENTITIES.put("&rsquo;",     "&#8217;");
+        CODED_ENTITIES.put("&sbquo;",     "&#8218;");
+        CODED_ENTITIES.put("&ldquo;",     "&#8220;");
+        CODED_ENTITIES.put("&rdquo;",     "&#8221;");
+        CODED_ENTITIES.put("&bdquo;",     "&#8222;");
+        CODED_ENTITIES.put("&dagger;",    "&#8224;");
+        CODED_ENTITIES.put("&Dagger;",    "&#8225;");
+        CODED_ENTITIES.put("&permil;",    "&#8240;");
+        CODED_ENTITIES.put("&lsaquo;",    "&#8249;");
+        CODED_ENTITIES.put("&rsaquo;",    "&#8250;");
+        CODED_ENTITIES.put("&euro;",      "&#8364;");
+    }
+
+    //
+    // It shouldn't be here but well, just reusing the CODED_ENTITIES Map :)
+    //
+
+    private static Pattern ENTITIES_PATTERN = Pattern.compile( "&[A-Za-z^#]+;" );
+
+
+    public String processHtmlEntities(String s) {
+        if (s.indexOf('&')==-1) {
+            return s;
+        }
+        StringBuffer sb = new StringBuffer(s.length());
+        int pos = 0;
+        while (pos<s.length()) {
+            String chunck = s.substring(pos);
+            Matcher m = ENTITIES_PATTERN.matcher(chunck);
+            if (m.find()) {
+                int b = pos + m.start();
+                int e = pos + m.end();
+                if (b>pos) {
+                    sb.append(s.substring(pos,b));
+                    pos = b;
+                }
+                chunck = s.substring(pos,e);
+                String codedEntity = (String) CODED_ENTITIES.get(chunck);
+                if (codedEntity==null) {
+                    codedEntity = chunck;
+                }
+                sb.append(codedEntity);
+                pos = e;
+            }
+            else {
+                sb.append(chunck);
+                pos += chunck.length();
+            }
+        }
+        return sb.toString();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/ActivityStreamModule.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/ActivityStreamModule.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/ActivityStreamModule.java
new file mode 100644
index 0000000..7151995
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/ActivityStreamModule.java
@@ -0,0 +1,43 @@
+/*
+ *  Copyright 2011 robert.cooper.
+ * 
+ *  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.
+ *  under the License.
+ */
+
+package org.rometools.feed.module.activitystreams;
+
+import org.rometools.feed.module.activitystreams.types.ActivityObject;
+import org.rometools.feed.module.activitystreams.types.Mood;
+import org.rometools.feed.module.activitystreams.types.Verb;
+
+/**
+ *
+ * @author robert.cooper
+ */
+public interface ActivityStreamModule {
+
+    public Verb getVerb();
+    public void setVerb(Verb verb);
+
+    public ActivityObject getObject();
+    public void setObject(ActivityObject object);
+
+    public ActivityObject getTarget();
+    public void setTarget(ActivityObject object);
+
+    public Mood getMood();
+    public void setMood(Mood mood);
+
+
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/ActivityStreamModuleImpl.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/ActivityStreamModuleImpl.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/ActivityStreamModuleImpl.java
new file mode 100644
index 0000000..f56bcb9
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/ActivityStreamModuleImpl.java
@@ -0,0 +1,83 @@
+/*
+ *  Copyright 2011 robert.cooper.
+ *
+ *  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.
+ *  under the License.
+ */
+package org.rometools.feed.module.activitystreams;
+
+import org.rometools.feed.module.activitystreams.types.ActivityObject;
+import org.rometools.feed.module.activitystreams.types.Mood;
+import org.rometools.feed.module.activitystreams.types.Verb;
+
+
+/**
+ *
+ * @author robert.cooper
+ */
+public class ActivityStreamModuleImpl implements ActivityStreamModule {
+    private ActivityObject object;
+    private Verb verb;
+
+    /**
+     * Set the value of object
+     *
+     * @param newobject new value of object
+     */
+    public void setObject(ActivityObject newobject) {
+        this.object = newobject;
+    }
+
+    /**
+     * Get the value of object
+     *
+     * @return the value of object
+     */
+    public ActivityObject getObject() {
+        return this.object;
+    }
+
+    /**
+     * Set the value of verb
+     *
+     * @param newverb new value of verb
+     */
+    public void setVerb(Verb newverb) {
+        this.verb = newverb;
+    }
+
+    /**
+     * Get the value of verb
+     *
+     * @return the value of verb
+     */
+    public Verb getVerb() {
+        return this.verb;
+    }
+
+    public ActivityObject getTarget() {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    public void setTarget(ActivityObject object) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    } 
+
+    public Mood getMood() {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    public void setMood(Mood mood) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/package.html
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/package.html b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/package.html
new file mode 100644
index 0000000..ed15c92
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/package.html
@@ -0,0 +1,6 @@
+<html>
+<body>
+http://activitystrea.ms/schema/1.0/activity-schema-02.html
+http://activitystrea.ms/spec/1.0/atom-activity-02.html
+</body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/ActivityObject.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/ActivityObject.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/ActivityObject.java
new file mode 100644
index 0000000..5b40c67
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/ActivityObject.java
@@ -0,0 +1,48 @@
+/*
+ *  Copyright 2011 robert.cooper.
+ * 
+ *  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.
+ *  under the License.
+ */
+
+package org.rometools.feed.module.activitystreams.types;
+
+import com.sun.syndication.feed.atom.Entry;
+import org.rometools.feed.module.georss.GeoRSSModule;
+import org.rometools.feed.module.portablecontacts.ContactModule;
+/**
+ *
+ * @author robert.cooper
+ */
+public abstract class ActivityObject extends Entry implements HasLocation {
+    
+    
+    public abstract String getTypeIRI();
+
+    public GeoRSSModule getLocation() {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    public void setLocation(GeoRSSModule location) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    public ContactModule getAddress(){
+         throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    public void setAddress(ContactModule address){
+         throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Article.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Article.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Article.java
new file mode 100644
index 0000000..c094a77
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Article.java
@@ -0,0 +1,53 @@
+/*
+ *  Copyright 2011 robert.cooper.
+ *
+ *  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.
+ *  under the License.
+ */
+package org.rometools.feed.module.activitystreams.types;
+
+
+/**
+ *  <p>The "article" Object type indicates that the Object is an
+ *          article, such as a news article, a knowledge base entry, or other
+ *          similar construct.
+ *</p>
+ *<p>Articles generally consist of paragraphs of text, in some cases
+ *          incorporating embedded media such as photos and inline hyperlinks to
+ *          other resources.
+ *</p>
+ *<p>The "Article" Object type is identified by the URL <tt>http://activitystrea.ms/schema/1.0/article</tt>.
+ *</p>
+ *<p>An article has the following additional components:
+ *</p>
+ *<p></p>
+ *<blockquote class="text"><dl>
+ *<dt>Name</dt>
+ *<dd>The title of the article. Represented by the
+ *              Name component of the base Object Construct.
+ *</dd>
+ *<dt>Content</dt>
+ *<dd>The main body content of the article.
+ *              Represented in JSON as a property called <tt>content</tt>
+ *              whose value is a JSON string containing a fragment of HTML that
+ *              represents the content.
+ *</dd>
+ *</dl></blockquote>
+ * @author robert.cooper
+ */
+public class Article extends ActivityObject {
+    @Override
+    public String getTypeIRI() {
+        return "http://activitystrea.ms/schema/1.0/article";
+    }
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Audio.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Audio.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Audio.java
new file mode 100644
index 0000000..102bfb3
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Audio.java
@@ -0,0 +1,89 @@
+/*
+ *  Copyright 2011 robert.cooper.
+ *
+ *  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.
+ *  under the License.
+ */
+package org.rometools.feed.module.activitystreams.types;
+
+
+/**
+ * <p>The "audio" Object type represents audio content.
+ *</p>
+ *<p>The "audio" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/audio</tt>.
+ *</p>
+ *<p>An audio has the following additional components:
+ *</p>
+ *<p></p>
+ *<blockquote class="text"><dl>
+ *<dt>Audio Stream Link</dt>
+ *<dd>A Media Link Construct linking
+ *              to the audio content itself. Represented in JSON as a property
+ *              called <tt>stream</tt> whose value is a JSON
+ *              object with properties as defined in [TODO: xref the JSON
+ *              serialization of a Media Link Construct]
+ *</dd>
+ *<dt>Embed Code</dt>
+ *<dd>An HTML fragment that, when embedded in
+ *              an HTML page, will provide an interactive player UI for the
+ *              audio stream. Represented in JSON as a property called <tt>embedCode</tt> whose value is a JSON string
+ *              containing the fragment of HTML.
+ *</dd>
+ *</dl>
+ * @author robert.cooper
+ */
+public class Audio extends ActivityObject {
+    private String embedCode;
+    private String streamLink;
+
+    /**
+     * Set the value of embedCode
+     *
+     * @param newembedCode new value of embedCode
+     */
+    public void setEmbedCode(String newembedCode) {
+        this.embedCode = newembedCode;
+    }
+
+    /**
+     * Get the value of embedCode
+     *
+     * @return the value of embedCode
+     */
+    public String getEmbedCode() {
+        return this.embedCode;
+    }
+
+    /**
+     * Set the value of streamLink
+     *
+     * @param newstreamLink new value of streamLink
+     */
+    public void setStreamLink(String newstreamLink) {
+        this.streamLink = newstreamLink;
+    }
+
+    /**
+     * Get the value of streamLink
+     *
+     * @return the value of streamLink
+     */
+    public String getStreamLink() {
+        return this.streamLink;
+    }
+
+    @Override
+    public String getTypeIRI() {
+        return "http://activitystrea.ms/schema/1.0/audio";
+    }
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Bookmark.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Bookmark.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Bookmark.java
new file mode 100644
index 0000000..ce6e9bc
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Bookmark.java
@@ -0,0 +1,119 @@
+/*
+ *  Copyright 2011 robert.cooper.
+ * 
+ *  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.
+ *  under the License.
+ */
+
+package org.rometools.feed.module.activitystreams.types;
+
+import com.sun.syndication.feed.atom.Link;
+
+
+/**
+ * <p>The "bookmark" Object type represents a pointer to some URL --
+ *          typically a web page. In most cases, a bookmark is specific to a
+ *          given user and contains metadata chosen by that user. Bookmark
+ *          Objects are similar in principle to the concept of bookmarks or
+ *          favorites in a web browser. A bookmark represents a pointer to the
+ *          URL, not the URL or the associated resource itself.
+ *</p>
+ *<p>When dealing with bookmarks it is important to note the
+ *          distinction between the title, description, and URL of the bookmark
+ *          itself and the title, content, and URL of the resource that is the
+ *          target of the bookmark. In some implementations these MAY be the
+ *          same, but bookmark managers often allow a user to edit the title and
+ *          description of his or her own bookmarks to differ from the metadata
+ *          on the target itself.
+ *</p>
+ *<p>Some implementations refer to this Object type as a "link". This
+ *          specification uses the term "bookmark" to avoid confusion with the
+ *          general concept of hyperlinks which apply to all Object types.
+ *</p>
+ *<p>Since bookmarks are often specific to a particular user, even
+ *          though multiple users might have bookmarks pointing at the same
+ *          resource, it is appropriate to use the "post" Verb to describe the
+ *          publication of such a bookmark. The "mark as favorite" Verb SHOULD
+ *          be used when a user flags another user's bookmark as being a
+ *          favorite without creating his own bookmark, or when a user flags his
+ *          own bookmark as being a favorite as a special classification within
+ *          his own bookmark collection.
+ *</p>
+ *<p>The "bookmark" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/bookmark</tt>.
+ *</p>
+ *<p>A bookmark has the following additional components:
+ *</p>
+ *<p></p>
+ *<blockquote class="text"><dl>
+ *<dt>Title</dt>
+ *<dd>The title of the bookmark, as entered by the
+ *              user who created the bookmark. Represented by the Name component
+ *              of the base Object Construct. Publishers MAY use the title of
+ *               the target resource as a default for this property where a user
+ *              hasn't entered a customized value.
+ *</dd>
+ *<dt>Target URL</dt>
+ *<dd>The URL of the item that is the target
+ *              of the bookmark. Represented in JSON by a property called <tt>targetUrl</tt> whose value is a JSON string
+ *              containing the target URL.
+ *</dd>
+ *<dt>Thumbnail</dt>
+ *<dd>The URL and metadata for a thumbnail
+ *              version of the page. Represented by the Representative Image
+ *              component of the base Object Construct. Processors MAY ignore
+ *              thumbnails that are of an inappropriate size for their user
+ *              interface.
+ *</dd>
+ *</dl></blockquote>
+ * @author robert.cooper
+ */
+public class Bookmark extends ActivityObject {
+
+    @Override
+    public String getTypeIRI() {
+        return "http://activitystrea.ms/schema/1.0/bookmark";
+    }
+
+
+ 
+
+    /**
+     * Get the value of thumbnail
+     *
+     * @return the value of thumbnail
+     */
+    public Link getThumbnail() {
+        return this.findRelatedLink("thumbnail");
+    }
+
+    /**
+     * Set the value of thumbnail
+     *
+     * @param newthumbnail new value of thumbnail
+     */
+    public void setThumbnail(Link newthumbnail) {
+        Link old = null;
+        for(Link l : this.getOtherLinks()){
+            if("thumbnail".equals(l.getRel())){
+                old = l;
+                break;
+            }
+        }
+        if(old != null){
+            this.getOtherLinks().remove(old);
+            newthumbnail.setRel("thumbnail");
+        }
+        this.getOtherLinks().add(newthumbnail);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Comment.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Comment.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Comment.java
new file mode 100644
index 0000000..0e5cfe0
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Comment.java
@@ -0,0 +1,61 @@
+/*
+ *  Copyright 2011 robert.cooper.
+ * 
+ *  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.
+ *  under the License.
+ */
+
+package org.rometools.feed.module.activitystreams.types;
+
+/**
+ * <p>The "comment" object type represents a textual response to
+ *          another object.
+ *</p>
+ *<p>The comment object type MUST NOT be used for other kinds of
+ *          replies, such as video replies or reviews.
+ *</p>
+ *<p>The "comment" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/comment</tt>.
+ *</p>
+ *<p>A comment has the following additional components:
+ *</p>
+ *<p></p>
+ *<blockquote class="text"><dl>
+ *<dt>Subject</dt>
+ *<dd>The subject of the comment. Represented by
+ *              the Name component of the base Object Construct. Many systems do
+ *              not have the concept of a title or subject for a comment; such
+ *              systems MUST omit the Name component. Processors SHOULD refer to
+ *              such comments as simply being "a comment", with appropriate
+ *              localization, if they are to be described in a sentence.
+ *</dd>
+ *<dt>Content</dt>
+ *<dd>The content of the comment. Represented in
+ *              JSON as a property called <tt>content</tt>
+ *              whose value is a JSON string containing a fragment of HTML that
+ *              represents the content. Publishers SHOULD include any markup
+ *              necessary to achieve a similar presentation to that on the
+ *              publisher's own HTML pages, including any links that the service
+ *              automatically adds. Processors MAY remove all HTML markup and
+ *              consider the comment to be plain text.
+ *</dd>
+ *</dl></blockquote>
+ * @author robert.cooper
+ */
+public class Comment extends ActivityObject {
+
+    @Override
+    public String getTypeIRI() {
+        return "http://activitystrea.ms/schema/1.0/comment";
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Event.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Event.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Event.java
new file mode 100644
index 0000000..4d9bed7
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Event.java
@@ -0,0 +1,55 @@
+/*
+ *  Copyright 2011 robert.cooper.
+ * 
+ *  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.
+ *  under the License.
+ */
+
+package org.rometools.feed.module.activitystreams.types;
+
+/**
+ * <p>The "event" object type represents an event that occurs in a
+ *          certain place during a particular interval of time.
+ *</p>
+ *<p>The object type URL for the "event" object type is <tt>http://activitystrea.ms/schema/1.0/event</tt>.
+ *</p>
+ *<p>An event has the following additional components:
+ *</p>
+ *<p></p>
+ *<blockquote class="text"><dl>
+ *<dt>Start Date and Time</dt>
+ *<dd>The date and time that the
+ *              event begins. Represented in JSON as a property called <tt>startTime</tt> whose value is JSON string
+ *              containing a W3CDTF timestamp. [TODO: Reference W3CDTF spec.]
+ *              [TODO: Include prose describing how to represent just a date vs.
+ *              a date and time.]
+ *</dd>
+ *<dt>End Date and Time</dt>
+ *<dd>The date and time that the event
+ *              ends. Represented in JSON as a property called <tt>endTime</tt> whose value is JSON string
+ *              containing a W3CDTF timestamp. [TODO: Reference W3CDTF spec.]
+ *              [TODO: Include prose describing how to represent just a date vs.
+ *              a date and time.]
+ *</dd>
+ *</dl></blockquote>
+ *
+ * @author robert.cooper
+ */
+public class Event extends ActivityObject {
+
+    @Override
+    public String getTypeIRI() {
+        return "http://activitystrea.ms/schema/1.0/event";
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/File.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/File.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/File.java
new file mode 100644
index 0000000..7d07359
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/File.java
@@ -0,0 +1,59 @@
+/*
+ *  Copyright 2011 robert.cooper.
+ * 
+ *  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.
+ *  under the License.
+ */
+
+package org.rometools.feed.module.activitystreams.types;
+
+/**
+ * <p>The "file" Object type represents some document or other file
+ *          with no additional machine-readable semantics.
+ *</p>
+ *<p>It is intended that this type be used as a base type for other
+ *          Objects that manifest as files, so that additional semantics can be
+ *          added while providing a fallback ability for clients that do not
+ *          support the more specific Object type.
+ *</p>
+ *<p>The "file" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/file</tt>.
+ *</p>
+ *<p>A file has the following additional components:
+ *</p>
+ *<p></p>
+ *<blockquote class="text"><dl>
+ *<dt>Associated File URL</dt>
+ *<dd>The URL of the file described
+ *              by this Object Construct. Represented in JSON by a property
+ *              called <tt>fileUrl</tt> whose value is a JSON
+ *              string containing the URL.
+ *</dd>
+ *<dt>File MIME Type</dt>
+ *<dd>The MIME type of the file described
+ *              by this Object Construct. Represented in JSON by a property
+ *              called <tt>mimeType</tt> whose value is a
+ *              JSON string containing the MIME type.
+ *</dd>
+ *</dl></blockquote>
+ * @author robert.cooper
+ */
+public class File extends ActivityObject {
+
+    @Override
+    public String getTypeIRI() {
+        return "http://activitystrea.ms/schema/1.0/file";
+    }
+
+    
+
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Folder.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Folder.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Folder.java
new file mode 100644
index 0000000..c5dca30
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Folder.java
@@ -0,0 +1,49 @@
+/*
+ *  Copyright 2011 robert.cooper.
+ * 
+ *  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.
+ *  under the License.
+ */
+
+package org.rometools.feed.module.activitystreams.types;
+
+/**
+ * <p>The "folder" object type represents a collection of files or
+ *          media objects. This is similar to the "photo album" object type, but
+ *          not specifically representing a collection of "photos."
+ *</p>
+ *<p>The "folder" object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/folder</tt>.
+ *</p>
+ *<p>A folder has the following additional components:
+ *</p>
+ *<p></p>
+ *<blockquote class="text"><dl>
+ *<dt>Preview Image Link</dt>
+ *<dd>A Media Link Construct
+ *              describing an image file that can be used as a preview image for
+ *              the folder. Represented by the Representative Image component of
+ *              the base Object Construct. Processors MAY ignore thumbnails that
+ *              are of an inappropriate size for their user interface.
+ *</dd>
+ *</dl></blockquote>
+ * @author robert.cooper
+ */
+public class Folder extends ActivityObject{
+
+    @Override
+    public String getTypeIRI() {
+        return "http://activitystrea.ms/schema/1.0/folder";
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/00c22e7c/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Group.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Group.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Group.java
new file mode 100644
index 0000000..663848e
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/activitystreams/types/Group.java
@@ -0,0 +1,32 @@
+/*
+ *  Copyright 2011 robert.cooper.
+ * 
+ *  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.
+ *  under the License.
+ */
+
+package org.rometools.feed.module.activitystreams.types;
+
+/**
+ * <p>The "group" Object type represents a social networking group. A
+ *          group is a collection of people which people can join and leave.
+ *</p>
+ *<p>The "group" Object type is identified by the URI <tt>http://activitystrea.ms/schema/1.0/group</tt>.
+ *</p>
+ *<p>A group has no additional components.
+ 
+ * @author robert.cooper
+ */
+public class Group {
+
+}