ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chinth...@apache.org
Subject svn commit: r226929 [3/4] - in /webservices/axis/trunk/archive/java/scratch/Google_SoC: ./ FeedGenerator/ FeedGenerator/src/ FeedGenerator/src/org/ FeedGenerator/src/org/apache/ FeedGenerator/src/org/apache/axis/ FeedGenerator/src/org/apache/axis/feed/...
Date Tue, 02 Aug 2005 02:46:39 GMT
Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSCategoryElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSCategoryElement.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSCategoryElement.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSCategoryElement.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,57 @@
+package org.apache.axis.feed.feedmodel.rss.impl;
+
+import org.apache.axis.feed.feedmodel.rss.CategoryElement;
+import org.apache.axis.feed.feedmodel.rss.Constants;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: INDIKA
+ * Date: Jul 5, 2005
+ * Time: 9:52:57 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class RSSCategoryElement implements CategoryElement {
+
+    private String categoryName = null;
+    private String domain = null;
+
+    public RSSCategoryElement(String categoryName) {
+        this.categoryName = categoryName;
+    }
+
+    public RSSCategoryElement(String domain, String categoryName) {
+        this.domain = domain;
+        this.categoryName = categoryName;
+    }
+
+    public void serialize(XMLStreamWriter streamWriter) throws XMLStreamException {
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.CATEGORY_STRING, Constants.RSS_NAMESPACE_URI);
+        if (domain != null)
+            streamWriter.writeAttribute(Constants.RSS_PREFIX, Constants.CATEGORY_DOMAIN_ATTR, domain);
+
+        if (categoryName != null)
+            streamWriter.writeCharacters(categoryName);
+        streamWriter.writeEndElement();
+    }
+
+    public String getCategoryName() {
+        return categoryName;
+    }
+
+    public void setCategoryName(String categoryName) {
+        this.categoryName = categoryName;
+    }
+
+    public String getDomain() {
+        return domain;
+    }
+
+    public void setDomain(String domain) {
+        this.domain = domain;
+    }
+
+
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSChannel.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSChannel.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSChannel.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSChannel.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,244 @@
+package org.apache.axis.feed.feedmodel.rss.impl;
+
+import org.apache.axis.feed.feedmodel.rss.*;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: INDIKA
+ * Date: Jul 5, 2005
+ * Time: 9:51:27 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class RSSChannel implements Channel {
+
+    private TtlElement ttlElement = null;
+    private ManagingEditorElement managingEditorElement = null;
+    private GeneratorElement generatorElement = null;
+    private CopyrightElement copyrightElement = null;
+    private LanguageElement languageElement = null;
+    private WebMasterElement webMasterElement = null;
+    private DocsElement docsElement = null;
+    private String title;
+    private URL link;
+    private String description;
+    private CategoryElement categoryElement = null;
+    private ImageElement imageElement = null;
+    private CloudElement cloudElement = null;
+    private PubDate pubDate = null;
+    private LastBuildDate lastBuildDate = null;
+    private int count = 0;
+    private ArrayList categoryList = null;
+    private ArrayList itemContainer = null;
+
+    public RSSChannel(String title, URL link, String description) {
+        itemContainer = new ArrayList();
+        this.title = title;
+        this.link = link;
+        this.description = description;
+    }
+
+    public void addItem(Item item) {
+        if (!itemContainer.contains(item)) {
+            itemContainer.add(item);
+            count++;
+        }
+    }
+
+    public void remove(Item item) {
+        if (itemContainer.contains(item)) {
+            if (itemContainer.remove(item)) ;
+        }
+    }
+
+    public void addImageElement(ImageElement imageElement) {
+        this.imageElement = imageElement;
+    }
+
+    public void addCloudElement(CloudElement cloudElement) {
+        this.cloudElement = cloudElement;
+    }
+
+    public void addPudDate(PubDate pubDate) {
+        this.pubDate = pubDate;
+    }
+
+    public void addLastBuildDate(LastBuildDate lastBuildDate) {
+        this.lastBuildDate = lastBuildDate;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public URL getLink() {
+        return link;
+    }
+
+    public void setLink(URL link) {
+        this.link = link;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+
+    public void serialize(XMLStreamWriter streamWriter) throws XMLStreamException {
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.CHANNEL_NAME, Constants.RSS_NAMESPACE_URI);
+
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.CHANNEL_TITLE_STRING, Constants.RSS_NAMESPACE_URI);
+        if (title != null)
+            streamWriter.writeCharacters(title);
+        streamWriter.writeEndElement();
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.CHANNEL_LINK_STRING, Constants.RSS_NAMESPACE_URI);
+        if (link != null)
+            streamWriter.writeCharacters(link.toString());
+        streamWriter.writeEndElement();
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.CHANNEL_DESCRIPTON_STRING, Constants.RSS_NAMESPACE_URI);
+        if (description != null)
+            streamWriter.writeCharacters(description);
+        streamWriter.writeEndElement();
+        if (cloudElement != null)
+            cloudElement.serialize(streamWriter);
+        if (pubDate != null)
+            pubDate.serialize(streamWriter);
+        if (lastBuildDate != null)
+            lastBuildDate.serialize(streamWriter);
+        if (categoryElement != null)
+            categoryElement.serialize(streamWriter);
+        if (generatorElement != null)
+            generatorElement.serialize(streamWriter);
+        if (copyrightElement != null)
+            copyrightElement.serialize(streamWriter);
+        if (docsElement != null)
+            docsElement.serialize(streamWriter);
+        if (webMasterElement != null) {
+            webMasterElement.serialize(streamWriter);
+        }
+        if (managingEditorElement != null)
+            managingEditorElement.serialize(streamWriter);
+        if (languageElement != null)
+            languageElement.serialize(streamWriter);
+        if (ttlElement != null)
+            ttlElement.serialize(streamWriter);
+
+
+        Iterator enumeration = this.getItems();
+        if (enumeration != null) {
+            while (enumeration.hasNext()) {
+
+                ((Item) enumeration.next()).serialize(streamWriter);
+            }
+        }
+
+        streamWriter.writeEndElement();
+    }
+
+    public CategoryElement getCategoryElement() {
+        return categoryElement;
+    }
+
+    public void addCategoryElement(CategoryElement categoryElement) {
+        this.categoryElement = categoryElement;
+        categoryList = new ArrayList();
+        categoryList.add(categoryElement);
+
+    }
+
+
+    public CloudElement getCloudElement() {
+        return cloudElement;
+    }
+
+    public PubDate getPubDate() {
+        return pubDate;
+    }
+
+    public LastBuildDate getLastBuildDate() {
+        return lastBuildDate;
+    }
+
+
+    public ImageElement getImageElement() {
+        return imageElement;
+    }
+
+    public Iterator getItems() {
+        Iterator enumeration = null;
+        if (itemContainer != null) {
+            enumeration = this.itemContainer.iterator();
+        }
+        return enumeration;
+    }
+
+
+    public TtlElement getTtlElement() {
+        return ttlElement;
+    }
+
+    public void setTtlElement(TtlElement ttlElement) {
+        this.ttlElement = ttlElement;
+    }
+
+    public ManagingEditorElement getManagingEditorElement() {
+        return managingEditorElement;
+    }
+
+    public void setManagingEditorElement(ManagingEditorElement managingEditorElement) {
+        this.managingEditorElement = managingEditorElement;
+    }
+
+    public GeneratorElement getGeneratorElement() {
+        return generatorElement;
+    }
+
+    public void setGeneratorElement(GeneratorElement generatorElement) {
+        this.generatorElement = generatorElement;
+    }
+
+    public WebMasterElement getWebMasterElement() {
+        return webMasterElement;
+    }
+
+    public void setWebMasterElement(WebMasterElement webMasterElement) {
+        this.webMasterElement = webMasterElement;
+    }
+
+    public DocsElement getDocsElement() {
+        return docsElement;
+    }
+
+    public void setDocsElement(DocsElement docsElement) {
+        this.docsElement = docsElement;
+    }
+
+    public LanguageElement getLanguageElement() {
+        return languageElement;
+    }
+
+    public void setLanguageElement(LanguageElement languageElement) {
+        this.languageElement = languageElement;
+    }
+
+    public CopyrightElement getCopyrightElement() {
+        return copyrightElement;
+    }
+
+    public void setCopyrightElement(CopyrightElement copyrightElement) {
+        this.copyrightElement = copyrightElement;
+    }
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSCloudElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSCloudElement.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSCloudElement.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSCloudElement.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,84 @@
+package org.apache.axis.feed.feedmodel.rss.impl;
+
+import org.apache.axis.feed.feedmodel.rss.CloudElement;
+import org.apache.axis.feed.feedmodel.rss.Constants;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: INDIKA
+ * Date: Jul 5, 2005
+ * Time: 9:53:15 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class RSSCloudElement implements CloudElement {
+
+    private String domain;
+    private int port;
+    private String path;
+    private String registerProcedure;
+    private String protocol;
+
+    public RSSCloudElement(int port, String path, String registerProcedure, String protocol, String domain) {
+        this.domain = domain;
+        this.port = port;
+        this.path = path;
+        this.registerProcedure = registerProcedure;
+        this.protocol = protocol;
+    }
+
+    public void serialize(XMLStreamWriter streamWriter) throws XMLStreamException {
+
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.CLOUD_NAME, Constants.RSS_NAMESPACE_URI);
+        streamWriter.writeAttribute(Constants.RSS_PREFIX, Constants.CLOUD_PORT_ATTR, new Integer(port).toString());
+        streamWriter.writeAttribute(Constants.RSS_PREFIX, Constants.CLOUD_PATH_ATTR, path);
+        streamWriter.writeAttribute(Constants.RSS_PREFIX, Constants.CLOUD_REGPRO_ATTR, registerProcedure);
+        streamWriter.writeAttribute(Constants.RSS_PREFIX, Constants.CLOUD_PROTOCOL_ATTR, protocol);
+        streamWriter.writeAttribute(Constants.RSS_PREFIX, Constants.CLOUD_DOMAIN_ATTR, domain);
+        streamWriter.writeEndElement();
+    }
+
+    public String getDomain() {
+        return domain;
+    }
+
+    public void setDomain(String domain) {
+        this.domain = domain;
+    }
+
+    public int getPort() {
+        return port;
+    }
+
+    public void setPort(int port) {
+        this.port = port;
+    }
+
+    public String getPath() {
+        return path;
+    }
+
+    public void setPath(String path) {
+        this.path = path;
+    }
+
+    public String getRegisterProcedure() {
+        return registerProcedure;
+    }
+
+    public void setRegisterProcedure(String registerProcedure) {
+        this.registerProcedure = registerProcedure;
+    }
+
+    public String getProtocol() {
+        return protocol;
+    }
+
+    public void setProtocol(String protocol) {
+        this.protocol = protocol;
+    }
+
+
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSCopyrightElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSCopyrightElement.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSCopyrightElement.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSCopyrightElement.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,37 @@
+package org.apache.axis.feed.feedmodel.rss.impl;
+
+import org.apache.axis.feed.feedmodel.rss.Constants;
+import org.apache.axis.feed.feedmodel.rss.CopyrightElement;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: INDIKA
+ * Date: Jul 22, 2005
+ * Time: 10:36:22 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class RSSCopyrightElement implements CopyrightElement {
+    private String copyright = null;
+
+    public RSSCopyrightElement(String copyright) {
+        this.copyright = copyright;
+    }
+
+    public void serialize(XMLStreamWriter streamWriter) throws XMLStreamException {
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.COPYRIGHT_ELEMNT_NAME, Constants.RSS_NAMESPACE_URI);
+        if (copyright != null)
+            streamWriter.writeCharacters(copyright);
+        streamWriter.writeEndElement();
+    }
+
+    public String getCopyright() {
+        return copyright;
+    }
+
+    public void setCopyright(String copyright) {
+        this.copyright = copyright;
+    }
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSDocsElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSDocsElement.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSDocsElement.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSDocsElement.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,53 @@
+package org.apache.axis.feed.feedmodel.rss.impl;
+
+import org.apache.axis.feed.feedmodel.rss.Constants;
+import org.apache.axis.feed.feedmodel.rss.DocsElement;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import java.net.URL;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: INDIKA
+ * Date: Jul 22, 2005
+ * Time: 10:36:04 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class RSSDocsElement implements DocsElement {
+    private URL docsURL = null;
+
+    public RSSDocsElement(URL docsURL) {
+        this.docsURL = docsURL;
+    }
+
+    public void serialize(XMLStreamWriter streamWriter) throws XMLStreamException {
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.DOCS_ELEMENT_NAME, Constants.RSS_NAMESPACE_URI);
+        if (docsURL != null)
+            streamWriter.writeCharacters(docsURL.toString());
+        streamWriter.writeEndElement();
+    }
+
+    public URL getDocsURL() {
+        return docsURL;
+    }
+
+    public void setDocsURL(URL docsURL) {
+        this.docsURL = docsURL;
+    }
+
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof RSSDocsElement)) return false;
+
+        final RSSDocsElement rssDocsElement = (RSSDocsElement) o;
+
+        if (docsURL != null ? !docsURL.equals(rssDocsElement.docsURL) : rssDocsElement.docsURL != null) return false;
+
+        return true;
+    }
+
+    public int hashCode() {
+        return (docsURL != null ? docsURL.hashCode() : 0);
+    }
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSEnclosureElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSEnclosureElement.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSEnclosureElement.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSEnclosureElement.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,57 @@
+package org.apache.axis.feed.feedmodel.rss.impl;
+
+import org.apache.axis.feed.feedmodel.rss.EnclosureElement;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import java.net.URL;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: INDIKA
+ * Date: Jul 5, 2005
+ * Time: 9:53:28 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class RSSEnclosureElement implements EnclosureElement {
+
+    private URL url;
+    private int lenght;
+    private String MIMEType;
+
+    public RSSEnclosureElement(URL url, int lenght, String MIMEType) {
+        this.url = url;
+        this.lenght = lenght;
+        this.MIMEType = MIMEType;
+    }
+
+    public void serialize(XMLStreamWriter streamWriter) throws XMLStreamException {
+
+    }
+
+    public URL getUrl() {
+        return url;
+    }
+
+    public void setUrl(URL url) {
+        this.url = url;
+    }
+
+    public int getLenght() {
+        return lenght;
+    }
+
+    public void setLenght(int lenght) {
+        this.lenght = lenght;
+    }
+
+    public String getMIMEType() {
+        return MIMEType;
+    }
+
+    public void setMIMEType(String MIMEType) {
+        this.MIMEType = MIMEType;
+    }
+
+
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSFeed.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSFeed.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSFeed.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSFeed.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,56 @@
+package org.apache.axis.feed.feedmodel.rss.impl;
+
+import org.apache.axis.feed.feedmodel.Feed;
+import org.apache.axis.feed.feedmodel.rss.Channel;
+import org.apache.axis.feed.feedmodel.rss.Constants;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: INDIKA
+ * Date: Jul 5, 2005
+ * Time: 9:51:38 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class RSSFeed implements Feed {
+
+    private String version;
+    private Channel channel;
+
+    public RSSFeed(String version) {
+        this.version = version;
+    }
+
+    public void addChannel(Channel channel) {
+
+        this.channel = channel;
+    }
+
+
+    public String getVersion() {
+        return version;
+    }
+
+
+    public void serialize(XMLStreamWriter streamWriter) throws XMLStreamException {
+        streamWriter.writeStartDocument();
+        streamWriter.writeCharacters("\n");
+        streamWriter.writeStartElement(Constants.RSS_NAME);
+        streamWriter.writeNamespace(Constants.RSS_PREFIX, Constants.RSS_NAMESPACE_URI);
+        streamWriter.writeAttribute(Constants.RSS_VERSION_ATTR, version);
+
+        Channel channeltemp = this.getChannel();
+
+        (channeltemp).serialize(streamWriter);
+
+        streamWriter.writeEndElement();
+        streamWriter.writeEndDocument();
+
+    }
+
+    public Channel getChannel() {
+        return channel;
+    }
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSGeneratorElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSGeneratorElement.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSGeneratorElement.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSGeneratorElement.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,54 @@
+package org.apache.axis.feed.feedmodel.rss.impl;
+
+import org.apache.axis.feed.feedmodel.rss.Constants;
+import org.apache.axis.feed.feedmodel.rss.GeneratorElement;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: INDIKA
+ * Date: Jul 22, 2005
+ * Time: 10:35:40 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class RSSGeneratorElement implements GeneratorElement {
+    private String generator = null;
+
+    public RSSGeneratorElement(String generator) {
+
+        this.generator = generator;
+    }
+
+    public void serialize(XMLStreamWriter streamWriter) throws XMLStreamException {
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.GENERATOR_ELEMT_NAME, Constants.RSS_NAMESPACE_URI);
+        if (generator != null)
+            streamWriter.writeCharacters(generator);
+        streamWriter.writeEndElement();
+    }
+
+    public String getGenerator() {
+        System.out.println(generator);
+        return generator;
+    }
+
+    public void setGenerator(String generator) {
+        this.generator = generator;
+    }
+
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof RSSGeneratorElement)) return false;
+
+        final RSSGeneratorElement rssGeneratorElement = (RSSGeneratorElement) o;
+
+        if (generator != null ? !generator.equals(rssGeneratorElement.generator) : rssGeneratorElement.generator != null) return false;
+
+        return true;
+    }
+
+    public int hashCode() {
+        return (generator != null ? generator.hashCode() : 0);
+    }
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSGuidElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSGuidElement.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSGuidElement.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSGuidElement.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,83 @@
+package org.apache.axis.feed.feedmodel.rss.impl;
+
+import org.apache.axis.feed.feedmodel.rss.Constants;
+import org.apache.axis.feed.feedmodel.rss.GuidElement;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: INDIKA
+ * Date: Jul 5, 2005
+ * Time: 9:53:47 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class RSSGuidElement implements GuidElement {
+
+    private String guid;
+    private boolean isPermaLink = true;
+
+    public RSSGuidElement(String guid) {
+        this.guid = guid;
+    }
+
+    public RSSGuidElement(String guid, boolean permaLink) {
+        this.guid = guid;
+        isPermaLink = permaLink;
+    }
+
+    public void serialize(XMLStreamWriter streamWriter) throws XMLStreamException {
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.GUID_ID_STRING, Constants.RSS_NAMESPACE_URI);
+        streamWriter.writeAttribute(Constants.RSS_PREFIX, Constants.GUID_ISPERMERLINK_ATTR, this.getSringofIsPermaLink());
+
+        if (guid != null)
+            streamWriter.writeCharacters(guid);
+        streamWriter.writeEndElement();
+
+    }
+
+    public String getGuid() {
+        return guid;
+    }
+
+    public void setGuid(String guid) {
+        this.guid = guid;
+    }
+
+    public boolean isPermaLink() {
+        return isPermaLink;
+    }
+
+    private String getSringofIsPermaLink() {
+        String temp = "true";
+        if (isPermaLink == false) {
+            temp = "false";
+        }
+        return temp;
+    }
+
+    public void setPermaLink(boolean permaLink) {
+        isPermaLink = permaLink;
+    }
+
+
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof RSSGuidElement)) return false;
+
+        final RSSGuidElement rssGuidElement = (RSSGuidElement) o;
+
+        if (isPermaLink != rssGuidElement.isPermaLink) return false;
+        if (guid != null ? !guid.equals(rssGuidElement.guid) : rssGuidElement.guid != null) return false;
+
+        return true;
+    }
+
+    public int hashCode() {
+        int result;
+        result = (guid != null ? guid.hashCode() : 0);
+        result = 29 * result + (isPermaLink ? 1 : 0);
+        return result;
+    }
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSImageElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSImageElement.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSImageElement.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSImageElement.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,106 @@
+package org.apache.axis.feed.feedmodel.rss.impl;
+
+import org.apache.axis.feed.feedmodel.rss.Constants;
+import org.apache.axis.feed.feedmodel.rss.ImageElement;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import java.net.URL;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: INDIKA
+ * Date: Jul 5, 2005
+ * Time: 9:54:11 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class RSSImageElement implements ImageElement {
+
+    private URL url;
+    private URL link;
+    private String title;
+
+    private String description = null;
+    private Integer height = null;
+    private Integer width = null;
+
+    public RSSImageElement(URL link, String title, URL url) {
+        this.link = link;
+        this.url = url;
+        this.title = title;
+    }
+
+    public void serialize(XMLStreamWriter streamWriter) throws XMLStreamException {
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.IMAGE_TITLE_STRING, Constants.RSS_NAMESPACE_URI);
+        streamWriter.writeCharacters(title);
+        streamWriter.writeEndElement();
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.IMAGE_LINK_STRING, Constants.RSS_NAMESPACE_URI);
+        streamWriter.writeCharacters(link.toString());
+        streamWriter.writeEndElement();
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.IMAGE_URL_STRING, Constants.RSS_NAMESPACE_URI);
+        streamWriter.writeCharacters(url.toString());
+        streamWriter.writeEndElement();
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.IMAGE_WIDTH_STRING, Constants.RSS_NAMESPACE_URI);
+        if (width != null)
+            streamWriter.writeCharacters((width).toString());
+        streamWriter.writeEndElement();
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.IMAGE_HEIGHT_STRING, Constants.RSS_NAMESPACE_URI);
+        if (height != null)
+            streamWriter.writeCharacters(height.toString());
+        streamWriter.writeEndElement();
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.IMAGE__DESCRIPTION_STRING, Constants.RSS_NAMESPACE_URI);
+        if (description != null)
+            streamWriter.writeEndElement();
+        streamWriter.writeCharacters(description);
+
+    }
+
+    public URL getUrl() {
+        return url;
+    }
+
+    public void setUrl(URL url) {
+        this.url = url;
+    }
+
+    public URL getLink() {
+        return link;
+    }
+
+    public void setLink(URL link) {
+        this.link = link;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+
+    public Integer getHeight() {
+        return height;
+    }
+
+    public void setHeight(Integer height) {
+        this.height = height;
+    }
+
+    public Integer getWidth() {
+        return width;
+    }
+
+    public void setWidth(Integer width) {
+        this.width = width;
+    }
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSItem.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSItem.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSItem.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSItem.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,162 @@
+package org.apache.axis.feed.feedmodel.rss.impl;
+
+import org.apache.axis.feed.feedmodel.rss.*;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import java.net.URL;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: INDIKA
+ * Date: Jul 5, 2005
+ * Time: 9:51:52 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class RSSItem implements Item {
+
+    private String title = null;
+    private URL link = null;
+    private String description = null;
+    private SourceElement sourceElement = null;
+    private EnclosureElement enclosureElement = null;
+    private GuidElement guidElement = null;
+    private PubDate pubDate = null;
+    private CategoryElement categoryElement = null;
+
+
+    public RSSItem() {
+    }
+
+    public RSSItem(String title, URL link, String description) {
+        this.title = title;
+        this.link = link;
+        this.description = description;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public URL getLink() {
+        return link;
+    }
+
+    public void setLink(URL link) {
+        this.link = link;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public void serialize(XMLStreamWriter streamWriter) throws XMLStreamException {
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.ITEM_NAME, Constants.RSS_NAMESPACE_URI);
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.ITEM_TITLE_STRING, Constants.RSS_NAMESPACE_URI);
+        if (title != null)
+            streamWriter.writeCharacters(title);
+        streamWriter.writeEndElement();
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.ITEM_LINK_STRING, Constants.RSS_NAMESPACE_URI);
+        if (link != null)
+            streamWriter.writeCharacters(link.toString());
+        streamWriter.writeEndElement();
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.ITEM_DESCRIPTON_STRING, Constants.RSS_NAMESPACE_URI);
+        if (description != null)
+            streamWriter.writeCharacters(description);
+        streamWriter.writeEndElement();
+        if (enclosureElement != null)
+            enclosureElement.serialize(streamWriter);
+
+        if (sourceElement != null)
+            sourceElement.serialize(streamWriter);
+
+        if (pubDate != null)
+            pubDate.serialize(streamWriter);
+        if (guidElement != null)
+            guidElement.serialize(streamWriter);
+        if (categoryElement != null)
+            categoryElement.serialize(streamWriter);
+        streamWriter.writeEndElement();
+    }
+
+    public void addSourceElement(SourceElement sourceElement) {
+        this.sourceElement = sourceElement;
+    }
+
+    public void addEnclosureElement(EnclosureElement enclosureElement) {
+        this.enclosureElement = enclosureElement;
+    }
+
+    public void addGuidElement(GuidElement guidElement) {
+        this.guidElement = guidElement;
+
+    }
+
+    public void addPubDate(PubDate pubDate) {
+        this.pubDate = pubDate;
+    }
+
+    public void addCategoryElement(CategoryElement categoryElement) {
+        this.categoryElement = categoryElement;
+    }
+
+    public EnclosureElement getEnclosureElement() {
+        return enclosureElement;
+    }
+
+    public GuidElement getGuidElement() {
+        return guidElement;
+    }
+
+    public PubDate getPubDate() {
+        return pubDate;
+    }
+
+    public SourceElement getSourceElement() {
+        return sourceElement;
+    }
+
+    public CategoryElement getCategoryElement() {
+        return categoryElement;
+    }
+
+
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof RSSItem)) return false;
+
+        final RSSItem rssItem = (RSSItem) o;
+
+        if (categoryElement != null ? !categoryElement.equals(rssItem.categoryElement) : rssItem.categoryElement != null) return false;
+        if (description != null ? !description.equals(rssItem.description) : rssItem.description != null) return false;
+        if (enclosureElement != null ? !enclosureElement.equals(rssItem.enclosureElement) : rssItem.enclosureElement != null) return false;
+        if (guidElement != null ? !guidElement.equals(rssItem.guidElement) : rssItem.guidElement != null) return false;
+        if (link != null ? !link.equals(rssItem.link) : rssItem.link != null) return false;
+        if (pubDate != null ? !pubDate.equals(rssItem.pubDate) : rssItem.pubDate != null) return false;
+        if (sourceElement != null ? !sourceElement.equals(rssItem.sourceElement) : rssItem.sourceElement != null) return false;
+        if (title != null ? !title.equals(rssItem.title) : rssItem.title != null) return false;
+
+        return true;
+    }
+
+    public int hashCode() {
+        int result;
+        result = (title != null ? title.hashCode() : 0);
+        result = 29 * result + (link != null ? link.hashCode() : 0);
+        result = 29 * result + (description != null ? description.hashCode() : 0);
+        result = 29 * result + (sourceElement != null ? sourceElement.hashCode() : 0);
+        result = 29 * result + (enclosureElement != null ? enclosureElement.hashCode() : 0);
+        result = 29 * result + (guidElement != null ? guidElement.hashCode() : 0);
+        result = 29 * result + (pubDate != null ? pubDate.hashCode() : 0);
+        result = 29 * result + (categoryElement != null ? categoryElement.hashCode() : 0);
+        return result;
+    }
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSLanguageElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSLanguageElement.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSLanguageElement.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSLanguageElement.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,53 @@
+package org.apache.axis.feed.feedmodel.rss.impl;
+
+import org.apache.axis.feed.feedmodel.rss.Constants;
+import org.apache.axis.feed.feedmodel.rss.LanguageElement;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: INDIKA
+ * Date: Jul 22, 2005
+ * Time: 10:35:15 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class RSSLanguageElement implements LanguageElement {
+    private String language = "en-us";
+
+    public RSSLanguageElement(String language) {
+
+        this.language = language;
+    }
+
+    public void serialize(XMLStreamWriter streamWriter) throws XMLStreamException {
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.LANGUAGE_ELEMNT_NAME, Constants.RSS_NAMESPACE_URI);
+        if (language != null)
+            streamWriter.writeCharacters(language);
+        streamWriter.writeEndElement();
+    }
+
+    public String getLanguage() {
+        return language;
+    }
+
+    public void setLanguage(String language) {
+        this.language = language;
+    }
+
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof RSSLanguageElement)) return false;
+
+        final RSSLanguageElement rssLanguageElement = (RSSLanguageElement) o;
+
+        if (language != null ? !language.equals(rssLanguageElement.language) : rssLanguageElement.language != null) return false;
+
+        return true;
+    }
+
+    public int hashCode() {
+        return (language != null ? language.hashCode() : 0);
+    }
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSManagingEditorElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSManagingEditorElement.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSManagingEditorElement.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSManagingEditorElement.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,37 @@
+package org.apache.axis.feed.feedmodel.rss.impl;
+
+import org.apache.axis.feed.feedmodel.rss.Constants;
+import org.apache.axis.feed.feedmodel.rss.ManagingEditorElement;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: INDIKA
+ * Date: Jul 22, 2005
+ * Time: 10:34:59 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class RSSManagingEditorElement implements ManagingEditorElement {
+    private String managingEditor = null;
+
+    public RSSManagingEditorElement(String managingEditor) {
+        this.managingEditor = managingEditor;
+    }
+
+    public void serialize(XMLStreamWriter streamWriter) throws XMLStreamException {
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.MANAGINGEDITOR_ELEMNT_NAME, Constants.RSS_NAMESPACE_URI);
+        if (managingEditor != null)
+            streamWriter.writeCharacters(managingEditor);
+        streamWriter.writeEndElement();
+    }
+
+    public String getManagingEditor() {
+        return managingEditor;
+    }
+
+    public void setManagingEditor(String managingEditor) {
+        this.managingEditor = managingEditor;
+    }
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSSourceElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSSourceElement.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSSourceElement.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSSourceElement.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,57 @@
+package org.apache.axis.feed.feedmodel.rss.impl;
+
+import org.apache.axis.feed.feedmodel.rss.Constants;
+import org.apache.axis.feed.feedmodel.rss.SourceElement;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: INDIKA
+ * Date: Jul 5, 2005
+ * Time: 9:54:32 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class RSSSourceElement implements SourceElement {
+
+    private String sourcename;
+    private String linkOfSource = null;
+
+    public RSSSourceElement(String sourcename) {
+        this.sourcename = sourcename;
+    }
+
+    public RSSSourceElement(String sourcename, String linkOfSource) {
+        this.sourcename = sourcename;
+        this.linkOfSource = linkOfSource;
+    }
+
+    public void serialize(XMLStreamWriter streamWriter) throws XMLStreamException {
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.SOURCE_NAME, Constants.RSS_NAMESPACE_URI);
+        if (linkOfSource != null)
+            streamWriter.writeAttribute(Constants.RSS_PREFIX, "url", linkOfSource);
+
+        if (sourcename != null)
+            streamWriter.writeCharacters(sourcename);
+        streamWriter.writeEndElement();
+    }
+
+    public String getSourcename() {
+        return sourcename;
+    }
+
+    public void setSourcename(String sourcename) {
+        this.sourcename = sourcename;
+    }
+
+    public String getLinkOfSource() {
+        return linkOfSource;
+    }
+
+    public void setLinkOfSource(String linkOfSource) {
+        this.linkOfSource = linkOfSource;
+    }
+
+
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSTextInputElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSTextInputElement.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSTextInputElement.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSTextInputElement.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,67 @@
+package org.apache.axis.feed.feedmodel.rss.impl;
+
+import org.apache.axis.feed.feedmodel.rss.TextInputElement;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import java.net.URL;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: INDIKA
+ * Date: Jul 5, 2005
+ * Time: 11:33:26 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class RSSTextInputElement implements TextInputElement {
+
+    private String title;
+    private String description;
+    private String name;
+    private URL link;
+
+    public RSSTextInputElement(String title, String description, String name, URL link) {
+        this.title = title;
+        this.description = description;
+        this.name = name;
+        this.link = link;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public URL getLink() {
+        return link;
+    }
+
+    public void setLink(URL link) {
+        this.link = link;
+    }
+
+    public void serialize(XMLStreamWriter streamWriter) throws XMLStreamException {
+
+    }
+
+
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSTtlElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSTtlElement.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSTtlElement.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSTtlElement.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,37 @@
+package org.apache.axis.feed.feedmodel.rss.impl;
+
+import org.apache.axis.feed.feedmodel.rss.Constants;
+import org.apache.axis.feed.feedmodel.rss.TtlElement;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: INDIKA
+ * Date: Jul 22, 2005
+ * Time: 10:34:41 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class RSSTtlElement implements TtlElement {
+    private int ttl = 0;
+
+    public RSSTtlElement(int ttl) {
+        this.ttl = ttl;
+    }
+
+    public void serialize(XMLStreamWriter streamWriter) throws XMLStreamException {
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.TTL_ELEMENT_NAME, Constants.RSS_NAMESPACE_URI);
+        if (new Integer(ttl) != null)
+            streamWriter.writeCharacters(new Integer(ttl).toString());
+        streamWriter.writeEndElement();
+    }
+
+    public int getTtl() {
+        return ttl;
+    }
+
+    public void setTtl(int ttl) {
+        this.ttl = ttl;
+    }
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSWebMasterElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSWebMasterElement.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSWebMasterElement.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/impl/RSSWebMasterElement.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,37 @@
+package org.apache.axis.feed.feedmodel.rss.impl;
+
+import org.apache.axis.feed.feedmodel.rss.Constants;
+import org.apache.axis.feed.feedmodel.rss.WebMasterElement;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: INDIKA
+ * Date: Jul 22, 2005
+ * Time: 10:34:23 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class RSSWebMasterElement implements WebMasterElement {
+    private String webMaster = null;
+
+    public RSSWebMasterElement(String webMaster) {
+        this.webMaster = webMaster;
+    }
+
+    public void serialize(XMLStreamWriter streamWriter) throws XMLStreamException {
+        streamWriter.writeStartElement(Constants.RSS_PREFIX, Constants.TTL_ELEMENT_NAME, Constants.RSS_NAMESPACE_URI);
+//        if (new Integer(webMaster) != null)
+        ///    streamWriter.writeCharacters(new Integer(webMaster).toString());
+        streamWriter.writeEndElement();
+    }
+
+    public String getWebMaster() {
+        return webMaster;
+    }
+
+    public void setWebMaster(String webMaster) {
+        this.webMaster = webMaster;
+    }
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/util/impl/FeedContainerImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/util/impl/FeedContainerImpl.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/util/impl/FeedContainerImpl.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/feedmodel/rss/util/impl/FeedContainerImpl.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,35 @@
+package org.apache.axis.feed.feedmodel.rss.util.impl;
+
+import org.apache.axis.feed.feedmodel.Feed;
+import org.apache.axis.feed.feedmodel.FeedContainer;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: INDIKA
+ * Date: Jul 5, 2005
+ * Time: 3:33:39 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class FeedContainerImpl implements FeedContainer {
+    private ArrayList feedList;
+
+    public FeedContainerImpl() {
+    }
+
+    public void addFeed(Feed feed) {
+        //To change body of implemented methods use File | Settings | File Templates.
+        feedList = new ArrayList();
+        feedList.add(feed);
+    }
+
+    public Iterator getFeedsIterator() {
+        return this.feedList.iterator();
+    }
+
+    public ArrayList getFeeds() {
+        return this.feedList;
+    }
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/listner/ListnerConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/listner/ListnerConstants.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/listner/ListnerConstants.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/listner/ListnerConstants.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,17 @@
+package org.apache.axis.feed.listner;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: 020223
+ * Date: Jul 16, 2001
+ * Time: 10:32:56 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public interface ListnerConstants {
+    public static String FEED_LISTNER = "feedListner";
+    public static String EVENTING_LISTNER = "eventingListner";
+    public static String CHANNEL_URL_KEY = "FEED_CHANNEL_DEFAULT_URL";
+    public static String ITEM_URL_KEY = "FEED_ITEM_DEFAULT_URL";
+    public static String CHANNEL_URL_VALUE = "http://127.0.0.1:8080/axis2/";
+    public static String ITEM_URL_VALUE = "http://127.0.0.1:8080/axis2/";
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/listner/impl/ListnerImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/listner/impl/ListnerImpl.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/listner/impl/ListnerImpl.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/src/org/apache/axis/feed/listner/impl/ListnerImpl.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,67 @@
+package org.apache.axis.feed.listner.impl;
+
+
+import org.apache.axis.feed.feedbuilder.AbstractFeedBuilder;
+import org.apache.axis.feed.feedbuilder.Constants;
+import org.apache.axis.feed.feedbuilder.FeedBuilder;
+import org.apache.axis.feed.listner.ListnerConstants;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.description.ServiceDescription;
+import org.apache.axis2.engine.AxisEvent;
+import org.apache.axis2.engine.AxisObserver;
+
+import java.util.HashMap;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: 020223
+ * Date: Jul 16, 2001
+ * Time: 9:56:01 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class ListnerImpl implements AxisObserver {
+
+    private HashMap parameterList = new HashMap();
+
+    public void init() {
+
+
+    }
+
+    public void update(AxisEvent event) {
+        String channel_home = ListnerConstants.CHANNEL_URL_VALUE;
+        String item_home = ListnerConstants.ITEM_URL_VALUE;
+        if (getParameter(ListnerConstants.CHANNEL_URL_KEY) != null) {
+            channel_home = getParameter(ListnerConstants.CHANNEL_URL_KEY).getValue().toString();
+        }
+        if (getParameter(ListnerConstants.ITEM_URL_KEY) != null) {
+            item_home = getParameter(ListnerConstants.ITEM_URL_KEY).getValue().toString();
+        }
+        FeedBuilder atomBuilder = AbstractFeedBuilder.getFeedBuilder(Constants.ATOM_FEED);
+        FeedBuilder rssBuilder = AbstractFeedBuilder.getFeedBuilder(Constants.RSS_FEED);
+        atomBuilder.initialiseFeed(channel_home);
+        rssBuilder.initialiseFeed(channel_home);
+
+        if (AxisEvent.SERVICE_DEPLOY == event.getEventType()) {
+            ServiceDescription serviceDescription = event.getService();
+            atomBuilder.addHOTFeed(serviceDescription, item_home);
+            rssBuilder.addHOTFeed(serviceDescription, item_home);
+        }
+        if (AxisEvent.SERVICE_REMOVE == event.getEventType()) {
+            atomBuilder.removeFeed(event.getService(), item_home);
+            rssBuilder.removeFeed(event.getService(), item_home);
+
+        }
+
+    }
+
+    public void addParameter(Parameter parameter) {
+
+        parameterList.put(parameter.getName(), parameter);
+    }
+
+    public Parameter getParameter(String s) {
+        return (Parameter) parameterList.get(s);
+
+    }
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/test/org/apache/axis/feed/feedbuilder/atom/ATOMFeedBuilderTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/test/org/apache/axis/feed/feedbuilder/atom/ATOMFeedBuilderTest.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/test/org/apache/axis/feed/feedbuilder/atom/ATOMFeedBuilderTest.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/test/org/apache/axis/feed/feedbuilder/atom/ATOMFeedBuilderTest.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,177 @@
+/*
+ * Created on Jul 27, 2005
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.apache.axis.feed.feedbuilder.atom;
+
+import junit.framework.TestCase;
+import org.apache.axis.feed.feedbuilder.Constants;
+import org.apache.axis.feed.feedmodel.atom.ATOMFeed;
+import org.apache.axis.feed.feedmodel.atom.ATOMConstants;
+import org.apache.axis.feed.feedmodel.atom.LinkElement;
+import org.apache.axis.feed.feedmodel.atom.ATOMEntry;
+import org.apache.axis.feed.feedmodel.atom.impl.*;
+import org.apache.axis.feed.feedmodel.atom.factory.ATOMFactory;
+import org.apache.axis.feed.feedmodel.AbstractFeedFactory;
+import org.apache.axis2.description.ServiceDescription;
+import org.apache.axis2.description.ModuleDescription;
+import org.apache.axis2.description.OperationDescription;
+import org.apache.wsdl.WSDLEndpoint;
+
+import javax.xml.namespace.QName;
+import java.util.Date;
+import java.util.Iterator;
+
+
+public class ATOMFeedBuilderTest extends TestCase {
+    private Integer connt = new Integer(1);
+    private  ServiceDescription description;
+
+	public static void main(String[] args) {
+	}
+
+	/*
+	 * @see TestCase#setUp()
+	 */
+	protected void setUp() throws Exception {
+		super.setUp();
+        description= new ServiceDescription(new QName(ATOMConstants.NAMESPASE_URL,"localname"));
+        description.setLastupdate();
+	}
+
+	/*
+	 * @see TestCase#tearDown()
+	 */
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+
+	public void testInitialiseFeed() {
+       assertEquals(true,createChannel("http://www.localhost:8080/axis2")) ;
+	}
+
+	public void testAddHOTFeed() {
+		assertEquals(true,createATOMFileAppending(description,"http://www.localhost:8080/axis2")) ;
+	}
+
+	public void testRemoveFeed() {
+		//TODO Implement removeFeed().
+	}
+    private boolean createChannel(String channel_defaultHome) {
+        boolean temp =false;
+          try {
+              if (!System.getProperties().containsKey(Constants.ATOM_KEY)) {
+                  ATOMFeed atomFeed;
+                  ATOMFactory fac = (ATOMFactory) AbstractFeedFactory.getFeedFactory("ATOM");
+                  atomFeed = fac.createFeedElement("0.3", new org.apache.axis.feed.feedmodel.atom.impl.ATOMTitleElement("AXIS2 ATOM FEED CHANNEL "), new ATOMModifiedElement(new Date()), new ATOMLinkElement(ATOMConstants.LINK_REL_ATTR_VALUE, channel_defaultHome, "text/html"), new ATOMAuthorElement(new PersonalNameElementImpl("axis 2")));
+                  atomFeed.setIdElement(new ATOMID("feedid" + new Long(System.currentTimeMillis()).toString()));
+                  System.getProperties().put(Constants.ATOM_KEY, atomFeed);
+                  temp= true;
+              }
+
+          } catch (Exception e) {
+              temp = false;
+              e.printStackTrace();
+          }
+        return temp;
+
+      }
+
+
+      private ATOMFeed build() throws Exception {
+          ATOMFeed atomFeed = (ATOMFeed) System.getProperties().get(Constants.ATOM_KEY);
+          if (atomFeed != null) {
+
+              return atomFeed;
+          }
+          return null;
+
+      }
+
+      private boolean createATOMFileAppending(ServiceDescription serviceDescription, String itemDefualtLink) {
+            boolean boolTemp =false;
+          try {
+              ATOMFeed atomFeed;
+              atomFeed = build();
+              ATOMFactory fac = (ATOMFactory) AbstractFeedFactory.getFeedFactory("ATOM");
+              LinkElement linkElement = fac.createATOMLinkElement(ATOMConstants.LINK_REL_ATTR_VALUE, itemDefualtLink, "text/html");
+
+              if (serviceDescription.getWSDLDefinition() != null) {
+                  //  linkElement.setHerfAttribute(serviceDescription.getWSDLDefinition().getDocumentBaseURI());
+              }
+              ATOMEntry atomEntry = fac.createEntryElement(fac.createATOMTitleElement(serviceDescription.getName().getLocalPart()), fac.createATOMModifiedElement(new Date(serviceDescription.getLastupdate())), linkElement, fac.createATOMIsuuedElement(new Date(serviceDescription.getLastupdate())));
+              atomEntry.setATOMId(new ATOMID(new Long(System.currentTimeMillis()).toString() + connt.toString()));
+              String description = serviceDescription.getServiceDescription() + eprInfo(serviceDescription) + serviceInfo(serviceDescription) + moduleInfo(serviceDescription) + wsdlInfo(serviceDescription);
+              description = "<p><ul>" + "<li>" + serviceDescription.getServiceDescription() + "</li>" + "<li>" + eprInfo(serviceDescription) + "</li>" + "<li>" + serviceInfo(serviceDescription) + "</ul></p><li>" + moduleInfo(serviceDescription) + "</li>" + "</li>" + "<li>" + wsdlInfo(serviceDescription) + "</li>" + "</li>" + "</ul></p>";
+              atomEntry.setAtomSummaryElement(new ATOMSummaryElement(description));
+              atomEntry.setAtomContentElement(new ATOMContentElement(description));
+              int temp = connt.intValue() + 4;
+              connt = new Integer(temp);
+              if (atomFeed != null && atomEntry != null) {
+                  atomFeed.addEntry(atomEntry);
+                  System.getProperties().put(Constants.ATOM_KEY, atomFeed);
+
+              }
+              boolTemp= true;
+          } catch (Exception e) {
+              boolTemp= false;
+              e.printStackTrace();
+          }
+
+           return boolTemp;
+      }
+
+      private String eprInfo(ServiceDescription serviceDescription) {
+          String info = "END PONITS :";
+          if (!serviceDescription.getEndpoints().isEmpty()) {
+              if (!serviceDescription.getEndpoints().values().isEmpty()) {
+                  Iterator iterator = serviceDescription.getEndpoints().values().iterator();
+                  while (iterator.hasNext()) {
+                      info = info + ((WSDLEndpoint) iterator.next()).getName();
+                  }
+              }
+          }
+          return info;
+      }
+
+      private String wsdlInfo(ServiceDescription serviceDescription) {
+          String info = "WSDL INFOMATION :";
+          if (serviceDescription.getWSDLDefinition() != null) {
+              info += serviceDescription.getWSDLDefinition().getQName() + serviceDescription.getWSDLDefinition().getDocumentBaseURI();
+          }
+          return info;
+      }
+
+      private String moduleInfo(ServiceDescription serviceDescription) {
+          String info = "MODULE INFORMATION :";
+          if (!serviceDescription.getEngagedModules().isEmpty()) {
+              Iterator iterator = serviceDescription.getEngagedModules().iterator();
+              while (iterator.hasNext()) {
+                  ModuleDescription moduleDescription = (ModuleDescription) iterator.next();
+                  info += moduleDescription.getName();
+              }
+          }
+          return info;
+      }
+
+      private String serviceInfo(ServiceDescription serviceDescription) {
+          String info = "<p>OPERATION INFORMATION:<ul>";
+          if (serviceDescription.getOperations() != null) {
+              if (!serviceDescription.getOperations().values().isEmpty()) {
+                  Iterator iterator = serviceDescription.getOperations().values().iterator();
+                  while (iterator.hasNext()) {
+                      OperationDescription operationDescription = (OperationDescription) iterator.next();
+                      info += "<li><ul><li>Operation Name :" + operationDescription.getName() + "</li><li>" + "<A href=\"" + operationDescription.getMessageExchangePattern() + "\">MEP" + operationDescription.getMessageExchangePattern() + "</A>" + "</li></ul></li>";
+                  }
+              }
+
+
+          }
+          return info;
+      }
+
+
+
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/test/org/apache/axis/feed/feedbuilder/rss/RSSFeedBuilderTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/test/org/apache/axis/feed/feedbuilder/rss/RSSFeedBuilderTest.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/test/org/apache/axis/feed/feedbuilder/rss/RSSFeedBuilderTest.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/test/org/apache/axis/feed/feedbuilder/rss/RSSFeedBuilderTest.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,204 @@
+/*
+ * Created on Jul 27, 2005
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.apache.axis.feed.feedbuilder.rss;
+
+import junit.framework.TestCase;
+import org.apache.axis2.description.ServiceDescription;
+import org.apache.axis2.description.ModuleDescription;
+import org.apache.axis2.description.OperationDescription;
+import org.apache.wsdl.WSDLEndpoint;
+import org.apache.axis.feed.feedbuilder.Constants;
+import org.apache.axis.feed.feedmodel.rss.factory.RSSFactory;
+import org.apache.axis.feed.feedmodel.rss.impl.*;
+import org.apache.axis.feed.feedmodel.rss.Channel;
+import org.apache.axis.feed.feedmodel.rss.Item;
+import org.apache.axis.feed.feedmodel.rss.GuidElement;
+import org.apache.axis.feed.feedmodel.AbstractFeedFactory;
+import org.apache.axis.feed.feedmodel.atom.ATOMConstants;
+
+import javax.xml.namespace.QName;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Date;
+import java.net.URL;
+import java.net.MalformedURLException;
+
+
+public class RSSFeedBuilderTest extends TestCase {
+     private Integer connt = new Integer(1);
+     private  ServiceDescription description;
+	public static void main(String[] args) {
+	}
+
+	/*
+	 * @see TestCase#setUp()
+	 */
+	protected void setUp() throws Exception {
+		super.setUp();
+        description= new ServiceDescription(new QName(ATOMConstants.NAMESPASE_URL,"localname"));
+        description.setLastupdate();
+
+	}
+
+	/*
+	 * @see TestCase#tearDown()
+	 */
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+
+	/**
+	 * Constructor for RSSFeedBuilderTest.
+	 * @param name
+	 */
+	public RSSFeedBuilderTest(String name) {
+		super(name);
+	}
+
+	public void testInitialiseFeed() {
+
+        assertEquals(true,createChannel("http://www.localhost:8080/axis2")) ;
+	}
+
+	public void testAddHOTFeed() {
+
+        assertEquals(true,createRSSFileAppending(description,"http://www.localhost:8080/axis2")) ;
+
+	}
+
+	public void testRemoveFeed() {
+		//TODO Implement removeFeed().
+	}
+    private boolean createChannel(String channel_defaultHome) {
+            boolean temp =false;
+            Properties properties = System.getProperties();
+            if (!properties.containsKey(Constants.RSS_KEY)) {
+                RSSFactory fac = (RSSFactory) AbstractFeedFactory.getFeedFactory("RSS");
+                RSSFeed rssFeed = (RSSFeed) fac.createFeed("2.0");
+                Channel channel;
+                try {
+                    channel = new RSSChannel("Apache Axis2", new URL(channel_defaultHome), "Apache Axis2 is an implementation of the Simple Object Access Protocol (SOAP) Recommendation from the W3C. Axis2 can be used to provide and consume Web Services.");
+                    channel.addPudDate(new PubDateImpl(new Date()));
+                    channel.addLastBuildDate(new LastBuildDateImpl(new Date()));
+                    channel.addCategoryElement(new RSSCategoryElement("WEB SERVICE FEEDS"));
+                    channel.setGeneratorElement(new RSSGeneratorElement("Axis 2.0 Feed Generator 0.9"));
+                    channel.setLanguageElement(new RSSLanguageElement("en-us"));
+
+                    rssFeed.addChannel(channel);
+                    properties.put(Constants.RSS_KEY, rssFeed);
+                    temp=true;
+                } catch (MalformedURLException e) {
+                    temp =false;
+                    e.printStackTrace();
+                }
+
+
+            }
+         return temp;
+        }
+
+
+        private RSSFeed build() throws Exception {
+
+            Properties properties = System.getProperties();
+            RSSFeed rssFeed = (RSSFeed) properties.get(Constants.RSS_KEY);
+            if (rssFeed != null) {
+                return rssFeed;
+            }
+
+            return null;
+        }
+
+        private boolean createRSSFileAppending(ServiceDescription serviceDescription, String itemDefualtLink) {
+              boolean boolTemp =false;
+
+            try {
+                RSSFeed rssFeed;
+                rssFeed = build();
+                String description = serviceDescription.getServiceDescription() + eprInfo(serviceDescription) + serviceInfo(serviceDescription) + moduleInfo(serviceDescription) + wsdlInfo(serviceDescription);
+                Item item = new RSSItem();
+                description = "<p><ul>" + "<li>" + serviceDescription.getServiceDescription() + "</li>" + "<li>" + eprInfo(serviceDescription) + "</li>" + "<li>" + serviceInfo(serviceDescription) + "</ul></p><li>" + moduleInfo(serviceDescription) + "</li>" + "</li>" + "<li>" + wsdlInfo(serviceDescription) + "</li>" + "</li>" + "</ul></p>";
+                item.setDescription(description);
+                if (serviceDescription.getWSDLDefinition() != null) {
+                    // item.setLink(new URL(serviceDescription.getWSDLDefinition().getDocumentBaseURI()));
+                    item.setLink(new URL(itemDefualtLink));
+
+                } else {
+                    item.setLink(new URL(itemDefualtLink));
+                }
+                item.setTitle(serviceDescription.getName().getLocalPart());
+                item.addPubDate(new PubDateImpl(new Date(serviceDescription.getLastupdate())));
+                GuidElement guidElement = new RSSGuidElement(new Long(System.currentTimeMillis()).toString() + connt.toString());
+                guidElement.setPermaLink(false);
+                item.addGuidElement(guidElement);
+                int temp = connt.intValue() + 4;
+                connt = new Integer(temp);
+                rssFeed.getChannel().addLastBuildDate(new LastBuildDateImpl(new Date(serviceDescription.getLastupdate())));
+                rssFeed.getChannel().addItem(item);
+                System.getProperties().put(Constants.RSS_KEY, rssFeed);
+                boolTemp= true;
+
+            } catch (Exception e) {
+                boolTemp=false;
+                e.printStackTrace();
+            }
+            return boolTemp;
+        }
+
+
+        private String eprInfo(ServiceDescription serviceDescription) {
+            String info = "END PONITS :";
+            if (!serviceDescription.getEndpoints().isEmpty()) {
+                if (!serviceDescription.getEndpoints().values().isEmpty()) {
+                    Iterator iterator = serviceDescription.getEndpoints().values().iterator();
+                    while (iterator.hasNext()) {
+                        info = info + ((WSDLEndpoint) iterator.next()).getName();
+                    }
+                }
+            }
+            return info;
+        }
+
+        private String wsdlInfo(ServiceDescription serviceDescription) {
+            String info = "WSDL INFOMATION :";
+            if (serviceDescription.getWSDLDefinition() != null) {
+                info += serviceDescription.getWSDLDefinition().getQName() + serviceDescription.getWSDLDefinition().getDocumentBaseURI();
+            }
+            return info;
+        }
+
+        private String moduleInfo(ServiceDescription serviceDescription) {
+            String info = "MODULE INFORMATION :";
+            if (!serviceDescription.getEngagedModules().isEmpty()) {
+                Iterator iterator = serviceDescription.getEngagedModules().iterator();
+                while (iterator.hasNext()) {
+                    ModuleDescription moduleDescription = (ModuleDescription) iterator.next();
+                    info += moduleDescription.getName();
+                }
+            }
+            return info;
+        }
+
+        private String serviceInfo(ServiceDescription serviceDescription) {
+            String info = "<p>OPERATION INFORMATION:<ul>";
+            if (serviceDescription.getOperations() != null) {
+                if (!serviceDescription.getOperations().values().isEmpty()) {
+                    Iterator iterator = serviceDescription.getOperations().values().iterator();
+                    while (iterator.hasNext()) {
+                        OperationDescription operationDescription = (OperationDescription) iterator.next();
+                        info += "<li><ul><li>Operation Name :" + operationDescription.getName() + "</li><li>" + "<A href=\"" + operationDescription.getMessageExchangePattern() + "\">MEP" + operationDescription.getMessageExchangePattern() + "</A>" + "</li></ul></li>";
+                    }
+                }
+
+
+            }
+            return info;
+        }
+
+
+
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/test/org/apache/axis/feed/feedmodel/atom/factory/impl/ATOMFactoryImplTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/test/org/apache/axis/feed/feedmodel/atom/factory/impl/ATOMFactoryImplTest.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/test/org/apache/axis/feed/feedmodel/atom/factory/impl/ATOMFactoryImplTest.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/test/org/apache/axis/feed/feedmodel/atom/factory/impl/ATOMFactoryImplTest.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,105 @@
+/*
+ * Created on Jul 28, 2005
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.apache.axis.feed.feedmodel.atom.factory.impl;
+
+import junit.framework.TestCase;
+import org.apache.axis.feed.feedmodel.atom.*;
+import org.apache.axis.feed.feedmodel.atom.factory.ATOMFactory;
+import org.apache.axis.feed.feedmodel.atom.impl.*;
+
+import java.util.Date;
+
+/**
+ * @author INDIKA
+ *         <p/>
+ *         TODO To change the template for this generated type comment go to
+ *         Window - Preferences - Java - Code Style - Code Templates
+ */
+public class ATOMFactoryImplTest extends TestCase {
+
+    private ATOMFactory factory;
+
+
+
+    private LinkElement linkElement;
+
+   private ATOMAuthorElement authorElement = null;
+    private ModeAttribute mode;
+    private TypeAttribute type;
+    private ATOMTitleElement titleElement = null;
+    private ATOMModifiedElement modifiedElement = null;
+    private ATOMID atomid = null;
+
+    public static void main(String[] args) {
+    }
+
+    /*
+     * @see TestCase#setUp()
+     */
+    protected void setUp() throws Exception {
+        super.setUp();
+        factory = new ATOMFactoryImpl();
+    }
+
+    /*
+     * @see TestCase#tearDown()
+     */
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    /**
+     * Constructor for ATOMFactoryImplTest.
+     *
+     * @param name
+     */
+    public ATOMFactoryImplTest(String name) {
+        super(name);
+    }
+
+
+    public void testCreateATOMTitleElement() {
+        titleElement = new ATOMTitleElement("title");
+        assertEquals(titleElement, factory.createATOMTitleElement("title"));
+    }
+
+
+    public void testCreateATOMModifiedElement() {
+        modifiedElement = new ATOMModifiedElement(new Date());
+        assertEquals(modifiedElement, factory.createATOMModifiedElement(new Date()));
+    }
+
+    public void testCreateATOMAuthorElement() {
+        authorElement = new ATOMAuthorElement(new PersonalNameElementImpl("indika"));
+        assertEquals(authorElement, factory.createATOMAuthorElement(factory.createPersonalNameElement("indika")));
+    }
+
+
+    public void testCreateATOMIDElement() {
+        atomid = new ATOMID("id");
+        assertEquals(atomid, factory.createATOMIDElement("id"));
+    }
+
+    public void testCreateATOMLinkElement() {
+        linkElement = new ATOMLinkElement("alternate", "http://www.ws.apache.org/", "text/html");
+        assertEquals(linkElement, factory.createATOMLinkElement("alternate", "http://www.ws.apache.org/", "text/html"));
+        assertEquals(linkElement.getHerfAttribute(), factory.createATOMLinkElement("alternate", "http://www.ws.apache.org/", "text/html").getHerfAttribute());
+    }
+
+    public void testCreateModeAttribute() {
+        mode = new ModeAttributeImpl(ATOMConstants.BASE64_MODE_ARRTIBUTE);
+        assertEquals(mode.getMode(), factory.createModeAttribute(ATOMConstants.BASE64_MODE_ARRTIBUTE).getMode());
+
+    }
+
+    public void testCreateTypeAttribute() {
+        type = new TypeAttributeImpl("xml");
+        assertEquals(type.getMediaType(), factory.createTypeAttribute("xml").getMediaType());
+
+    }
+
+}

Added: webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/test/org/apache/axis/feed/feedmodel/atom/impl/ATOMEntryElementTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/test/org/apache/axis/feed/feedmodel/atom/impl/ATOMEntryElementTest.java?rev=226929&view=auto
==============================================================================
--- webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/test/org/apache/axis/feed/feedmodel/atom/impl/ATOMEntryElementTest.java (added)
+++ webservices/axis/trunk/archive/java/scratch/Google_SoC/FeedGenerator/test/org/apache/axis/feed/feedmodel/atom/impl/ATOMEntryElementTest.java Mon Aug  1 19:43:54 2005
@@ -0,0 +1,119 @@
+/*
+ * Created on Jul 27, 2005
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.apache.axis.feed.feedmodel.atom.impl;
+
+import junit.framework.TestCase;
+import org.apache.axis.feed.feedmodel.atom.ContentElement;
+import org.apache.axis.feed.feedmodel.atom.DateElement;
+import org.apache.axis.feed.feedmodel.atom.LinkElement;
+import org.apache.axis.feed.feedmodel.atom.ATOMEntry;
+import org.apache.axis.feed.feedmodel.atom.factory.ATOMFactory;
+import org.apache.axis.feed.feedmodel.AbstractFeedFactory;
+
+import java.util.Date;
+
+
+public class ATOMEntryElementTest extends TestCase {
+    private ATOMEntry  atomEntry;
+    private ContentElement titleElement;
+    private DateElement modifiedElement;
+    private LinkElement linkElement;
+    private DateElement issuedElement;
+    private ATOMID atomid;
+
+    private ContentElement atomSummaryElement = null;
+    private ContentElement atomContentElement = null;
+
+	public static void main(String[] args) {
+	}
+
+	/*
+	 * @see TestCase#setUp()
+	 */
+	protected void setUp() throws Exception {
+		super.setUp();
+        ATOMFactory fac = (ATOMFactory) AbstractFeedFactory.getFeedFactory("ATOM");
+        titleElement = fac.createATOMTitleElement("entrytile");
+        modifiedElement=   fac.createATOMModifiedElement(new Date());
+        issuedElement=     fac.createATOMIsuuedElement(new Date());
+        linkElement= fac.createATOMLinkElement("alternate", "http://www.ws.apache.org/", "text/html");
+        atomEntry = fac.createEntryElement(titleElement, modifiedElement, linkElement,issuedElement );
+
+	}
+
+	/*
+	 * @see TestCase#tearDown()
+	 */
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+
+	/**
+	 * Constructor for ATOMEntryElementTest.
+	 * @param name
+	 */
+	public ATOMEntryElementTest(String name) {
+		super(name);
+	}
+
+	public void testGetTitleElement() {
+        assertNotNull(atomEntry.getTitleElement());
+        assertEquals(titleElement,atomEntry.getTitleElement());
+	}
+
+	public void testSetTitleElement() {
+         titleElement = new ATOMContentElement("new Title") ;
+         assertNotSame(titleElement,atomEntry.getTitleElement());
+         assertNotSame(titleElement.getContent(),atomEntry.getTitleElement().getContent());
+         atomEntry.setTitleElement(titleElement);
+         assertEquals(titleElement,atomEntry.getTitleElement());
+	}
+
+	public void testGetModifiedElement() {
+         assertNotNull(atomEntry.getModifiedElement());
+        assertEquals(modifiedElement,atomEntry.getModifiedElement());
+	}
+
+	public void testSetModifiedElement() {
+        modifiedElement  = new ATOMModifiedElement(new Date()) ;
+        atomEntry.setModifiedElement(modifiedElement);
+        assertEquals(modifiedElement,atomEntry.getModifiedElement());
+	}
+
+	public void testGetLinkElement() {
+        assertNotNull(atomEntry.getLinkElement());
+        assertEquals(linkElement,atomEntry.getLinkElement());
+	}
+
+	public void testSetLinkElement() {
+        linkElement= new ATOMLinkElement("alternate", "http://www.apache.org/", "text/html");
+        assertNotSame(linkElement,atomEntry.getLinkElement());
+        atomEntry.setLinkElement(linkElement);
+        assertEquals(linkElement,atomEntry.getLinkElement());
+	}
+
+	public void testGetATOMId() {
+       assertNull(atomEntry.getATOMId());
+      atomid = new ATOMID("id");
+
+      atomEntry.setATOMId(atomid);
+        assertEquals(atomid,atomEntry.getATOMId());
+	}
+
+	public void testSetATOMId() {
+        atomid = new ATOMID("id");
+        atomEntry.setATOMId(atomid);
+        assertEquals(atomid,atomEntry.getATOMId());
+        atomid.setId("newId");
+        ATOMID atomidNew =new ATOMID("newId");
+        assertEquals(atomidNew.getId(),atomid.getId());
+        assertNotSame("id",atomid.getId());
+        assertEquals(atomidNew.getId(),atomEntry.getATOMId().getId());
+
+	}
+
+}



Mime
View raw message