You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ch...@apache.org on 2005/09/09 09:25:01 UTC

svn commit: r279723 [2/7] - in /webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS: ./ Aggregator/ Aggregator/conf/ Aggregator/src/ Aggregator/src/org/ Aggregator/src/org/apache/ Aggregator/src/org/apache/axis2/ Aggregator/src/org/apache/axis2...

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/aggregrator/util/EndPointList.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/aggregrator/util/EndPointList.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/aggregrator/util/EndPointList.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/aggregrator/util/EndPointList.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,86 @@
+package org.apache.axis2.feed.aggregrator.util;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+import org.apache.axis2.feed.aggregrator.description.EPRDescription;
+import org.apache.axis2.feed.feedmodel.eprlist.builder.EPRListBuilder;
+import org.apache.axis2.feed.feedmodel.eprlist.serialize.Serializer;
+
+import javax.xml.stream.*;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+
+public class EndPointList {
+
+    private ArrayList eprList;
+
+
+    public EndPointList() {
+        eprList = new ArrayList();
+    }
+
+    public void addEPR(EPRDescription eprDescription) {
+        if (!eprList.contains(eprDescription)) {
+            eprList.add(eprDescription);
+        } else {
+            removeEPR(eprDescription);
+            eprList.add(eprDescription);
+        }
+
+    }
+
+    public void removeEPR(EPRDescription eprDescription) {
+        if (eprList.contains(eprDescription)) {
+            eprList.remove(eprDescription);
+        }
+    }
+
+    public Iterator iterator() {
+        if (!eprList.isEmpty()) {
+            return eprList.iterator();
+        }
+        return null;
+    }
+
+    public void init() throws Exception {
+        cleanUp();
+        XMLStreamReader parser;
+        parser = XMLInputFactory.newInstance().createXMLStreamReader(new FileReader(new File("EPRlist.xml")));
+        EPRListBuilder eprListBuilder;
+        eprListBuilder = new EPRListBuilder(parser);
+        eprList = eprListBuilder.getFeedList();
+
+    }
+
+    public void destroy() throws XMLStreamException, IOException {
+        Serializer serializer = new Serializer(this);
+        XMLStreamWriter writer;
+        writer = XMLOutputFactory.newInstance().createXMLStreamWriter(new FileWriter(new File("resofEpr.xml")));
+        serializer.serialize(writer);
+        writer.flush();
+    }
+
+    public void cleanUp() {
+        eprList.clear();
+    }
+
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/aggregrator/util/FeedList.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/aggregrator/util/FeedList.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/aggregrator/util/FeedList.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/aggregrator/util/FeedList.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,100 @@
+package org.apache.axis2.feed.aggregrator.util;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+import org.apache.axis2.feed.aggregrator.description.FeedDescription;
+import org.apache.axis2.feed.feedmodel.feedlist.builder.FeedListBuilder;
+import org.apache.axis2.feed.feedmodel.feedlist.serialize.Serializer;
+
+import javax.xml.stream.*;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+
+public class FeedList {
+
+    private ArrayList feedList;
+
+    public FeedList() {
+        feedList = new ArrayList();
+    }
+
+    public void addFeed(FeedDescription feedDescription) {
+        if (!feedList.contains(feedDescription)) {
+            feedList.add(feedDescription);
+        } else {
+            feedList.remove(feedDescription);
+            feedList.add(feedDescription);
+        }
+
+    }
+
+    public void removeFeed(FeedDescription feedDescription) {
+
+        if (feedList.contains(feedDescription)) {
+            feedList.remove(feedDescription);
+
+        }
+    }
+
+    public void refresh() {
+        Iterator iterator = feedList.iterator();
+        if (iterator != null) {
+            while (iterator.hasNext()) {
+                FeedDescription description = (FeedDescription) iterator.next();
+                if (description.isNeverRead()) {
+                    feedList.remove(description);
+                }
+            }
+        }
+    }
+
+    public Iterator iterator() {
+        // refresh();
+        if (feedList != null) {
+            return feedList.iterator();
+        }
+        return null;
+    }
+
+    public void init() throws Exception, XMLStreamException {
+        cleanUp();
+        XMLStreamReader parser;
+        parser = XMLInputFactory.newInstance().createXMLStreamReader(new FileReader(new File("feedlist.xml")));
+        FeedListBuilder feedListBuilder;
+        feedListBuilder = new FeedListBuilder(parser);
+        feedList = feedListBuilder.getFeedList();
+
+    }
+
+    public void destroy() throws XMLStreamException, IOException {
+
+        Serializer serializer = new Serializer(this);
+        XMLStreamWriter writer;
+        writer = XMLOutputFactory.newInstance().createXMLStreamWriter(new FileWriter(new File("resOfFEED.xml")));
+        serializer.serialize(writer);
+        writer.flush();
+    }
+
+    public void cleanUp() {
+        feedList.clear();
+    }
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/aggregrator/util/RSSFeedObjectList.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/aggregrator/util/RSSFeedObjectList.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/aggregrator/util/RSSFeedObjectList.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/aggregrator/util/RSSFeedObjectList.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,81 @@
+package org.apache.axis2.feed.aggregrator.util;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+import org.apache.axis2.feed.feedmodel.rss.impl.RSSFeed;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+
+public class RSSFeedObjectList {
+    private ArrayList rssFeedList;
+
+    public RSSFeedObjectList() {
+        rssFeedList = new ArrayList();
+    }
+
+    public void addFeed(RSSFeed rssFeed) {
+
+        if (rssFeed != null) {
+            RSSFeed feed = getFeedwithURl(rssFeed.getChannel().getLink().toString());
+            if (feed != null) {
+                rssFeedList.remove(feed);
+            }
+            rssFeedList.add(rssFeed);
+            // if (!rssFeedList.contains(rssFeed)) {
+            //     rssFeedList.add(rssFeed);
+            //  } else {
+            ///      removeFeed(rssFeed);
+            //      rssFeedList.add(rssFeed);
+            //  }
+        }
+
+    }
+
+    public void removeFeed(RSSFeed rssFeed) {
+        if (rssFeedList.contains(rssFeed)) {
+            rssFeedList.remove(rssFeed);
+        }
+    }
+
+    public void cleanUp() {
+        rssFeedList.clear();
+    }
+
+    public Iterator iterator() {
+        if (rssFeedList != null) {
+            return rssFeedList.iterator();
+        }
+        return null;
+    }
+
+    public RSSFeed getFeedwithURl(String url) {
+        if (url != null) {
+            Iterator iterator = iterator();
+            if (iterator != null) {
+                while (iterator.hasNext()) {
+                    RSSFeed rssFeed = (RSSFeed) iterator.next();
+                    if (rssFeed.getChannel().getLink().toString().equalsIgnoreCase(url)) {
+                        return rssFeed;
+                    }
+                }
+            }
+        }
+        return null;
+    }
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/disptcher/FeedDisptcher.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/disptcher/FeedDisptcher.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/disptcher/FeedDisptcher.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/disptcher/FeedDisptcher.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,80 @@
+package org.apache.axis2.feed.disptcher;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.engine.Handler;
+import org.apache.axis2.feed.aggregrator.description.EPRDescription;
+import org.apache.axis2.feed.aggregrator.registry.Registry;
+import org.apache.axis2.feed.aggregrator.registry.RegistryImpl;
+import org.apache.axis2.feed.aggregrator.util.EndPointList;
+import org.apache.axis2.handlers.AbstractHandler;
+import org.apache.axis2.util.Utils;
+
+import javax.xml.namespace.QName;
+import java.util.Iterator;
+
+
+public class FeedDisptcher extends AbstractHandler implements Handler {
+
+
+    private String eprFound(EndPointList epl, String str[]) {
+        String newEPR = null;
+        Iterator ite = epl.iterator();
+        while (ite.hasNext()) {
+            EPRDescription epd = (EPRDescription) ite.next();
+            if (str[0].equals(epd.getService()) && str[1].equals(epd.getOperation())) {
+                newEPR = epd.getUrl().toString();
+            }
+
+
+        }
+
+
+        return newEPR;
+    }
+
+    public void invoke(MessageContext msgctx) throws AxisFault {
+
+
+        if (msgctx.getServiceContext() == null || msgctx.getOperationContext() == null) {
+
+            EndpointReference toEPR = msgctx.getTo();
+            if (toEPR != null) {
+                QName serviceName = new QName(toEPR.getAddress());
+                String filePart = toEPR.getAddress();
+                String[] values = Utils.parseRequestURLForServiceAndOperation(filePart);
+
+                Registry registry = new RegistryImpl();
+                EndPointList endpl = registry.getFeedRegistry().getEndPointList();
+
+
+                String newEPR = eprFound(endpl, values);
+
+                if (newEPR != null) {
+                    throw new AxisFault(new StringBuffer().append("EPRStart::").append(newEPR).append("::EPREnd").toString());
+                }
+            }
+        }
+
+
+    }
+
+
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/AbstractBuilderFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/AbstractBuilderFactory.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/AbstractBuilderFactory.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/AbstractBuilderFactory.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,30 @@
+package org.apache.axis2.feed.feedmodel;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+import org.apache.axis2.feed.feedmodel.rss.builder.RSSFeedBuilder;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import java.net.MalformedURLException;
+
+
+public class AbstractBuilderFactory {
+    public static FeedBuilder getFeedBuilder(FeedFactory feedFactory, XMLStreamReader parser) throws MalformedURLException, XMLStreamException {
+        return new RSSFeedBuilder(feedFactory, parser);
+    }
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/AbstractFeedFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/AbstractFeedFactory.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/AbstractFeedFactory.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/AbstractFeedFactory.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,37 @@
+package org.apache.axis2.feed.feedmodel;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+import org.apache.axis2.feed.feedmodel.atom.factory.impl.ATOMFactoryImpl;
+import org.apache.axis2.feed.feedmodel.rss.factory.impl.RSSFactoryImpl;
+
+
+public class AbstractFeedFactory {
+
+    public static FeedFactory getFeedFactory(String factoryName) {
+        FeedFactory feedFac = null;
+        if (factoryName.matches("RSS")) {
+            feedFac = new RSSFactoryImpl();
+        }
+        if (factoryName.matches("ATOM")) {
+            feedFac = new ATOMFactoryImpl();
+        }
+
+        return feedFac;
+    }
+
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/Feed.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/Feed.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/Feed.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/Feed.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,25 @@
+package org.apache.axis2.feed.feedmodel;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+public interface Feed {
+
+    public abstract void serialize(XMLStreamWriter streamWriter) throws XMLStreamException;
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/FeedBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/FeedBuilder.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/FeedBuilder.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/FeedBuilder.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,28 @@
+package org.apache.axis2.feed.feedmodel;
+
+import javax.xml.stream.XMLStreamException;
+import java.net.MalformedURLException;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+public interface FeedBuilder {
+
+    public void buildFeed() throws MalformedURLException, XMLStreamException;
+
+    public Feed getFeed();
+
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/FeedContainer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/FeedContainer.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/FeedContainer.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/FeedContainer.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,29 @@
+package org.apache.axis2.feed.feedmodel;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+public interface FeedContainer {
+
+    public void addFeed(Feed feed);
+
+    public Iterator getFeedsIterator();
+
+    public ArrayList getFeeds();
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/FeedFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/FeedFactory.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/FeedFactory.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/FeedFactory.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,23 @@
+package org.apache.axis2.feed.feedmodel;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+public interface FeedFactory {
+
+    public Feed createFeed(String version);
+
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/Serializer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/Serializer.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/Serializer.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/Serializer.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,24 @@
+package org.apache.axis2.feed.feedmodel;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+public interface Serializer {
+    public abstract void serialize(XMLStreamWriter streamWriter) throws XMLStreamException;
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/ATOMConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/ATOMConstants.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/ATOMConstants.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/ATOMConstants.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,56 @@
+package org.apache.axis2.feed.feedmodel.atom;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+public interface ATOMConstants {
+
+    public static String NAMESPASE_URL = "http://ws.apache.org/axis2/feed/atom/ns#";
+    public static String NAMWSPASE_PREFIX = "axis2atom";
+
+    public static String XML_MODE_ARRTIBUTE = "xml";
+    public static String ESCAPED_MODE_ARRTIBUTE = "escaped";
+    public static String BASE64_MODE_ARRTIBUTE = "base64";
+    public static String MODE_ARRTIBUTE = "mode";
+    public static String TYPE_ARRTIBUTE = "type";
+
+    public static String AUTOR_ELEMENT_NAME = "author";
+    public static String TITLE_ELEMENT_NAME = "title";
+    public static String ID_ELEMENT_NAME = "id";
+    public static String CONTENT_ELEMENT_NAME = "content";
+    public static String SUMMARY_ELEMENT_NAME = "summary";
+    public static String TAGLINE_ELEMENT_NAME = "tagline";
+
+    public static String PERSONAL_NAME_ELEMENT_NAME = "name";
+    public static String PERSONAL_EMAIL_ELEMENT_NAME = "email";
+    public static String PERSONAL_URL_ELEMENT_NAME = "url";
+    public static String LINK_ELEMENT_NAME = "link";
+    public static String LINK_REL_ATTR = "rel";
+    public static String LINK_REL_ATTR_VALUE = "alternate";
+    public static String LINK_HERF_ATTR = "href";
+    public static String LINK_TITLE_ATTR = "title";
+    public static String LINK_TYPE_ATTR = "type";
+
+    public static String MODIFIED_DATE_ELEMET_NAME = "modified";
+    public static String ISSUED_DATE_ELEMET_NAME = "issued";
+    public static String CREATED_DATE_ELEMET_NAME = "created";
+
+    public static String ENTRY_ELEMENT_NAME = "entry";
+
+    public static String FEED_ELEMENT_NAME = "feed";
+    public static String FEED_VERSION_ATTR = "version";
+    public static String FEED_LANG_ATTR = "lang";
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/ATOMEntry.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/ATOMEntry.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/ATOMEntry.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/ATOMEntry.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,52 @@
+package org.apache.axis2.feed.feedmodel.atom;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+public interface ATOMEntry {
+    public abstract void serialize(XMLStreamWriter streamWriter) throws XMLStreamException;
+
+    public ContentElement getTitleElement();
+
+    public void setTitleElement(ContentElement titleElement);
+
+    public DateElement getModifiedElement();
+
+    public void setModifiedElement(DateElement modifiedElement);
+
+    public LinkElement getLinkElement();
+
+    public void setLinkElement(LinkElement linkElement);
+
+    public DateElement getIssuedElement();
+
+    public void setIssuedElement(DateElement issuedElement);
+
+    public ContentElement getAtomSummaryElement();
+
+    public void setAtomSummaryElement(ContentElement atomSummaryElement);
+
+    public ContentElement getAtomContentElement();
+
+    public void setAtomContentElement(ContentElement atomContentElement);
+
+    public IDElement getATOMId();
+
+    public void setATOMId(IDElement ATOMId);
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/ATOMFeed.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/ATOMFeed.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/ATOMFeed.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/ATOMFeed.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,57 @@
+package org.apache.axis2.feed.feedmodel.atom;
+
+import org.apache.axis2.feed.feedmodel.atom.impl.ATOMAuthorElement;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import java.util.Iterator;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+public interface ATOMFeed {
+    public abstract void serialize(XMLStreamWriter streamWriter) throws XMLStreamException;
+
+    public void addEntry(ATOMEntry entryElement);
+
+    public void remove(ATOMEntry atomEntry);
+
+    public Iterator getEntries();
+
+    public ContentElement getTitleElement();
+
+    public void setTitleElement(ContentElement titleElement);
+
+    public DateElement getModifiedElement();
+
+    public void setModifiedElement(DateElement modifiedElement);
+
+    public LinkElement getLinkElement();
+
+    public void setLinkElement(LinkElement linkElement);
+
+    public IDElement getIdElement();
+
+    public void setIdElement(IDElement idElement);
+
+    public ATOMAuthorElement getAuthorElement();
+
+    public void setAuthorElement(ATOMAuthorElement authorElement);
+
+    public String getVersionAttr();
+
+    public void setVersionAttr(String versionAttr);
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/ContentElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/ContentElement.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/ContentElement.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/ContentElement.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,37 @@
+package org.apache.axis2.feed.feedmodel.atom;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+public interface ContentElement {
+    public abstract void serialize(XMLStreamWriter streamWriter) throws XMLStreamException;
+
+    public TypeAttribute getTypeAttribute();
+
+    public void setTypeAttribute(TypeAttribute typeAttribute);
+
+    public ModeAttribute getModeAttribute();
+
+
+    public void setModeAttribute(ModeAttribute modeAttribute);
+
+    public String getContent();
+
+    public void setContent(String content);
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/DateElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/DateElement.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/DateElement.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/DateElement.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,31 @@
+package org.apache.axis2.feed.feedmodel.atom;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import java.util.Date;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+public interface DateElement {
+
+    public abstract void serialize(XMLStreamWriter streamWriter) throws XMLStreamException;
+
+    public Date getDate();
+
+    public void setDate(Date date);
+
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/IDElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/IDElement.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/IDElement.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/IDElement.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,28 @@
+package org.apache.axis2.feed.feedmodel.atom;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+public interface IDElement {
+    public abstract void serialize(XMLStreamWriter streamWriter) throws XMLStreamException;
+
+    public String getId();
+
+    public void setId(String id);
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/LinkElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/LinkElement.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/LinkElement.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/LinkElement.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,41 @@
+package org.apache.axis2.feed.feedmodel.atom;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+
+public interface LinkElement {
+    public abstract void serialize(XMLStreamWriter streamWriter) throws XMLStreamException;
+
+    public String getRelAttribute();
+
+    public void setRelAttribute(String relAttribute);
+
+    public String getTypeAttribute();
+
+    public void setTypeAttribute(String typeAttribute);
+
+    public String getTitleAttribute();
+
+    public void setTitleAttribute(String titleAttribute);
+
+    public String getHerfAttribute();
+
+    public void setHerfAttribute(String herfAttribute);
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/ModeAttribute.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/ModeAttribute.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/ModeAttribute.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/ModeAttribute.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,29 @@
+package org.apache.axis2.feed.feedmodel.atom;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+
+public interface ModeAttribute {
+    public abstract void serialize(XMLStreamWriter streamWriter) throws XMLStreamException;
+
+    public String getMode();
+
+    public void setMode(String mode);
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/PersonalElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/PersonalElement.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/PersonalElement.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/PersonalElement.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,40 @@
+package org.apache.axis2.feed.feedmodel.atom;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+
+public interface PersonalElement {
+    public abstract void serialize(XMLStreamWriter streamWriter) throws XMLStreamException;
+
+
+    public PersonalNameElement getName();
+
+    public void setName(PersonalNameElement name);
+
+    public PersonalURLElement getURL();
+
+    public void setURL(PersonalURLElement URL);
+
+    public PersonalEmailElement getEmail();
+
+    public void setEmail(PersonalEmailElement email);
+
+
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/PersonalEmailElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/PersonalEmailElement.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/PersonalEmailElement.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/PersonalEmailElement.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,29 @@
+package org.apache.axis2.feed.feedmodel.atom;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+
+public interface PersonalEmailElement {
+    public abstract void serialize(XMLStreamWriter streamWriter) throws XMLStreamException;
+
+    public String getEmail();
+
+    public void setEmail(String email);
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/PersonalNameElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/PersonalNameElement.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/PersonalNameElement.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/PersonalNameElement.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,29 @@
+package org.apache.axis2.feed.feedmodel.atom;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+
+public interface PersonalNameElement {
+    public abstract void serialize(XMLStreamWriter streamWriter) throws XMLStreamException;
+
+    public String getName();
+
+    public void setName(String name);
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/PersonalURLElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/PersonalURLElement.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/PersonalURLElement.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/PersonalURLElement.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,30 @@
+package org.apache.axis2.feed.feedmodel.atom;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import java.net.URL;
+
+
+public interface PersonalURLElement {
+    public abstract void serialize(XMLStreamWriter streamWriter) throws XMLStreamException;
+
+    public URL getUrl();
+
+    public void setUrl(URL url);
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/TypeAttribute.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/TypeAttribute.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/TypeAttribute.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/TypeAttribute.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,29 @@
+package org.apache.axis2.feed.feedmodel.atom;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+
+public interface TypeAttribute {
+    public abstract void serialize(XMLStreamWriter streamWriter) throws XMLStreamException;
+
+    public String getMediaType();
+
+    public void setMediaType(String mediaType);
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/builder/ATOMFeedBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/builder/ATOMFeedBuilder.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/builder/ATOMFeedBuilder.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/builder/ATOMFeedBuilder.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,302 @@
+package org.apache.axis2.feed.feedmodel.atom.builder;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+import org.apache.axis2.feed.feedmodel.FeedFactory;
+import org.apache.axis2.feed.feedmodel.atom.*;
+import org.apache.axis2.feed.feedmodel.atom.factory.ATOMFactory;
+import org.apache.axis2.feed.feedmodel.atom.impl.*;
+
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.text.DateFormat;
+import java.util.Date;
+
+
+public class ATOMFeedBuilder {
+
+    private XMLStreamReader parser;
+    private ATOMFactory factory;
+    private boolean done = false;
+
+    private String curentParentName = null;
+    private String currentElementName = null;
+    private String currentContentElementName = null;
+
+    private ATOMFeed atomFeed = null;
+    private LinkElement linkElement;
+
+    private String currentPersonalElement = null;
+    private PersonalNameElement nameElement = null;
+    private PersonalEmailElement emailElement = null;
+    private PersonalURLElement urlElement = null;
+    private ATOMAuthorElement authorElement = null;
+    private ModeAttribute mode;
+    private TypeAttribute type;
+    private ATOMTitleElement titleElement = null;
+    private ATOMModifiedElement modifiedElement = null;
+    private ATOMIssuedElement issuedElement = null;
+    private ATOMCreatedElement createdElement = null;
+    private ATOMID atomid = null;
+    private String track = "default";
+    private String version = null;
+    private ATOMEntry atomEntry = null;
+
+    public ATOMFeedBuilder(FeedFactory factory, XMLStreamReader parser) {
+        this.parser = parser;
+        this.factory = (ATOMFactory) factory;
+    }
+
+    public int next() throws Exception {
+        try {
+            if (done) {
+                throw new Exception();
+            }
+            int token = parser.next();
+
+            switch (token) {
+                case XMLStreamConstants.START_ELEMENT:
+
+                    createFeed();
+                    break;
+                case XMLStreamConstants.CHARACTERS:
+                    handleCharacters();
+                    break;
+                case XMLStreamConstants.END_ELEMENT:
+                    processEndEvent();
+                    break;
+                case XMLStreamConstants.END_DOCUMENT:
+
+                    done = true;
+                    break;
+                case XMLStreamConstants.SPACE:
+                    next();
+                    break;
+                default :
+                    throw new Exception();
+            }
+            return token;
+        } catch (Exception e) {
+            throw new Exception(e);
+        }
+    }
+
+    public ATOMFeed getFeed() throws Exception {
+        while (!done) {
+            next();
+        }
+        return atomFeed;
+    }
+
+    private void processEndEvent() {
+
+        currentElementName = parser.getLocalName();
+        if (currentElementName.equalsIgnoreCase(ATOMConstants.FEED_ELEMENT_NAME)) {
+            if (track.equalsIgnoreCase("default")) {
+                if (version != null & titleElement != null & modifiedElement != null & linkElement != null & authorElement != null)
+                    atomFeed = factory.createFeedElement(version, titleElement, modifiedElement, linkElement, authorElement);
+                track = "atom";
+                modifiedElement = null;
+                titleElement = null;
+                linkElement = null;
+                authorElement = null;
+
+            }
+        }
+        if (currentElementName.equalsIgnoreCase(ATOMConstants.TITLE_ELEMENT_NAME)) {
+
+            currentContentElementName = null;
+        }
+        if (currentElementName.equalsIgnoreCase(ATOMConstants.AUTOR_ELEMENT_NAME)) {
+
+            currentPersonalElement = null;
+            nameElement = null;
+            emailElement = null;
+            urlElement = null;
+        }
+
+        if (currentElementName.equalsIgnoreCase(ATOMConstants.ENTRY_ELEMENT_NAME)) {
+            if (titleElement != null & modifiedElement != null & linkElement != null & issuedElement != null) {
+                atomEntry = factory.createEntryElement(titleElement, modifiedElement, linkElement, issuedElement);
+
+                if (atomid != null) {
+                    atomEntry.setATOMId(atomid);
+                }
+                atomFeed.addEntry(atomEntry);
+            }
+
+            titleElement = null;
+            modifiedElement = null;
+            linkElement = null;
+            issuedElement = null;
+            atomEntry = null;
+            atomid = null;
+
+        }
+    }
+
+    private void handleCharacters() throws MalformedURLException {
+
+        if (currentElementName.equalsIgnoreCase(ATOMConstants.PERSONAL_NAME_ELEMENT_NAME)) {
+            if (currentPersonalElement.equalsIgnoreCase(ATOMConstants.AUTOR_ELEMENT_NAME)) {
+
+                nameElement = factory.createPersonalNameElement(parser.getText());
+
+                authorElement = (ATOMAuthorElement) factory.createATOMAuthorElement(nameElement);
+
+            }
+        }
+        if (currentElementName.equalsIgnoreCase(ATOMConstants.PERSONAL_EMAIL_ELEMENT_NAME)) {
+            if (currentPersonalElement.equalsIgnoreCase(ATOMConstants.AUTOR_ELEMENT_NAME)) {
+                emailElement = factory.createPersonalEmailElement(parser.getText());
+                if (authorElement != null)
+                    authorElement.setEmail(emailElement);
+
+            }
+        }
+        if (currentElementName.equalsIgnoreCase(ATOMConstants.PERSONAL_URL_ELEMENT_NAME)) {
+            if (currentPersonalElement.equalsIgnoreCase(ATOMConstants.AUTOR_ELEMENT_NAME)) {
+
+
+                urlElement = factory.createPersonalURLElement(new URL(parser.getText()));
+                if (authorElement != null) {
+                    authorElement.setURL(urlElement);
+                }
+            }
+        }
+
+        if (currentContentElementName != null) {
+            if (currentContentElementName.equalsIgnoreCase(ATOMConstants.TITLE_ELEMENT_NAME)) {
+                titleElement = (ATOMTitleElement) factory.createATOMTitleElement(parser.getText());
+                titleElement.setModeAttribute(mode);
+                titleElement.setTypeAttribute(type);
+
+
+            }
+        }
+        if (currentElementName.equalsIgnoreCase(ATOMConstants.MODIFIED_DATE_ELEMET_NAME)) {
+            if (parser.getText() != null) {
+                try {
+                    modifiedElement = (ATOMModifiedElement) factory.createATOMModifiedElement(DateFormat.getInstance().parse(parser.getText()));
+                } catch (Exception e) {
+                    modifiedElement = (ATOMModifiedElement) factory.createATOMModifiedElement(new Date());
+
+                }
+            }
+
+        }
+        if (currentElementName.equalsIgnoreCase(ATOMConstants.ISSUED_DATE_ELEMET_NAME)) {
+            if (parser.getText() != null) {
+                try {
+                    issuedElement = (ATOMIssuedElement) factory.createATOMIsuuedElement(DateFormat.getInstance().parse(parser.getText()));
+                } catch (Exception e) {
+                    issuedElement = (ATOMIssuedElement) factory.createATOMIsuuedElement(new Date());
+
+                }
+            }
+        }
+        if (currentElementName.equalsIgnoreCase(ATOMConstants.CREATED_DATE_ELEMET_NAME)) {
+            {
+                try {
+                    createdElement = (ATOMCreatedElement) factory.createATOMCreatedElement(DateFormat.getInstance().parse(parser.getText()));
+                } catch (Exception e) {
+                    createdElement = (ATOMCreatedElement) factory.createATOMCreatedElement(new Date());
+
+                }
+            }
+        }
+        if (currentElementName.equalsIgnoreCase(ATOMConstants.ID_ELEMENT_NAME)) {
+            if (parser.getText() != null) {
+                atomid = (ATOMID) factory.createATOMIDElement(parser.getText());
+            }
+        }
+
+    }
+
+    private void createFeed() {
+        currentElementName = parser.getLocalName();
+        if (currentElementName.equalsIgnoreCase(ATOMConstants.FEED_ELEMENT_NAME)) {
+            curentParentName = currentElementName;
+            for (int i = 0; i < parser.getAttributeCount(); i++) {
+                if (parser.getAttributeLocalName(i).equalsIgnoreCase(ATOMConstants.FEED_VERSION_ATTR)) {
+                    version = parser.getAttributeValue(i);
+                }
+            }
+        }
+        if (currentElementName.equalsIgnoreCase(ATOMConstants.ENTRY_ELEMENT_NAME)) {
+            curentParentName = currentElementName;
+
+            if (track.equalsIgnoreCase("default")) {
+                if (version != null & titleElement != null & modifiedElement != null & linkElement != null & authorElement != null)
+                    atomFeed = factory.createFeedElement(version, titleElement, modifiedElement, linkElement, authorElement);
+                track = "atom";
+                modifiedElement = null;
+                titleElement = null;
+                linkElement = null;
+                authorElement = null;
+
+            }
+
+        }
+        if (currentElementName.equalsIgnoreCase(ATOMConstants.AUTOR_ELEMENT_NAME)) {
+            currentPersonalElement = currentElementName;
+
+        }
+
+        if (currentElementName.equalsIgnoreCase(ATOMConstants.TITLE_ELEMENT_NAME)) {
+            currentContentElementName = currentElementName;
+            type = null;
+            mode = null;
+            for (int i = 0; i < parser.getAttributeCount(); i++) {
+                if (parser.getAttributeLocalName(i).equalsIgnoreCase(ATOMConstants.MODE_ARRTIBUTE)) {
+                    mode = factory.createModeAttribute(parser.getAttributeValue(i));
+                }
+                if (parser.getAttributeLocalName(i).equalsIgnoreCase(ATOMConstants.TYPE_ARRTIBUTE)) {
+                    type = factory.createTypeAttribute(parser.getAttributeValue(i));
+                }
+            }
+
+        }
+        if (currentElementName.equalsIgnoreCase(ATOMConstants.LINK_ELEMENT_NAME)) {
+
+            String rel = null, type = null, herf = null, title = null;
+            for (int i = 0; i < parser.getAttributeCount(); i++) {
+                if (parser.getAttributeLocalName(i).equalsIgnoreCase(ATOMConstants.LINK_REL_ATTR)) {
+                    rel = parser.getAttributeValue(i);
+                }
+                if (parser.getAttributeLocalName(i).equalsIgnoreCase(ATOMConstants.LINK_HERF_ATTR)) {
+                    herf = parser.getAttributeValue(i);
+                }
+                if (parser.getAttributeLocalName(i).equalsIgnoreCase(ATOMConstants.LINK_TYPE_ATTR)) {
+                    type = parser.getAttributeValue(i);
+                }
+                if (parser.getAttributeLocalName(i).equalsIgnoreCase(ATOMConstants.LINK_TITLE_ATTR)) {
+                    title = parser.getAttributeValue(i);
+                }
+
+            }
+            if (rel != null & herf != null & type != null) {
+                linkElement = factory.createATOMLinkElement(rel, herf, type);
+                if (title != null) linkElement.setTitleAttribute(title);
+            }
+        }
+    }
+
+
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/factory/ATOMFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/factory/ATOMFactory.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/factory/ATOMFactory.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/factory/ATOMFactory.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,65 @@
+package org.apache.axis2.feed.feedmodel.atom.factory;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+import org.apache.axis2.feed.feedmodel.FeedFactory;
+import org.apache.axis2.feed.feedmodel.atom.*;
+import org.apache.axis2.feed.feedmodel.atom.impl.ATOMAuthorElement;
+
+import java.net.URL;
+import java.util.Date;
+
+
+public interface ATOMFactory extends FeedFactory {
+
+    public ATOMFeed createFeedElement(String versionAttr, ContentElement titleElement, DateElement modifiedElement, LinkElement linkElement, ATOMAuthorElement authorElement);
+
+    public ATOMEntry createEntryElement(ContentElement titleElement, DateElement modifiedElement, LinkElement linkElement, DateElement issuedElement);
+
+    public ContentElement createATOMTitleElement(String title);
+
+    public ContentElement createATOMContentElement(String content);
+
+    public ContentElement createATOMSummaryElement(String summary);
+
+    public ContentElement createATOMTaglineElement(String tagcontent);
+
+
+    public DateElement createATOMCreatedElement(Date date);
+
+    public DateElement createATOMIsuuedElement(Date date);
+
+    public DateElement createATOMModifiedElement(Date date);
+
+    public PersonalElement createATOMAuthorElement(PersonalNameElement name);
+
+    public PersonalEmailElement createPersonalEmailElement(String email);
+
+    public PersonalNameElement createPersonalNameElement(String name);
+
+    public PersonalURLElement createPersonalURLElement(URL url);
+
+    public IDElement createATOMIDElement(String id);
+
+    public LinkElement createATOMLinkElement(String relAttribute, String herfAttribute, String typeAttribute);
+
+    public ModeAttribute createModeAttribute(String mode);
+
+    public TypeAttribute createTypeAttribute(String mediaType);
+
+
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/factory/impl/ATOMFactoryImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/factory/impl/ATOMFactoryImpl.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/factory/impl/ATOMFactoryImpl.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/factory/impl/ATOMFactoryImpl.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,104 @@
+package org.apache.axis2.feed.feedmodel.atom.factory.impl;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+import org.apache.axis2.feed.feedmodel.Feed;
+import org.apache.axis2.feed.feedmodel.atom.*;
+import org.apache.axis2.feed.feedmodel.atom.factory.ATOMFactory;
+import org.apache.axis2.feed.feedmodel.atom.impl.*;
+
+import java.net.URL;
+import java.util.Date;
+
+
+public class ATOMFactoryImpl implements ATOMFactory {
+
+
+    public Feed createFeed(String version) {
+        return null;
+    }
+
+
+    public ATOMFeed createFeedElement(String versionAttr, ContentElement titleElement, DateElement modifiedElement, LinkElement linkElement, ATOMAuthorElement authorElement) {
+        return new ATOMFeedImpl(versionAttr, titleElement, modifiedElement, linkElement, authorElement);
+    }
+
+    public ATOMEntry createEntryElement(ContentElement titleElement, DateElement modifiedElement, LinkElement linkElement, DateElement issuedElement) {
+        return new ATOMEntryElement(titleElement, modifiedElement, linkElement, issuedElement);
+    }
+
+    public ContentElement createATOMTitleElement(String title) {
+        return new ATOMTitleElement(title);
+    }
+
+    public ContentElement createATOMSummaryElement(String summary) {
+        return new ATOMSummaryElement(summary);
+    }
+
+    public ContentElement createATOMContentElement(String content) {
+        return new ATOMContentElement(content);
+    }
+
+    public ContentElement createATOMTaglineElement(String tagcontent) {
+        return new ATOMTaglineElement(tagcontent);
+    }
+
+
+    public DateElement createATOMCreatedElement(Date date) {
+        return new ATOMCreatedElement(date);  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public DateElement createATOMIsuuedElement(Date date) {
+        return new ATOMIssuedElement(date);  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public DateElement createATOMModifiedElement(Date date) {
+        return new ATOMModifiedElement(date);  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public PersonalElement createATOMAuthorElement(PersonalNameElement name) {
+        return new ATOMAuthorElement(name);
+    }
+
+    public PersonalEmailElement createPersonalEmailElement(String email) {
+        return new PersonalEmailElementImpl(email);  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public PersonalNameElement createPersonalNameElement(String name) {
+        return new PersonalNameElementImpl(name);
+    }
+
+    public PersonalURLElement createPersonalURLElement(URL url) {
+        return new PersonalURLElementImpl(url);  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public IDElement createATOMIDElement(String id) {
+        return new ATOMID(id);  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public LinkElement createATOMLinkElement(String relAttribute, String herfAttribute, String typeAttribute) {
+        return new ATOMLinkElement(relAttribute, herfAttribute, typeAttribute);
+    }
+
+    public ModeAttribute createModeAttribute(String mode) {
+        return new ModeAttributeImpl(mode);  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public TypeAttribute createTypeAttribute(String mediaType) {
+        return new TypeAttributeImpl(mediaType);  //To change body of implemented methods use File | Settings | File Templates.
+    }
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/impl/ATOMAuthorElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/impl/ATOMAuthorElement.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/impl/ATOMAuthorElement.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/impl/ATOMAuthorElement.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,38 @@
+package org.apache.axis2.feed.feedmodel.atom.impl;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+import org.apache.axis2.feed.feedmodel.atom.ATOMConstants;
+import org.apache.axis2.feed.feedmodel.atom.PersonalNameElement;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+
+public class ATOMAuthorElement extends PersonalElementImpl {
+
+
+    public ATOMAuthorElement(PersonalNameElement name) {
+        super(name);
+    }
+
+    public void serialize(XMLStreamWriter streamWriter) throws XMLStreamException {
+        streamWriter.writeStartElement(ATOMConstants.NAMWSPASE_PREFIX, ATOMConstants.AUTOR_ELEMENT_NAME, ATOMConstants.NAMESPASE_URL);
+        super.serialize(streamWriter);
+        streamWriter.writeEndElement();
+    }
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/impl/ATOMContentElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/impl/ATOMContentElement.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/impl/ATOMContentElement.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/impl/ATOMContentElement.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,35 @@
+package org.apache.axis2.feed.feedmodel.atom.impl;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+import org.apache.axis2.feed.feedmodel.atom.ATOMConstants;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+
+public class ATOMContentElement extends ContentElementImpl {
+    public ATOMContentElement(String content) {
+        super(content);
+    }
+
+
+    public void serialize(XMLStreamWriter streamWriter) throws XMLStreamException {
+        streamWriter.writeStartElement(ATOMConstants.NAMWSPASE_PREFIX, ATOMConstants.CONTENT_ELEMENT_NAME, ATOMConstants.NAMESPASE_URL);
+        super.serialize(streamWriter);
+    }
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/impl/ATOMCreatedElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/impl/ATOMCreatedElement.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/impl/ATOMCreatedElement.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/impl/ATOMCreatedElement.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,36 @@
+package org.apache.axis2.feed.feedmodel.atom.impl;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+import org.apache.axis2.feed.feedmodel.atom.ATOMConstants;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import java.util.Date;
+
+
+public class ATOMCreatedElement extends DateElementImpl {
+    public ATOMCreatedElement(Date date) {
+        super(date);
+    }
+
+    public void serialize(XMLStreamWriter streamWriter) throws XMLStreamException {
+        streamWriter.writeStartElement(ATOMConstants.NAMWSPASE_PREFIX, ATOMConstants.CREATED_DATE_ELEMET_NAME, ATOMConstants.NAMESPASE_URL);
+
+        super.serialize(streamWriter);
+    }
+}

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/impl/ATOMEntryElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/impl/ATOMEntryElement.java?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/impl/ATOMEntryElement.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/src/org/apache/axis2/feed/feedmodel/atom/impl/ATOMEntryElement.java Fri Sep  9 00:22:16 2005
@@ -0,0 +1,147 @@
+package org.apache.axis2.feed.feedmodel.atom.impl;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* 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.
+*/
+
+import org.apache.axis2.feed.feedmodel.atom.*;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+
+public class ATOMEntryElement implements ATOMEntry {
+
+    private ContentElement titleElement;
+    private DateElement modifiedElement;
+    private LinkElement linkElement;
+    private DateElement issuedElement;
+
+    private ContentElement atomSummaryElement = null;
+    private ContentElement atomContentElement = null;
+
+    private IDElement ATOMId = null;
+
+    public ATOMEntryElement(ContentElement titleElement, DateElement modifiedElement, LinkElement linkElement, DateElement issuedElement) {
+        this.titleElement = titleElement;
+        this.modifiedElement = modifiedElement;
+        this.linkElement = linkElement;
+        this.issuedElement = issuedElement;
+    }
+
+    public void serialize(XMLStreamWriter streamWriter) throws XMLStreamException {
+        streamWriter.writeStartElement(ATOMConstants.NAMWSPASE_PREFIX, ATOMConstants.ENTRY_ELEMENT_NAME, ATOMConstants.NAMESPASE_URL);
+
+        if (titleElement != null) {
+            titleElement.serialize(streamWriter);
+        }
+        if (linkElement != null) {
+            linkElement.serialize(streamWriter);
+        }
+        if (modifiedElement != null) {
+            modifiedElement.serialize(streamWriter);
+        }
+        if (issuedElement != null) {
+            issuedElement.serialize(streamWriter);
+        }
+        if (atomContentElement != null) {
+            atomContentElement.serialize(streamWriter);
+        }
+        if (atomSummaryElement != null) {
+            atomSummaryElement.serialize(streamWriter);
+        }
+        if (ATOMId != null) {
+            ATOMId.serialize(streamWriter);
+        }
+        streamWriter.writeEndElement();
+
+    }
+
+    public ContentElement getTitleElement() {
+        return titleElement;
+    }
+
+    public void setTitleElement(ContentElement titleElement) {
+        this.titleElement = titleElement;
+    }
+
+    public DateElement getModifiedElement() {
+        return modifiedElement;
+    }
+
+    public void setModifiedElement(DateElement modifiedElement) {
+        this.modifiedElement = modifiedElement;
+    }
+
+    public LinkElement getLinkElement() {
+        return linkElement;
+    }
+
+    public void setLinkElement(LinkElement linkElement) {
+        this.linkElement = linkElement;
+    }
+
+    public DateElement getIssuedElement() {
+        return issuedElement;
+    }
+
+    public void setIssuedElement(DateElement issuedElement) {
+        this.issuedElement = issuedElement;
+    }
+
+    public ContentElement getAtomSummaryElement() {
+        return atomSummaryElement;
+    }
+
+    public void setAtomSummaryElement(ContentElement atomSummaryElement) {
+        this.atomSummaryElement = atomSummaryElement;
+    }
+
+    public ContentElement getAtomContentElement() {
+        return atomContentElement;
+    }
+
+    public void setAtomContentElement(ContentElement atomContentElement) {
+        this.atomContentElement = atomContentElement;
+    }
+
+    public IDElement getATOMId() {
+        return ATOMId;
+    }
+
+    public void setATOMId(IDElement ATOMId) {
+        this.ATOMId = ATOMId;
+    }
+
+
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof ATOMEntryElement)) return false;
+
+        final ATOMEntryElement atomEntryElement = (ATOMEntryElement) o;
+
+        if (linkElement != null ? !linkElement.equals(atomEntryElement.linkElement) : atomEntryElement.linkElement != null) return false;
+        if (titleElement != null ? !titleElement.equals(atomEntryElement.titleElement) : atomEntryElement.titleElement != null) return false;
+
+        return true;
+    }
+
+    public int hashCode() {
+        int result;
+        result = (titleElement != null ? titleElement.hashCode() : 0);
+        result = 29 * result + (linkElement != null ? linkElement.hashCode() : 0);
+        return result;
+    }
+}