marmotta-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ja...@apache.org
Subject [21/51] [abbrv] [partial] MARMOTTA-397: Reorganized and renamed Marmotta Sesame Tools
Date Wed, 08 Jan 2014 15:25:37 GMT
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/opensearch/impl/OpenSearchModuleImpl.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/opensearch/impl/OpenSearchModuleImpl.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/opensearch/impl/OpenSearchModuleImpl.java
new file mode 100644
index 0000000..7cddc92
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/opensearch/impl/OpenSearchModuleImpl.java
@@ -0,0 +1,146 @@
+/*
+ * 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 org.rometools.feed.module.opensearch.impl;
+
+import com.sun.syndication.feed.CopyFrom;
+import com.sun.syndication.feed.atom.Link;
+import com.sun.syndication.feed.module.ModuleImpl;
+import org.rometools.feed.module.opensearch.OpenSearchModule;
+import org.rometools.feed.module.opensearch.entity.OSQuery;
+
+import java.io.Serializable;
+import java.util.LinkedList;
+import java.util.List;
+
+
+/**
+ * @author Michael W. Nassif (enrouteinc@gmail.com)
+ * OpenSearch Module implementation
+ */
+public class OpenSearchModuleImpl extends ModuleImpl implements OpenSearchModule, Serializable {
+    private int totalResults = -1;
+    private int startIndex = 1;
+    private int itemsPerPage = -1;
+    private Link link;
+    private List queries;
+
+    public OpenSearchModuleImpl() {
+        super(OpenSearchModuleImpl.class, OpenSearchModuleImpl.URI);
+    }
+
+    /**
+     * @return Returns the itemsPerPage.
+     */
+    public int getItemsPerPage() {
+        return itemsPerPage;
+    }
+
+    /**
+     * @param itemsPerPage The itemsPerPage to set.
+     */
+    public void setItemsPerPage(int itemsPerPage) {
+        this.itemsPerPage = itemsPerPage;
+    }
+
+    /**
+     * @return Returns the link.
+     */
+    public Link getLink() {
+        return link;
+    }
+
+    /**
+     * @param link The link to set.
+     */
+    public void setLink(Link link) {
+        this.link = link;
+    }
+
+    
+    /**
+     * @return Returns the queries.
+     */
+    public List getQueries() {
+        this.queries = (queries == null) ? new LinkedList() : queries;
+
+        return this.queries;
+    }
+
+    /**
+     * @param queries The queries to set.
+     */
+    public void setQueries(List queries) {
+        this.queries = queries;
+    }
+
+    public void addQuery(OSQuery query) {
+        if (queries != null) {
+            queries.add(query);
+        } else {
+            queries = new LinkedList();
+            queries.add(query);
+        }
+    }
+
+    /**
+     * @return Returns the startIndex.
+     */
+    public int getStartIndex() {
+        return startIndex;
+    }
+
+    /**
+     * @param startIndex The startIndex to set.
+     */
+    public void setStartIndex(int startIndex) {
+        this.startIndex = startIndex;
+    }
+
+    /**
+     * @return Returns the totalResults.
+     */
+    public int getTotalResults() {
+        return totalResults;
+    }
+
+    /**
+     * @param totalResults The totalResults to set.
+     */
+    public void setTotalResults(int totalResults) {
+        this.totalResults = totalResults;
+    }
+
+    /* (non-Javadoc)
+     * @see com.sun.syndication.feed.CopyFrom#copyFrom(java.lang.Object)
+     */
+    public void copyFrom(CopyFrom obj) {
+        OpenSearchModule osm = (OpenSearchModuleImpl) obj;
+
+        setTotalResults(osm.getTotalResults());
+        setItemsPerPage(osm.getItemsPerPage());
+        setStartIndex(osm.getStartIndex());
+        setLink(osm.getLink());
+
+        // setQueries(osm.getQueries());
+    }
+
+    /* (non-Javadoc)
+     * @see com.sun.syndication.feed.CopyFrom#getInterface()
+     */
+    public Class getInterface() {
+        // TODO Auto-generated method stub
+        return OpenSearchModule.class;
+    }
+}

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/opensearch/impl/OpenSearchModuleParser.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/opensearch/impl/OpenSearchModuleParser.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/opensearch/impl/OpenSearchModuleParser.java
new file mode 100644
index 0000000..1485079
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/opensearch/impl/OpenSearchModuleParser.java
@@ -0,0 +1,240 @@
+/*
+ * 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 org.rometools.feed.module.opensearch.impl;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.jdom2.Attribute;
+import org.jdom2.Element;
+import org.jdom2.Namespace;
+import org.jdom2.Parent;
+
+import com.sun.syndication.feed.atom.Link;
+import com.sun.syndication.feed.module.Module;
+import org.rometools.feed.module.opensearch.OpenSearchModule;
+import org.rometools.feed.module.opensearch.entity.OSQuery;
+import com.sun.syndication.io.ModuleParser;
+
+/**
+ * @author Michael W. Nassif (enrouteinc@gmail.com)
+ * OpenSearch implementation of the ModuleParser class
+ */
+public class OpenSearchModuleParser implements ModuleParser{
+	
+	private static final Namespace OS_NS  = Namespace.getNamespace("opensearch", OpenSearchModule.URI);
+	
+	public String getNamespaceUri() {
+        return OpenSearchModule.URI;
+	}
+
+	public Module parse(Element dcRoot) {
+    	
+		URL baseURI = findBaseURI(dcRoot);
+		
+    	boolean foundSomething = false;
+        OpenSearchModule osm = new OpenSearchModuleImpl();
+
+        Element e = dcRoot.getChild("totalResults", OS_NS);
+        
+        if (e != null) {
+            
+        	foundSomething = true;
+            
+            try{
+            	osm.setTotalResults(Integer.parseInt(e.getText()));
+            } catch(NumberFormatException ex){
+            	// Ignore setting the field and post a warning
+            	System.err.println("Warning: The element totalResults must be an integer value: " + ex.getMessage());
+            }
+        }
+        
+        e = dcRoot.getChild("itemsPerPage", OS_NS);
+        
+        try{
+        	osm.setItemsPerPage(Integer.parseInt(e.getText()));
+        } catch(NumberFormatException ex){
+        	// Ignore setting the field and post a warning
+        	System.err.println("Warning: The element itemsPerPage must be an integer value: " + ex.getMessage());
+        }
+        
+        e = dcRoot.getChild("startIndex", OS_NS);
+        
+        try{
+        	osm.setStartIndex(Integer.parseInt(e.getText()));
+        } catch(NumberFormatException ex){
+        	// Ignore setting the field and post a warning
+        	System.err.println("Warning: The element startIndex must be an integer value: " + ex.getMessage());
+        }
+        
+        List queries = dcRoot.getChildren("Query", OS_NS);
+        
+        if(queries != null && queries.size() > 0){
+        	
+        	// Create the OSQuery list 
+        	List osqList = new LinkedList();
+        	
+        	for (Iterator iter = queries.iterator(); iter.hasNext();) {
+				e = (Element) iter.next();
+				osqList.add(parseQuery(e));
+			}
+        
+            osm.setQueries(osqList);
+        }
+        
+        e = dcRoot.getChild("link", OS_NS);
+        
+        if(e != null){
+        	osm.setLink(parseLink(e, baseURI));
+        }
+        
+        return (foundSomething) ? osm : null;
+    }
+	
+	private static OSQuery parseQuery(Element e){
+		
+		OSQuery query = new OSQuery();
+		
+        String att = e.getAttributeValue("role");
+        query.setRole(att);
+        
+        att = e.getAttributeValue("osd");
+		query.setOsd(att);
+        
+        att = e.getAttributeValue("searchTerms");
+		query.setSearchTerms(att);
+            
+        att = e.getAttributeValue("title");
+		query.setTitle(att);
+        
+		try{
+
+			// someones mistake should not cause the parser to fail, since these are only optional attributes
+			
+			att = e.getAttributeValue("totalResults");
+	        if(att != null){
+	        	query.setTotalResults(Integer.parseInt(att));
+	        }
+	        
+	        att = e.getAttributeValue("startPage");
+			if(att != null){
+	            query.setStartPage(Integer.parseInt(att));
+			}
+			
+		} catch(NumberFormatException ex){
+			System.err.println("Warning: Exception caught while trying to parse a non-numeric Query attribute " + ex.getMessage());
+		}
+		
+		return query;
+	}
+	
+    private static Link parseLink(Element e, URL baseURI) {
+    	
+    	Link link = new Link();
+    	
+    	String att = e.getAttributeValue("rel");//getAtomNamespace()); DONT KNOW WHY DOESN'T WORK
+    	
+        if (att!=null) {
+            link.setRel(att);
+        }
+        
+        att = e.getAttributeValue("type");//getAtomNamespace()); DONT KNOW WHY DOESN'T WORK
+        
+        if (att!=null) {
+            link.setType(att);
+        }
+        
+        att = e.getAttributeValue("href");//getAtomNamespace()); DONT KNOW WHY DOESN'T WORK
+        
+        if (att!=null) {
+        	
+            if (isRelativeURI(att)) { //
+                link.setHref(resolveURI(baseURI, e, ""));
+            } else {
+                link.setHref(att);
+            }
+        }
+        
+        att = e.getAttributeValue("hreflang");//getAtomNamespace()); DONT KNOW WHY DOESN'T WORK
+        
+        if (att!=null) {
+            link.setHreflang(att);
+        }
+        
+        att = e.getAttributeValue("length");//getAtomNamespace()); DONT KNOW WHY DOESN'T WORK
+        
+        return link;
+    }
+	
+	private static boolean isRelativeURI(String uri) {
+        if (  uri.startsWith("http://")
+           || uri.startsWith("https://")
+           || uri.startsWith("/")) {
+            return false;
+        }
+        return true;
+    }
+	
+    /** Use xml:base attributes at feed and entry level to resolve relative links */
+    private static String resolveURI(URL baseURI, Parent parent, String url) {
+        url = (url.equals(".") || url.equals("./")) ? "" : url;
+        if (isRelativeURI(url) && parent != null && parent instanceof Element) {
+            Attribute baseAtt = ((Element)parent).getAttribute("base", Namespace.XML_NAMESPACE);
+            String xmlBase = (baseAtt == null) ? "" : baseAtt.getValue();
+            if (!isRelativeURI(xmlBase) && !xmlBase.endsWith("/")) {
+                xmlBase = xmlBase.substring(0, xmlBase.lastIndexOf("/")+1);
+            }
+            return resolveURI(baseURI, parent.getParent(), xmlBase + url);
+        } else if (isRelativeURI(url) && parent == null) {
+            return baseURI + url;
+        } else if (baseURI != null && url.startsWith("/")) {
+            String hostURI = baseURI.getProtocol() + "://" + baseURI.getHost();
+            if (baseURI.getPort() != baseURI.getDefaultPort()) {
+                hostURI = hostURI + ":" + baseURI.getPort();
+            }
+            return hostURI + url;
+        }
+        return url;
+    }
+	
+    /** Use feed links and/or xml:base attribute to determine baseURI of feed */
+    private static URL findBaseURI(Element root) {
+        URL baseURI = null;
+        List linksList = root.getChildren("link", OS_NS);
+        if (linksList != null) {
+            for (Iterator links = linksList.iterator(); links.hasNext(); ) {
+                Element link = (Element)links.next();
+                if (!root.equals(link.getParent())) break;
+                String href = link.getAttribute("href").getValue();
+                if (   link.getAttribute("rel", OS_NS) == null
+                    || link.getAttribute("rel", OS_NS).getValue().equals("alternate")) {
+                    href = resolveURI(null, link, href);
+                    try {
+                        baseURI = new URL(href);
+                        break;
+                    } catch (MalformedURLException e) {
+                        System.err.println("Base URI is malformed: " + href);
+                    }
+                }
+            }
+        }
+        return baseURI;
+    } 
+}
+

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/photocast/PhotocastModule.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/PhotocastModule.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/PhotocastModule.java
new file mode 100644
index 0000000..cd5d8e8
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/PhotocastModule.java
@@ -0,0 +1,122 @@
+/*
+ * PhotocastModule.java
+ *
+ * Created on March 30, 2006, 6:27 PM
+ *
+ * This library is provided under dual licenses.
+ * You may choose the terms of the Lesser General Public License or the Apache
+ * License at your discretion.
+ *
+ *  Copyright (C) 2006  Robert Cooper, Temple of the Screaming Penguin
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ * 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 org.rometools.feed.module.photocast;
+
+import com.sun.syndication.feed.module.Module;
+import org.rometools.feed.module.photocast.types.Metadata;
+
+import java.net.URL;
+
+import java.util.Date;
+
+
+/**
+ * This is a ROME module that provides support for the 
+ * "http://www.apple.com/ilife/wallpapers" namespace.
+ * 
+ * See the package information for example usage.
+ * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
+ */
+public interface PhotocastModule extends Module {
+    /**
+     * The URI of the namespace. ("http://www.apple.com/ilife/wallpapers")
+     */
+    public static final String URI = "http://www.apple.com/ilife/wallpapers";
+
+    /**
+     * Returns the Item level photoDate value.
+     * @return Returns the Item level photoDate value. 
+     */
+    public Date getPhotoDate();
+
+    /**
+     * Set the Item level photoDate value.
+     * @param photoDate Item level photoDate value
+     */
+    public void setPhotoDate(Date photoDate);
+
+    /**
+     * Returns the cropDate value from the item level.
+     * @return Item level cropDate value
+     */
+    public Date getCropDate();
+
+    /**
+     * Sets the cropDate value for the item level.
+     * @param cropDate cropDate value for the item level
+     */
+    public void setCropDate(Date cropDate);
+
+    /**
+     * The URL of the image.
+     * @return The URL of the image.
+     */
+    public URL getImageUrl();
+
+    /**
+     * The URL of the image.
+     * @param imageUrl The URL of the image.
+     */
+    public void setImageUrl(URL imageUrl);
+
+    /**
+     * The URL of the image thumbnail.
+     * @return The URL of the image thumbnail.
+     */
+    public URL getThumbnailUrl();
+
+    /**
+     * The URL of the image thumbnail.
+     * @param thumbnailUrl The URL of the image thumbnail.
+     */
+    public void setThumbnailUrl(URL thumbnailUrl);
+
+    /**
+     * The iPhoto metadata for the image.
+     * @return The iPhoto metadata for the image.
+     */
+    public Metadata getMetadata();
+
+    /**
+     * The iPhoto metadata for the image.
+     * @param metadata The iPhoto metadata for the image.
+     */
+    public void setMetadata(Metadata metadata);
+}

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/photocast/PhotocastModuleImpl.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/PhotocastModuleImpl.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/PhotocastModuleImpl.java
new file mode 100644
index 0000000..98c8ce3
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/PhotocastModuleImpl.java
@@ -0,0 +1,163 @@
+
+
+/*
+ * PhotocastModuleImpl.java
+ *
+ * Created on March 30, 2006, 6:23 PM
+ *
+  *
+ * This library is provided under dual licenses.
+ * You may choose the terms of the Lesser General Public License or the Apache
+ * License at your discretion.
+ *
+ *  Copyright (C) 2006  Robert Cooper, Temple of the Screaming Penguin
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ * 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 org.rometools.feed.module.photocast;
+
+import com.sun.syndication.feed.CopyFrom;
+import com.sun.syndication.feed.impl.EqualsBean;
+import com.sun.syndication.feed.impl.ToStringBean;
+import org.rometools.feed.module.photocast.types.Metadata;
+
+import java.net.URL;
+
+import java.util.Date;
+
+/**
+ *
+ * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
+ */
+public class PhotocastModuleImpl implements PhotocastModule {
+    private Date photoDate;
+    private Date cropDate;
+    private URL imageUrl;
+    private URL thumbnailUrl;
+    private Metadata metadata;
+
+    /** Creates a new instance of PhotocastModuleImpl */
+    public PhotocastModuleImpl() {
+    }
+
+    public Date getPhotoDate() {
+        return photoDate;
+    }
+
+    public void setPhotoDate(Date photoDate) {
+        this.photoDate = photoDate;
+    }
+
+    public Date getCropDate() {
+        return cropDate;
+    }
+
+    public void setCropDate(Date cropDate) {
+        this.cropDate = cropDate;
+    }
+
+    public URL getImageUrl() {
+        return imageUrl;
+    }
+
+    public void setImageUrl(URL imageUrl) {
+        this.imageUrl = imageUrl;
+    }
+
+    public URL getThumbnailUrl() {
+        return thumbnailUrl;
+    }
+
+    public void setThumbnailUrl(URL thumbnailUrl) {
+        this.thumbnailUrl = thumbnailUrl;
+    }
+
+    public Metadata getMetadata() {
+        return metadata;
+    }
+
+    public void setMetadata(Metadata metadata) {
+        this.metadata = metadata;
+    }
+
+    public void copyFrom(CopyFrom obj) {
+        PhotocastModule pm = (PhotocastModule) obj;
+        this.setPhotoDate((pm.getPhotoDate() == null) ? null
+                                                      : (Date) pm.getPhotoDate()
+                                                                 .clone());
+        this.setCropDate((pm.getCropDate() == null) ? null
+                                                    : (Date) pm.getCropDate()
+                                                               .clone());
+        this.setImageUrl(pm.getImageUrl());
+        this.setThumbnailUrl(pm.getThumbnailUrl());
+        this.setMetadata(pm.getMetadata());
+    }
+
+    public Object clone() {
+        PhotocastModuleImpl pm = new PhotocastModuleImpl();
+        pm.setPhotoDate((this.getPhotoDate() == null) ? null
+                                                      : (Date) this.getPhotoDate()
+                                                                   .clone());
+        pm.setCropDate((this.getCropDate() == null) ? null
+                                                    : (Date) this.getCropDate()
+                                                                 .clone());
+        pm.setImageUrl(this.getThumbnailUrl());
+        pm.setThumbnailUrl(this.getThumbnailUrl());
+        pm.setMetadata(this.getMetadata());
+
+        return pm;
+    }
+
+    public String getUri() {
+        return PhotocastModule.URI;
+    }
+
+    public Class getInterface() {
+        return PhotocastModule.class;
+    }
+
+    public String toString() {
+        ToStringBean tsBean = new ToStringBean(PhotocastModuleImpl.class, this);
+
+        return tsBean.toString();
+    }
+
+    public boolean equals(Object obj) {
+        EqualsBean eBean = new EqualsBean(PhotocastModuleImpl.class, this);
+
+        return eBean.beanEquals(obj);
+    }
+
+    public int hashCode() {
+        EqualsBean equals = new EqualsBean(PhotocastModuleImpl.class, this);
+
+        return equals.beanHashCode();
+    }
+}

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/photocast/io/Generator.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/io/Generator.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/io/Generator.java
new file mode 100644
index 0000000..d32b517
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/io/Generator.java
@@ -0,0 +1,105 @@
+/*
+ * Generator.java
+ *
+ * Created on March 30, 2006, 6:43 PM
+ *
+  *
+ * This library is provided under dual licenses.
+ * You may choose the terms of the Lesser General Public License or the Apache
+ * License at your discretion.
+ *
+ *  Copyright (C) 2006  Robert Cooper, Temple of the Screaming Penguin
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ * 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 org.rometools.feed.module.photocast.io;
+
+import com.sun.syndication.feed.module.Module;
+import org.rometools.feed.module.photocast.PhotocastModule;
+import com.sun.syndication.io.ModuleGenerator;
+import java.util.HashSet;
+import java.util.Set;
+import org.jdom2.Element;
+import org.jdom2.Namespace;
+
+/**
+ *
+ * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
+ */
+public class Generator implements ModuleGenerator {
+    
+    private static final Namespace NS = Namespace.getNamespace( "apple-wallpapers", PhotocastModule.URI );
+    private static final HashSet NAMESPACES = new HashSet();
+    private static final String FEED_VERSION = "0.9";
+    static{
+        NAMESPACES.add( NS );
+    }
+    /** Creates a new instance of Generator */
+    public Generator() {
+        super();
+    }
+
+    public void generate(Module module, Element element) {
+        if( !(module instanceof PhotocastModule ) )
+            return;
+        PhotocastModule pm = (PhotocastModule) module;
+        if( element.getName().equals("channel") || element.getName().equals("feed") ){
+            element.addContent( generateSimpleElement( "feedVersion", FEED_VERSION) );
+            return;
+        }
+        element.addContent( generateSimpleElement("photoDate", Parser.PHOTO_DATE_FORMAT.format(pm.getPhotoDate())));
+        element.addContent( generateSimpleElement("cropDate", Parser.CROP_DATE_FORMAT.format( pm.getCropDate() )));
+        element.addContent( generateSimpleElement("thumbnail", pm.getThumbnailUrl().toString() ) );
+        element.addContent( generateSimpleElement("image", pm.getImageUrl().toString() ) );
+        Element e = new Element( "metadata", NS );
+        Element pd = new Element( "PhotoDate", "" );
+        pd.addContent( pm.getMetadata().getPhotoDate().toString() );
+        e.addContent( pd );
+        Element com = new Element("Comments", "");
+        com.addContent( pm.getMetadata().getComments() );
+        e.addContent( com );
+        element.addContent(e);
+    }
+
+    public Set getNamespaces() {
+        return Generator.NAMESPACES;
+    }
+
+    public String getNamespaceUri() {
+        return PhotocastModule.URI;
+    }
+    protected Element generateSimpleElement(String name, String value) {
+        Element element = new Element(name, NS);
+        element.addContent(value);
+
+        return element;
+    }
+   
+}

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/photocast/io/Parser.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/io/Parser.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/io/Parser.java
new file mode 100644
index 0000000..14580cc
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/io/Parser.java
@@ -0,0 +1,135 @@
+/*
+ * Parser.java
+ *
+ * Created on March 30, 2006, 6:43 PM
+ *
+  *
+ * This library is provided under dual licenses.
+ * You may choose the terms of the Lesser General Public License or the Apache
+ * License at your discretion.
+ *
+ *  Copyright (C) 2006  Robert Cooper, Temple of the Screaming Penguin
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ * 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 org.rometools.feed.module.photocast.io;
+
+import com.sun.syndication.feed.module.Module;
+import org.rometools.feed.module.photocast.PhotocastModule;
+import org.rometools.feed.module.photocast.PhotocastModuleImpl;
+import org.rometools.feed.module.photocast.types.Metadata;
+import org.rometools.feed.module.photocast.types.PhotoDate;
+import com.sun.syndication.io.ModuleParser;
+import java.net.URL;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Iterator;
+import java.util.List;
+import java.util.logging.Logger;
+import org.jdom2.Element;
+import org.jdom2.Namespace;
+
+/**
+ *
+ * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
+ */
+public class Parser implements ModuleParser {
+    private static final Logger LOG = Logger.getAnonymousLogger();
+    
+    private static final Namespace NS = Namespace.getNamespace( PhotocastModule.URI );
+    //2005-11-29T04:36:06
+    static final DateFormat PHOTO_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
+    //2006-01-11 16:42:26 -0800
+    static final DateFormat CROP_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z");
+    
+    /** Creates a new instance of Parser */
+    public Parser() {
+    }
+
+    public Module parse(Element element) {
+        if( element.getName().equals("channel") || element.getName().equals("feed") ){
+            return new PhotocastModuleImpl();
+        } else if( element.getChild( "metadata", Parser.NS ) == null && element.getChild( "image", Parser.NS ) == null )
+            return null;
+        PhotocastModule pm = new PhotocastModuleImpl();
+        List children = element.getChildren();
+        Iterator it = children.iterator();
+        while( it.hasNext() ){
+            Element e = (Element) it.next();
+            if( !e.getNamespace().equals( Parser.NS ) )
+                continue;
+            if( e.getName().equals("photoDate") ){
+                try{
+                    pm.setPhotoDate( Parser.PHOTO_DATE_FORMAT.parse( e.getText() ) );
+                } catch( Exception ex ){
+                    LOG.warning( "Unable to parse photoDate: "+ e.getText() + " "+ ex.toString());
+                }
+            } else if( e.getName().equals("cropDate") ) {
+                try{
+                    pm.setCropDate( Parser.CROP_DATE_FORMAT.parse( e.getText() ) );
+                } catch( Exception ex ){
+                    LOG.warning( "Unable to parse cropDate: "+ e.getText() + " "+ ex.toString());
+                }
+            } else if( e.getName().equals("thumbnail") ) {
+                try{
+                    pm.setThumbnailUrl( new URL( e.getText() ) );
+                } catch( Exception ex ){
+                    LOG.warning( "Unable to parse thumnail: "+ e.getText() + " "+ ex.toString());
+                }
+            } else if( e.getName().equals("image") ) {
+                try{
+                    pm.setImageUrl( new URL( e.getText() ) );
+                } catch( Exception ex ){
+                    LOG.warning( "Unable to parse image: "+ e.getText() + " "+ ex.toString());
+                }
+            } else if( e.getName().equals("metadata") ) {
+                String comments = "";
+                PhotoDate photoDate = null;
+                if( e.getChildText( "PhotoDate") != null ){
+                    try{
+                        photoDate = new PhotoDate( Double.parseDouble( e.getChildText("PhotoDate")));
+                    } catch( Exception ex ){
+                        LOG.warning( "Unable to parse PhotoDate: "+ e.getText() + " "+ ex.toString());
+                    }
+                }
+                if( e.getChildText("Comments") != null ){
+                    comments = e.getChildText("Comments");
+                }
+                pm.setMetadata( new Metadata( photoDate, comments) );
+            }
+        }
+        return pm;
+    }
+
+    public String getNamespaceUri() {
+        return PhotocastModule.URI;
+    }
+    
+}

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/photocast/io/package.html
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/io/package.html b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/io/package.html
new file mode 100644
index 0000000..c6cdda4
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/io/package.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+  <head>
+    <title></title>
+  </head>
+  <body>
+   This package contains the parser and generator implementations for ROME.
+  </body>
+</html>

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/photocast/package.html
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/package.html b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/package.html
new file mode 100644
index 0000000..d619ccc
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/package.html
@@ -0,0 +1,69 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+  <head>
+    <title></title>
+  </head>
+  <body>
+  This package represents the Apple iPhoto Photocasting 0.9 namespace support.
+  Sample Usage:
+<xmp>
+        SyndFeed feed = input.build(  new File( "/foo.rss" ) ) );
+        List entries = feed.getEntries();
+        for( int i =0; i < entries.size() ; i++ ){
+            System.out.println( ((SyndEntry)entries.get(i)).getModule( PhotocastModule.URI ) );
+        }
+        
+        // or to create a photocast module:
+        
+        SyndFeed myFeed = new SyndFeedImpl();
+        myFeed.getModules().add( new PhotocastModuleImpl() ); 
+        // you need this as a placeholder so the version gets in the feed.
+        
+        SyndEntry myEntry = new SyndEntryImpl();
+        PhotocastModule pm = new PhotocastModuleImpl();
+        pm.setUrl( new URL("http://foo.com/img.jpg" ) );
+        pm.setThumnail( new URL("http://foo.com/img-small.jpg" ) );
+        pm.setCropDate( new Date() );
+        pm.setPhotoDate( new Date() );
+        pm.setMetaData( new PhotoDate(), "Some comments that I think always get ignored." );
+        myEntry.getModules().add( pm );
+</xmp>
+<pre>
+ * This library is provided under dual licenses.
+ * You may choose the terms of the Lesser General Public License or the Apache
+ * License at your discretion.
+ *
+ *  Copyright (C) 2006  Robert Cooper, Temple of the Screaming Penguin
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ * 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.
+</pre>
+  
+  </body>
+</html>

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/photocast/types/Metadata.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/types/Metadata.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/types/Metadata.java
new file mode 100644
index 0000000..0542e97
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/types/Metadata.java
@@ -0,0 +1,103 @@
+/*
+ * Metadata.java
+ *
+ * Created on March 30, 2006, 6:16 PM
+ *
+  *
+ * This library is provided under dual licenses.
+ * You may choose the terms of the Lesser General Public License or the Apache
+ * License at your discretion.
+ *
+ *  Copyright (C) 2006  Robert Cooper, Temple of the Screaming Penguin
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ * 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 org.rometools.feed.module.photocast.types;
+
+import com.sun.syndication.feed.impl.EqualsBean;
+import com.sun.syndication.feed.impl.ToStringBean;
+
+/**
+ * This is an immutable class representing
+ * the apple-wallpapers:metadata tag in the photocast module.
+ * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
+ */
+public class Metadata {
+    
+    private PhotoDate photoDate;
+    private String comments;
+    
+    /**
+     * Creates a new instance of Metadata with a set photoDate and comments value.
+     * @param photoDate PhotoDate value to use
+     * @param comments comments about this photo.
+     */
+    public Metadata(PhotoDate photoDate, String comments) {
+        this.photoDate = photoDate == null ? new PhotoDate() : photoDate;
+        this.comments = comments == null ? "" : comments;        
+    }
+
+    /**
+     * Returns the PhotoDate value.
+     * @return Returns the PhotoDate value.
+     */
+    public PhotoDate getPhotoDate() {
+        return photoDate;
+    }
+
+    /**
+     * Returns comments about the photo.
+     * @return Returns comments about the photo.
+     */
+    public String getComments() {
+        return comments;
+    }
+    /**
+     * Returns a String representation of the metadata object.
+     * @return Returns a String representation of the metadata object.
+     */
+    public String toString() {
+        ToStringBean tsBean = new ToStringBean(Metadata.class, this);
+
+        return tsBean.toString();
+    }
+
+    public boolean equals(Object obj) {
+        EqualsBean eBean = new EqualsBean(Metadata.class, this);
+
+        return eBean.beanEquals(obj);
+    }
+
+    public int hashCode() {
+        EqualsBean equals = new EqualsBean(Metadata.class, this);
+
+        return equals.beanHashCode();
+    }
+}

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/photocast/types/PhotoDate.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/types/PhotoDate.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/types/PhotoDate.java
new file mode 100644
index 0000000..51b3773
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/types/PhotoDate.java
@@ -0,0 +1,104 @@
+/*
+ * PhotoDate.java
+ *
+ * Created on March 30, 2006, 5:53 PM
+ *
+  *
+ * This library is provided under dual licenses.
+ * You may choose the terms of the Lesser General Public License or the Apache
+ * License at your discretion.
+ *
+ *  Copyright (C) 2006  Robert Cooper, Temple of the Screaming Penguin
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ * 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 org.rometools.feed.module.photocast.types;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * This is a specialized Date class for working with the apple PhotoDate format.
+ * It provides a constructor taking a dobule value representing the fractional 
+ * number of days since 00:00:00 01/01/00.
+ * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
+ */
+public class PhotoDate extends Date{
+    
+    private static final long Y2K =  946616400531l;
+    private static final double DAY = 24 * 60 * 60 * 1000;
+    /** Creates a new instance of PhotoDate */
+    public PhotoDate() {
+        super();
+    }
+    
+    /**
+     * Creates a new instance of PhotoDate with the timestamp provided.
+     * @param time milliseconds time
+     */
+    public PhotoDate( long time ){
+        super( time );
+    }
+    
+    /**
+     * Creates a new instance of PhotoDate with the fractional 
+     * number of days since 00:00:00 01/01/00.
+     * @param photoDateValue fractional number of days since 00:00:00 01/01/00
+     */
+    public PhotoDate( double photoDateValue ){
+        BigDecimal d = new BigDecimal(photoDateValue);
+        d = d.multiply( new BigDecimal( DAY ) );
+        d = d.add( new BigDecimal( Y2K) );
+        this.setTime( d.longValue() );
+    }
+    
+    /**
+     * Returns a string representing the fractional 
+     * number of days since 00:00:00 01/01/00.
+     * @return Returns a string representing the fractional 
+     * number of days since 00:00:00 01/01/00.
+     */
+    public String toString(){
+        BigDecimal d = new BigDecimal( this.getTime() );  
+        d = d.subtract( new BigDecimal( Y2K) );     
+        d = d.multiply( new BigDecimal( 1000000 ) );
+        d = d.divide( new BigDecimal(DAY) , BigDecimal.ROUND_HALF_UP);
+        return d.divide( new BigDecimal(1000000), 7, BigDecimal.ROUND_HALF_UP).toString();
+    }
+    
+    public boolean equals( Object o ){
+        if( o instanceof Date || ((Date)o).getTime()/1000 == this.getTime()/1000 )
+            return true;
+        else
+            return false;
+    }
+   
+    
+}

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/photocast/types/package.html
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/types/package.html b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/types/package.html
new file mode 100644
index 0000000..25f3091
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/photocast/types/package.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+  <head>
+    <title></title>
+  </head>
+  <body>
+  This package contains datatypes for use with the photocast module.
+  </body>
+</html>

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/portablecontacts/ContactModule.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/portablecontacts/ContactModule.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/portablecontacts/ContactModule.java
new file mode 100644
index 0000000..934f6c9
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/portablecontacts/ContactModule.java
@@ -0,0 +1,26 @@
+/*
+ *  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.portablecontacts;
+
+/**
+ *
+ * @author robert.cooper
+ */
+public interface ContactModule {
+
+}

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/portablecontacts/package.html
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/portablecontacts/package.html b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/portablecontacts/package.html
new file mode 100644
index 0000000..7eaef28
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/portablecontacts/package.html
@@ -0,0 +1,3 @@
+<html><body>
+http://portablecontacts.net/draft-spec.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/portablecontacts/types/Address.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/portablecontacts/types/Address.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/portablecontacts/types/Address.java
new file mode 100644
index 0000000..2ee2b90
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/portablecontacts/types/Address.java
@@ -0,0 +1,26 @@
+/*
+ *  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.portablecontacts.types;
+
+/**
+ *
+ * @author robert.cooper
+ */
+public class Address {
+
+}

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/slash/Slash.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/slash/Slash.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/slash/Slash.java
new file mode 100644
index 0000000..3b1e545
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/slash/Slash.java
@@ -0,0 +1,70 @@
+/*
+ * Slash.java
+ *
+ * Created on November 19, 2005, 8:48 PM
+ *
+ * This library is provided under dual licenses.
+ * You may choose the terms of the Lesser General Public License or the Apache
+ * License at your discretion.
+ *
+ *  Copyright (C) 2005  Robert Cooper, Temple of the Screaming Penguin
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ * 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 org.rometools.feed.module.slash;
+
+import com.sun.syndication.feed.module.Module;
+import java.io.Serializable;
+
+/** This interface represents the Slash RSS extension.
+ * @version $Revision: 1.2 $
+ * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
+ */
+public interface Slash extends Module, Serializable {
+    
+    public static final String URI = "http://purl.org/rss/1.0/modules/slash/";
+    
+    public String getSection();
+    
+    public void setSection(String section);
+    
+    public String getDepartment();
+    
+    public void setDepartment(String department);
+    
+    public Integer getComments();
+    
+    public void setComments(Integer comments );
+    
+    public Integer[] getHitParade();
+    
+    public void setHitParade( Integer[] hitParade );
+    
+}

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/slash/SlashImpl.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/slash/SlashImpl.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/slash/SlashImpl.java
new file mode 100644
index 0000000..916669f
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/slash/SlashImpl.java
@@ -0,0 +1,139 @@
+/*
+ * SlashImpl.java
+ *
+ * Created on November 19, 2005, 8:53 PM
+ *
+ * 
+ * This library is provided under dual licenses.
+ * You may choose the terms of the Lesser General Public License or the Apache
+ * License at your discretion.
+ *
+ *  Copyright (C) 2005  Robert Cooper, Temple of the Screaming Penguin
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ * 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 org.rometools.feed.module.slash;
+import com.sun.syndication.feed.CopyFrom;
+import com.sun.syndication.feed.impl.EqualsBean;
+
+/**
+ * @version $Revision: 1.2 $
+ * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
+ */
+public class SlashImpl implements Slash {
+    
+    private String section;
+    
+    private String department;
+    
+    private Integer comments;
+    
+    private Integer[] hitParade;
+    
+    /** Creates a new instance of SlashImpl */
+    public SlashImpl() {
+    }
+
+    public String getSection() {
+        return section;
+    }
+
+    public void setSection(String section) {
+        this.section = section;
+    }
+
+    public String getDepartment() {
+        return department;
+    }
+
+    public void setDepartment(String department) {
+        this.department = department;
+    }
+
+    public Integer getComments() {
+        return comments;
+    }
+
+    public void setComments(Integer comments) {
+        this.comments = comments;
+    }
+
+    public Integer[] getHitParade() {
+        return hitParade == null ? new Integer[0] : hitParade;
+    }
+
+    public void setHitParade(Integer[] hitParade) {
+        this.hitParade = hitParade;
+    }
+
+
+    
+    public void copyFrom(CopyFrom object) {
+	Slash source =(Slash) object;
+	this.setHitParade( arrayCopy( source.getHitParade() ));
+	this.setComments( source.getComments() );
+	this.setDepartment( source.getDepartment() );
+	this.setSection( source.getSection() );	
+    }
+
+    public Object clone() {
+	SlashImpl si = new SlashImpl();
+	si.copyFrom( this );
+	return si;
+    }
+
+    public String getUri() {
+	return Slash.URI;
+    }
+    
+    
+    private Integer[] arrayCopy(Integer[] source) {
+        if(source == null) {
+            return null;
+        }
+
+        Integer[] array = new Integer[ source.length ];
+        for(int i = 0; i < source.length; i++) {
+            array[i] = source[i];
+        }
+
+        return array;
+    }
+
+    public Class getInterface() {
+	return Slash.class;
+    }
+    
+   public boolean equals(Object obj) {
+        EqualsBean eBean = new EqualsBean(this.getClass(),this);
+
+        return eBean.beanEquals(obj);
+    }
+}

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/slash/io/SlashModuleGenerator.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/slash/io/SlashModuleGenerator.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/slash/io/SlashModuleGenerator.java
new file mode 100644
index 0000000..73cdb04
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/slash/io/SlashModuleGenerator.java
@@ -0,0 +1,103 @@
+/*
+ * SlashModuleGenerator.java
+ *
+ * Created on November 19, 2005, 9:07 PM
+ *
+ * This library is provided under dual licenses.
+ * You may choose the terms of the Lesser General Public License or the Apache
+ * License at your discretion.
+ *
+ *  Copyright (C) 2005  Robert Cooper, Temple of the Screaming Penguin
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ * 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 org.rometools.feed.module.slash.io;
+
+import com.sun.syndication.feed.module.Module;
+import com.sun.syndication.io.ModuleGenerator;
+import org.rometools.feed.module.slash.Slash;
+import java.util.HashSet;
+import org.jdom2.Element;
+import org.jdom2.Namespace;
+
+/** The ModuleGenerator implementation for the Slash plug in.
+ * @version $Revision: 1.1 $
+ * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
+ */
+public class SlashModuleGenerator implements ModuleGenerator {
+    
+    private static final Namespace NS = Namespace.getNamespace("slash", Slash.URI);
+    
+    /** Creates a new instance of SlashModuleGenerator */
+    public SlashModuleGenerator() {
+    }
+    
+    public void generate(Module module, Element element) {
+	if( !( module instanceof Slash) )
+	    return;
+	Slash slash = (Slash) module;
+	if(slash.getComments() != null ){
+	    element.addContent( this.generateSimpleElement("comments", slash.getComments().toString()));	    
+	}
+	if(slash.getDepartment() != null){
+	    element.addContent( this.generateSimpleElement("department", slash.getDepartment()));	    
+	}
+	if(slash.getSection() != null){
+	    element.addContent( this.generateSimpleElement("section", slash.getSection()));	    
+	}
+	if(slash.getHitParade() != null && slash.getHitParade().length > 0 ){
+	    StringBuffer buff = new StringBuffer();
+	    Integer[] p = slash.getHitParade();
+	    for(int i=0; i < p.length; i++){
+		if(i!= 0)
+		    buff.append(",");
+		buff.append( p[i] );
+	    }
+	    element.addContent(this.generateSimpleElement("hit_parade", buff.toString()));
+	}
+	
+    }
+    
+    protected Element generateSimpleElement(String name,String value) {
+	Element element = new Element(name,SlashModuleGenerator.NS);
+	element.addContent(value);	
+	return element;
+    }
+    public java.util.Set getNamespaces() {
+	HashSet set = new HashSet();
+	set.add( SlashModuleGenerator.NS );
+	return set;
+    }
+    
+    public String getNamespaceUri() {
+	return Slash.URI;
+    }
+    
+}

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/slash/io/SlashModuleParser.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/slash/io/SlashModuleParser.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/slash/io/SlashModuleParser.java
new file mode 100644
index 0000000..8d7646d
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/slash/io/SlashModuleParser.java
@@ -0,0 +1,103 @@
+/*
+ * SlashModuleParser.java
+ *
+ * Created on November 19, 2005, 9:19 PM
+ *
+ * This library is provided under dual licenses.
+ * You may choose the terms of the Lesser General Public License or the Apache
+ * License at your discretion.
+ *
+ *  Copyright (C) 2005  Robert Cooper, Temple of the Screaming Penguin
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ * 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 org.rometools.feed.module.slash.io;
+
+import com.sun.syndication.feed.module.Module;
+import com.sun.syndication.io.ModuleParser;
+import com.sun.syndication.io.WireFeedParser;
+import org.rometools.feed.module.slash.Slash;
+import org.rometools.feed.module.slash.SlashImpl;
+
+import java.util.StringTokenizer;
+import org.jdom2.Element;
+import org.jdom2.Namespace;
+
+/** ModuleParser implementation for Slash RSS.
+ * @version $Revision: 1.3 $
+ * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
+ */
+public class SlashModuleParser implements ModuleParser {
+    
+    private static final Namespace NS = Namespace.getNamespace( Slash.URI);
+    
+    /** Creates a new instance of SlashModuleParser */
+    public SlashModuleParser() {
+	super();
+    }
+
+    public String getNamespaceUri() {
+	return Slash.URI;
+    }
+
+    public Module parse(Element element) {
+	SlashImpl si = new SlashImpl();
+	Element tag = element.getChild( "hit_parade", SlashModuleParser.NS);
+	if( tag!= null ){
+	    StringTokenizer tok = new StringTokenizer( tag.getText() , ",");
+	    Integer[] hp = new Integer[tok.countTokens() ];
+	    for(int i=0; tok.hasMoreTokens(); i++ ){
+		hp[i] = new Integer( tok.nextToken() );
+	    }
+	    si.setHitParade( hp );
+	}
+	tag = null;
+	tag = element.getChild("comments", SlashModuleParser.NS);
+	if(tag != null ){
+	    si.setComments( new Integer( tag.getText() ));
+	}
+	tag = null;
+	tag = element.getChild("department", SlashModuleParser.NS);
+	if( tag != null ){
+	    si.setDepartment( tag.getText().trim() );
+	}
+	tag = null;
+	tag = element.getChild("section", SlashModuleParser.NS);
+	if( tag!= null ){
+	    si.setSection( tag.getText().trim());
+	}
+	if( si.getHitParade() != null || si.getComments() != null ||
+	    si.getDepartment() !=null || si.getSection() != null ){
+	    return si;
+	}
+	return null;
+    }
+    
+}

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/slash/io/package.html
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/slash/io/package.html b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/slash/io/package.html
new file mode 100644
index 0000000..4790779
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/slash/io/package.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+  <head>
+    <title></title>
+  </head>
+  <body>
+   This package contains the parser and generator for ROME.
+  <pre>
+ * This library is provided under dual licenses.
+ * You may choose the terms of the Lesser General Public License or the Apache
+ * License at your discretion.
+ *
+ *  Copyright (C) 2005  Robert Cooper, Temple of the Screaming Penguin
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ * 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.
+  </pre>
+  </body>
+</html>

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/slash/package.html
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/slash/package.html b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/slash/package.html
new file mode 100644
index 0000000..3ab4aad
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/slash/package.html
@@ -0,0 +1,68 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+  <head>
+    <title></title>
+  </head>
+  <body>
+  This package contains the core classes for the Slash plug in for ROME.
+  
+   <p>This package contains the core module interface <code>Slash</code>,
+    as well as the implementation class <code>SlashImpl</code>.</p>
+    <p>Sample Useage:
+    <pre>
+        
+        SyndEntry entry = new SyndEntryImpl();
+        // set up the entry...
+        Slash slash = new SlashImpl();
+        slash.setComments( new Integer( 12 ) );
+        slash.setDepartment( "look-another-rome-plugin" );
+        slash.setSection("code");
+        slash.setHitParade( new Integer[] { new Integer(12), new Integer(0) } );
+        List modules = new ArrayList();
+        modules.add( slash );
+        entry.setModules( modules );
+        
+        //Optionally, to get Slash information from a Feed:
+        Slash slash = entry.getModule( "http://purl.org/rss/1.0/modules/slash/" );
+        System.out.println( slash.getComments() );        
+        
+    </pre>
+    </p>
+  <pre>
+* This library is provided under dual licenses.
+ * You may choose the terms of the Lesser General Public License or the Apache
+ * License at your discretion.
+ *
+ *  Copyright (C) 2005  Robert Cooper, Temple of the Screaming Penguin
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *
+ * 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.      
+  </pre>
+  </body>
+</html>

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/sle/SimpleListExtension.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/sle/SimpleListExtension.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/sle/SimpleListExtension.java
new file mode 100644
index 0000000..b70dd98
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/sle/SimpleListExtension.java
@@ -0,0 +1,72 @@
+/*
+ * SimpleListExtension.java
+ *
+ * Created on April 27, 2006, 6:45 PM
+ *
+ * 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 org.rometools.feed.module.sle;
+
+import com.sun.syndication.feed.module.Module;
+import org.rometools.feed.module.sle.types.Group;
+import org.rometools.feed.module.sle.types.Sort;
+
+
+/** This is the primary module interface for the 
+ * <a href="http://msdn.microsoft.com/xml/rss/sle/">MS Simple List Extensions</a>.
+ *
+ * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
+ */
+public interface SimpleListExtension extends Module {
+    /**
+     * "http://www.microsoft.com/schemas/rss/core/2005"
+     */
+    public static final String URI = "http://www.microsoft.com/schemas/rss/core/2005";
+
+    /**
+     * The cf:group element is intended to inform the client that the property to which it refers is one that is “groupable” – that is, that the client should provide a user interface that allows the user to group or filter on the values of that property. Groupable properties should contain a small set of discrete values (e.g. book genres are perfect for groups).
+     * @param groupFields Array of types.Group objects.
+     */
+    public void setGroupFields(Group[] groupFields);
+
+    /**
+     * The cf:group element is intended to inform the client that the property to which it refers is one that is “groupable” – that is, that the client should provide a user interface that allows the user to group or filter on the values of that property. Groupable properties should contain a small set of discrete values (e.g. book genres are perfect for groups).
+     * @return Array of types.Group objects.
+     */
+    public Group[] getGroupFields();
+
+    /**
+     * The cf:sort element is intended to inform the client that the property to which it refers is one that is “sortable” – that is, that the client should provide a user interface that allows the user to sort on that property.
+     * @param sortFields Array of types.Sort objects
+     */
+    public void setSortFields(Sort[] sortFields);
+
+    /**
+     * The cf:sort element is intended to inform the client that the property to which it refers is one that is “sortable” – that is, that the client should provide a user interface that allows the user to sort on that property.
+     * @return Array of types.Sort objects
+     */
+    public Sort[] getSortFields();
+
+    /**
+     * This XML element allows the publisher of a feed document to indicate to the consumers of the feed that the feed is intended to be consumed as a list.
+     * (defaults to "list" )
+     * @param value treatAs value
+     */
+    public void setTreatAs(String value);
+
+    /**
+     * This XML element allows the publisher of a feed document to indicate to the consumers of the feed that the feed is intended to be consumed as a list.
+     * @return treatAs value.
+     */
+    public String getTreatAs();
+}

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/sle/SimpleListExtensionImpl.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/sle/SimpleListExtensionImpl.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/sle/SimpleListExtensionImpl.java
new file mode 100644
index 0000000..bb22956
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/sle/SimpleListExtensionImpl.java
@@ -0,0 +1,104 @@
+/*
+ * SimpleListExtensionImpl.java
+ *
+ * Created on April 27, 2006, 10:41 PM
+ *
+ * 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 org.rometools.feed.module.sle;
+
+import com.sun.syndication.feed.CopyFrom;
+import com.sun.syndication.feed.module.ModuleImpl;
+import org.rometools.feed.module.sle.types.Group;
+import org.rometools.feed.module.sle.types.Sort;
+
+
+/**
+ * 
+ * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
+ */
+public class SimpleListExtensionImpl extends ModuleImpl implements SimpleListExtension {
+    private String treatAs = "list";
+    private Group[] groupFields;
+    private Sort[] sortFields;
+
+    /** Creates a new instance of SimpleListExtensionImpl */
+    public SimpleListExtensionImpl() {
+        super(SimpleListExtensionImpl.class, SimpleListExtension.URI);
+    }
+
+    public void setGroupFields(Group[] groupFields) {
+        this.groupFields = groupFields;
+    }
+
+    public Group[] getGroupFields() {
+        return groupFields;
+    }
+
+    /**
+     * Returns the interface the copyFrom works on.
+     * <p>
+     * This is useful when dealing with properties that may have multiple implementations.
+     * For example, Module.
+     * <p>
+     *
+     * @return the interface the copyFrom works on.
+     */
+    public Class getInterface() {
+        return SimpleListExtension.class;
+    }
+
+    public void setSortFields(Sort[] sortFields) {
+        this.sortFields = sortFields;
+    }
+
+    public Sort[] getSortFields() {
+        return sortFields;
+    }
+
+    public void setTreatAs(String treatAs) {
+        this.treatAs = treatAs;
+    }
+
+    public String getTreatAs() {
+        return treatAs;
+    }
+
+    /**
+     * Returns the URI of the module.
+     * <p>
+     *
+     * @return URI of the module.
+     */
+    public String getUri() {
+        return SimpleListExtension.URI;
+    }
+
+    /**
+     * Copies all the properties of the given bean into this one.
+     * <p>
+     * Any existing properties in this bean are lost.
+     * <p>
+     * This method is useful for moving from one implementation of a bean interface to another.
+     * For example from the default SyndFeed bean implementation to a Hibernate ready implementation.
+     * <p>
+     *
+     * @param obj the instance to copy properties from.
+     */
+    public void copyFrom(CopyFrom obj) {
+        SimpleListExtension sle = (SimpleListExtension) obj;
+        this.setGroupFields((Group[]) sle.getGroupFields().clone());
+        this.setSortFields((Sort[]) sle.getSortFields().clone());
+        this.setTreatAs(sle.getTreatAs());
+    }
+}

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/sle/SleEntry.java
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/sle/SleEntry.java b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/sle/SleEntry.java
new file mode 100644
index 0000000..9604df3
--- /dev/null
+++ b/commons/marmotta-sesame-tools/marmotta-rio-rss/src/ext/java/org/rometools/feed/module/sle/SleEntry.java
@@ -0,0 +1,69 @@
+/*
+ * EntrySle.java
+ *
+ * Created on April 27, 2006, 7:13 PM
+ *
+ * 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 org.rometools.feed.module.sle;
+
+import com.sun.syndication.feed.module.Module;
+import org.rometools.feed.module.sle.io.*;
+import org.rometools.feed.module.sle.types.EntryValue;
+import org.rometools.feed.module.sle.types.Group;
+import org.rometools.feed.module.sle.types.Sort;
+
+
+/** This is a <b>parse only</b> module that holds the values of enternal fields declared in the SLE module.
+ * These will <b>not</b> be persisted on an output() call, <b>nor</b> will changing a value here change a
+ * value in another module or a foreign markup tag.
+ *
+ * @author <a href="mailto:cooper@screaming-penguin.com">Robert "kebernet" Cooper</a>
+ */
+public interface SleEntry extends Module {
+    /**
+     * A bogus namespace used for temporarily storing values during parsing.
+     */
+    public static final String URI = ModuleParser.TEMP.getURI();
+
+    /**
+     * Returns an EntryValue for the given element name.
+     * @param element element name to look for
+     * @return Returns an EntryValue for the given element name.
+     */
+    public EntryValue getGroupByElement(Group element);
+
+    /**
+     * An array of EntryValue objects that correspond to the grouping for the feed.
+     * @return An array of EntryValue objects that correspond to the grouping for the feed.
+     */
+    public EntryValue[] getGroupValues();
+
+    /**
+     * Returns an EntryValue for the given element name.
+     * @param element element name
+     * @return Returns an EntryValue for the given element name.
+     */
+    public EntryValue getSortByElement(Sort element);
+
+    /**
+     * Returns an array of EntryValues for the fields declared in the heading.
+     * 
+     * <b>NB:</b><br /> 
+     * Right now the parser will take any default=true field and change it to an 
+     * integer value representing the default order in the field. You should not
+     * rely on these values data display to a user!
+     * @return Array of EntryValue implementations from this entry.
+     */
+    public EntryValue[] getSortValues();
+}


Mime
View raw message