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 [7/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/webapp/feedList.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/feedList.jsp?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/feedList.jsp (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/feedList.jsp Fri Sep  9 00:22:16 2005
@@ -0,0 +1,96 @@
+<%@ page import="java.util.*
+                 ,
+                 org.apache.axis2.feed.aggregrator.util.FeedList,
+                 org.apache.axis2.feed.aggregrator.description.FeedDescription,
+                 java.net.URL,
+                 org.apache.axis2.feed.feedmodel.rss.impl.RSSFeed,
+                 org.apache.axis2.feed.feedmodel.rss.Channel,
+                 org.apache.axis2.feed.feedmodel.rss.impl.RSSChannel,
+                 org.apache.axis2.feed.feedmodel.rss.Item,
+                 org.apache.axis2.feed.aggregrator.description.EPRDescription,
+                 org.apache.axis2.feed.feedmodel.Feed,
+                 java.io.InputStream,
+                 java.io.BufferedInputStream,
+                 javax.xml.stream.*,
+                 org.apache.axis2.feed.feedmodel.FeedBuilder,
+                 org.apache.axis2.feed.feedmodel.AbstractBuilderFactory,
+                 org.apache.axis2.feed.feedmodel.rss.factory.RSSFactory,
+                 org.apache.axis2.feed.feedmodel.AbstractFeedFactory,
+                 java.net.MalformedURLException,
+                 java.io.IOException,
+                 org.apache.axis2.feed.aggregrator.util.RSSFeedObjectList,
+                 org.apache.axis2.feed.aggregrator.registry.*"%>
+                 
+                  <%--
+                     /*
+                  * Copyright 2002,2004 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.
+                  */
+                 --%>
+
+
+<%@ page contentType="text/html;charset=UTF-8" language="java" %><html>
+
+
+<body bgcolor="white">
+<font size=5 color="red">
+<%!
+ FeedObjectRegistry feedObjectRegistry = new RegistryImpl().getFeedObjectRegistry();
+ RSSFeedObjectList feedList =null;%>
+<%
+     if(feedObjectRegistry!=null){
+
+    feedList = feedObjectRegistry.getRssFeedObjectList();
+
+    %>
+    <table border="0" width="50%" cellspacing="1" cellpadding="1">
+    <%
+      Iterator EPRIterator =  feedObjectRegistry.getRssFeedObjectList().iterator();
+       while(EPRIterator.hasNext()){
+
+      RSSFeed  feed = (RSSFeed)EPRIterator.next();
+        %>
+
+
+        <tr>
+       <font color="blue"><%=feed.getChannel().getTitle()%></font>
+
+          <form method="get" name="veiwFeedForm" action="singalFeed.jsp">
+        <table border="0" width="100%" cellspacing="1" cellpadding="1">
+
+             <tr>
+              <input name ="feed" type="hidden" value="<%=feed.getChannel().getLink()
+               %>">
+             <td align="right">
+                 <input  name="submit" type="submit" value=" veiw " >
+             </td>
+
+             </tr>
+         </table>
+       </form>
+        <%
+           }
+         %>
+          </tr>
+
+<%
+       }
+    %>
+   
+
+
+</table>
+</font>
+</body>
+</html>

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/images/aggregator.JPG
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/images/aggregator.JPG?rev=279723&view=auto
==============================================================================
Binary file - no diff available.

Propchange: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/images/aggregator.JPG
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/images/axis.jpg
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/images/axis.jpg?rev=279723&view=auto
==============================================================================
Binary file - no diff available.

Propchange: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/images/axis.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/include/header_aggregator.inc
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/include/header_aggregator.inc?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/include/header_aggregator.inc (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/include/header_aggregator.inc Fri Sep  9 00:22:16 2005
@@ -0,0 +1,6 @@
+<table width="100%">
+  <tr>
+    <td align="left"><img src="images/aggregator.JPG"/ width="100% height="50%"><h1>Axis 2 Aggregator</h1></td>
+    <td align="right"><img src="images/axis.jpg"/></td>
+    </tr>
+</table>

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/searchByOperation.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/searchByOperation.jsp?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/searchByOperation.jsp (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/searchByOperation.jsp Fri Sep  9 00:22:16 2005
@@ -0,0 +1,104 @@
+<%@ page import="org.apache.axis2.feed.aggregrator.registry.FeedRegistry,
+                 org.apache.axis2.feed.aggregrator.registry.FeedRegistryImpl,
+                 java.util.Iterator,
+                 org.apache.axis2.feed.aggregrator.description.EPRDescription,
+                 org.apache.axis2.feed.aggregrator.registry.RegistryImpl,
+                 org.apache.axis2.feed.aggregrator.registry.FeedObjectRegistry"%>
+                  <%--
+                     /*
+                  * Copyright 2002,2004 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.
+                  */
+                 --%>
+
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<html>
+  <head><title>Search EPR</title></head>
+  <body>
+    <form method="get" name="searchForm" action="searchByOperation.jsp">
+        <table border="0" width="100%" cellspacing="1" cellpadding="1">
+            <tr>
+                <td>
+                &nbsp;
+                &nbsp;
+                </td>
+            </tr>
+            <tr>
+                <td align="right" >Operation Name :</td>
+                <td> <INPUT align="left" TYPE=TEXT NAME="OperationName">
+                </td>
+             </tr>
+
+             <tr>
+               <td colspan="2">
+                 <br>
+               </td>
+             </tr>
+             <tr>
+             <td align="right">
+                 <input  name="submit" type="submit" value=" Search  " >
+             </td>
+             <td align="left">
+                <input  name="cancel" type="reset" value=" Clear " >
+             </td>
+             </tr>
+         </table>
+       </form>
+       <%!
+          FeedRegistry feedRegistry = new RegistryImpl().getFeedRegistry();
+          String oprationName = null;
+         %><%  if(feedRegistry!=null){
+           if(request.getParameter("OperationName")!=null){
+
+             oprationName = request.getParameter("OperationName");%>
+           <%
+
+
+           %>
+            <%
+               if(feedRegistry.getEndPointList()!=null){
+                 Iterator EPRIterator =  feedRegistry.getEndPointList().iterator();
+                   if(EPRIterator!=null)
+                 while(EPRIterator.hasNext()){
+                 EPRDescription  eprDescription = (EPRDescription)EPRIterator.next();
+                 if(oprationName!=null)
+                 if(eprDescription.getOperation().equalsIgnoreCase(oprationName)){
+               %>
+                 <font color="blue"><a href="<%=eprDescription.getUrl().toString()%>"><%=eprDescription.getUrl().toString()%></a></font>
+
+               <%
+   }else{%>
+
+            <%
+           }
+        %>
+
+  <%
+       }
+           }else{
+               %>
+               <font color="red">There is no EPR in server</font>
+            <%
+           }
+           }else{
+               %>
+               <font color="red">Plase Enter Opration Name</font>
+            <%
+           }
+           }
+       %>
+     </body>
+  </html>
+
+

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/searchByService.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/searchByService.jsp?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/searchByService.jsp (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/searchByService.jsp Fri Sep  9 00:22:16 2005
@@ -0,0 +1,103 @@
+<%@ page import="org.apache.axis2.feed.aggregrator.registry.FeedRegistry,
+                 org.apache.axis2.feed.aggregrator.registry.FeedRegistryImpl,
+                 java.util.Iterator,
+                 org.apache.axis2.feed.aggregrator.description.EPRDescription,
+                 org.apache.axis2.feed.aggregrator.registry.RegistryImpl"%>
+                  <%--
+                     /*
+                  * Copyright 2002,2004 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.
+                  */
+                 --%>
+
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<html>
+  <head><title>Search EPR</title></head>
+  <body>
+    <form method="get" name="searchForm" action="searchByService.jsp">
+        <table border="0" width="100%" cellspacing="1" cellpadding="1">
+            <tr>
+                <td>
+                &nbsp;
+                &nbsp;
+                </td>
+            </tr>
+            <tr>
+                <td align="right" >Service Name :</td>
+                <td> <INPUT align="left" TYPE=TEXT NAME="ServiceName">
+                </td>
+             </tr>
+
+             <tr>
+               <td colspan="2">
+                 <br>
+               </td>
+             </tr>
+             <tr>
+             <td align="right">
+                 <input  name="submit" type="submit" value=" Search  " >
+             </td>
+             <td align="left">
+                <input  name="cancel" type="reset" value=" Clear " >
+             </td>
+             </tr>
+         </table>
+       </form>
+       <%!
+           FeedRegistry feedRegistry = new RegistryImpl().getFeedRegistry();
+          String serviceName = null;
+         %><%  if(feedRegistry!=null){
+           if(request.getParameter("ServiceName")!=null){
+
+             serviceName = request.getParameter("ServiceName");%>
+           <%
+
+
+           %>
+            <%
+               if(feedRegistry.getEndPointList()!=null){
+                 Iterator EPRIterator =  feedRegistry.getEndPointList().iterator();
+                   if(EPRIterator!=null)
+                 while(EPRIterator.hasNext()){
+                 EPRDescription  eprDescription = (EPRDescription)EPRIterator.next();
+                 if(serviceName!=null)
+                 if(eprDescription.getService().equalsIgnoreCase(serviceName)){
+               %>
+                 <br><font color="blue"><a href="<%=eprDescription.getUrl().toString()%>"><%=eprDescription.getUrl().toString()%></a></font></br>
+
+               <%
+   }else{%>
+
+            <%
+           }
+        %>
+
+  <%
+       }
+           }else{
+               %>
+               <font color="red">There is no EPR in server</font>
+            <%
+           }
+           }else{
+               %>
+               <font color="red">Plase Enter Service Name</font>
+            <%
+           }
+           }
+       %>
+     </body>
+  </html>
+
+

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/showEPRs.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/showEPRs.jsp?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/showEPRs.jsp (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/showEPRs.jsp Fri Sep  9 00:22:16 2005
@@ -0,0 +1,78 @@
+<%@ page import="java.util.*
+                 ,
+                 org.apache.axis2.feed.aggregrator.util.FeedList,
+                 org.apache.axis2.feed.aggregrator.description.FeedDescription,
+                 java.net.URL,
+                 org.apache.axis2.feed.feedmodel.rss.impl.RSSFeed,
+                 org.apache.axis2.feed.feedmodel.rss.Channel,
+                 org.apache.axis2.feed.feedmodel.rss.impl.RSSChannel,
+                 org.apache.axis2.feed.feedmodel.rss.Item,
+                 javax.xml.stream.XMLStreamWriter,
+                 javax.xml.stream.XMLOutputFactory,
+                 javax.xml.stream.XMLStreamException,
+                 org.apache.axis2.feed.aggregrator.description.EPRDescription,
+                 org.apache.axis2.feed.aggregrator.registry.*"%>
+                  <%--
+                     /*
+                  * Copyright 2002,2004 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.
+                  */
+                 --%>
+
+
+<%@ page contentType="text/html;charset=UTF-8" language="java" %><html>
+
+
+<body bgcolor="white">
+<font size=5 color="red">
+ <table border="0" width="50%" cellspacing="1" cellpadding="1">
+<%  FeedRegistry feedRegistry = new RegistryImpl().getFeedRegistry();
+    if(feedRegistry!=null){
+   
+  %>
+    <%  if( feedRegistry.getEndPointList()!=null) {
+
+
+        %>
+        <%
+
+      Iterator EPRIterator =  feedRegistry.getEndPointList().iterator();
+        if(EPRIterator!=null){
+       while(EPRIterator.hasNext()){
+
+        EPRDescription  eprDescription = (EPRDescription)EPRIterator.next();
+        %>
+
+
+        <tr>
+        <font color="blue"><a href="<%
+           if(eprDescription!=null){
+        %><%=eprDescription.getUrl().toString()%>"><%=eprDescription.getUrl().toString()%></a></font>
+
+
+          </tr>
+
+<%     }
+       }
+        }
+    }
+   
+    }
+%>
+
+
+</table>
+</font>
+</body>
+</html>

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/showFeedList.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/showFeedList.jsp?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/showFeedList.jsp (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/showFeedList.jsp Fri Sep  9 00:22:16 2005
@@ -0,0 +1,160 @@
+<%@ page import="java.util.*
+                 ,
+                 org.apache.axis2.feed.aggregrator.util.FeedList,
+                 org.apache.axis2.feed.aggregrator.description.FeedDescription,
+                 java.net.URL,
+                 org.apache.axis2.feed.feedmodel.rss.impl.RSSFeed,
+                 org.apache.axis2.feed.feedmodel.rss.Channel,
+                 org.apache.axis2.feed.feedmodel.rss.impl.RSSChannel,
+                 org.apache.axis2.feed.feedmodel.rss.Item,
+                 org.apache.axis2.feed.aggregrator.description.EPRDescription,
+                 org.apache.axis2.feed.feedmodel.Feed,
+                 java.io.InputStream,
+                 java.io.BufferedInputStream,
+                 javax.xml.stream.*,
+                 org.apache.axis2.feed.feedmodel.FeedBuilder,
+                 org.apache.axis2.feed.feedmodel.AbstractBuilderFactory,
+                 org.apache.axis2.feed.feedmodel.rss.factory.RSSFactory,
+                 org.apache.axis2.feed.feedmodel.AbstractFeedFactory,
+                 java.net.MalformedURLException,
+                 java.io.IOException,
+                 org.apache.axis2.feed.aggregrator.http.Constants,
+                 org.apache.axis2.feed.aggregrator.registry.*"%>
+                  <%--
+                     /*
+                  * Copyright 2002,2004 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.
+                  */
+                 --%>
+
+
+<%@ page contentType="text/html;charset=UTF-8" language="java" %><html>
+
+
+<body bgcolor="white">
+<font size=5 color="red">
+<%! Registry registry = new RegistryImpl();
+    FeedRegistry feedRegistry = registry.getFeedRegistry();
+ FeedObjectRegistry feedObjectRegistry = registry.getFeedObjectRegistry();%>
+  <%
+      String status = (String)request.getSession().getAttribute(Constants.IS_ADMIN);
+      if(status == null || (! status.equals("Yes"))) {
+          throw new Exception("Invalid logging");
+      }
+  %>
+<%
+     if(feedRegistry!=null){
+
+    FeedList feedList = feedRegistry.getFeedList();
+   
+    %>
+    <table border="0" width="50%" cellspacing="1" cellpadding="1">
+    <%
+      Iterator EPRIterator =  feedRegistry.getFeedList().iterator();
+       while(EPRIterator.hasNext()){
+
+      FeedDescription  feedDescription = (FeedDescription)EPRIterator.next();
+        %>
+
+
+        <tr>
+       <font color="blue"><a href="<%
+           if(feedDescription!=null &&!feedDescription.isNeverRead()){
+       %><%=feedDescription.getFeedURL().toString()%>"><%=feedDescription.getFeedURL().toString()%></a></font>
+
+          <form method="get" name="removeFeedForm" action="showFeedList.jsp">
+        <table border="0" width="100%" cellspacing="1" cellpadding="1">
+
+             <tr>
+              <input name ="feed" type="hidden" value="<%=feedDescription.getFeedURL().toString()
+               %>">
+             <td align="right">
+                 <input  name="submit" type="submit" value=" remove " >
+             </td>
+
+             </tr>
+         </table>
+       </form>
+        <%
+           }
+         %>
+          </tr>
+
+<%
+       }
+    %>
+    <%
+
+     if(request.getParameter("feed")!=null)  {
+	    feedList.removeFeed(new FeedDescription(new URL(request.getParameter("feed"))));
+
+        Feed feed = null;
+        try {
+
+            URL url = new URL(request.getParameter("feed"));
+            InputStream in = url.openStream();
+            BufferedInputStream bufIn = new BufferedInputStream(in);
+            try {
+
+                XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(bufIn);
+                FeedBuilder builder = AbstractBuilderFactory.getFeedBuilder((RSSFactory) AbstractFeedFactory.getFeedFactory("RSS"), parser);
+                feed = (RSSFeed) builder.getFeed();
+                if(feedObjectRegistry!=null)
+                feedObjectRegistry.getRssFeedObjectList().removeFeed((RSSFeed)feed);
+                  Iterator iterator1 = ((RSSFeed)feed).getChannel().getItems();
+                      while(iterator1.hasNext()){
+                        try {
+                                Item item =  (Item)iterator1.next();
+                                if(item.getGuidElement()!=null)  {
+                                feedRegistry.getEndPointList().removeEPR(new EPRDescription(new URL(item.getGuidElement().getGuid())));
+                                String eprArray [] = item.getGuidElement().getGuid().split(",");
+                                     for(int i=0;i<eprArray.length;i++){
+                                            feedRegistry.getEndPointList().removeEPR( new EPRDescription(new URL(eprArray[i])));
+
+                                          }
+                                }
+                            } catch (MalformedURLException e) {
+                                continue;
+
+                            }
+                        }
+                registry.store(feedObjectRegistry);
+                registry.store(feedRegistry);
+
+            } catch (XMLStreamException e) {
+                e.printStackTrace();
+            } catch (MalformedURLException e) {
+                e.printStackTrace();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+
+
+        } catch (MalformedURLException mue) {
+            feed=null;
+        } catch (IOException ioe) {
+            feed=null;
+
+        }
+       }
+     }
+
+  %>
+
+
+
+</table>
+</font>
+</body>
+</html>

Added: webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/singalFeed.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/singalFeed.jsp?rev=279723&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/singalFeed.jsp (added)
+++ webservices/axis2/trunk/archive/java/scratch/Google_SoC/RSS/Aggregator/webapp/singalFeed.jsp Fri Sep  9 00:22:16 2005
@@ -0,0 +1,107 @@
+
+<%@ page import="java.util.*
+                 ,
+                 org.apache.axis2.feed.aggregrator.util.FeedList,
+                 org.apache.axis2.feed.aggregrator.description.FeedDescription,
+                 java.net.URL,
+                 org.apache.axis2.feed.feedmodel.rss.impl.RSSFeed,
+                 org.apache.axis2.feed.feedmodel.rss.Channel,
+                 org.apache.axis2.feed.feedmodel.rss.impl.RSSChannel,
+                 org.apache.axis2.feed.feedmodel.rss.Item,
+                 javax.xml.stream.XMLStreamWriter,
+                 javax.xml.stream.XMLOutputFactory,
+                 javax.xml.stream.XMLStreamException,
+                 org.apache.axis2.feed.aggregrator.util.RSSFeedObjectList,
+                 org.apache.axis2.feed.aggregrator.registry.*"%>
+                  <%--
+                     /*
+                  * Copyright 2002,2004 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.
+                  */
+                 --%>
+
+
+<%@ page contentType="text/html;charset=UTF-8" language="java" %><html>
+
+
+<body bgcolor="white">
+<font size=5 color="red">
+<%!
+ FeedObjectRegistry feedObjectRegistry = new RegistryImpl().getFeedObjectRegistry();
+    RSSFeed rssFeed=null;
+    RSSFeedObjectList  feedObjectList;
+
+    %><%
+          String filePart = request.getQueryString();
+        %><%
+          if(filePart!=null){
+          String linkOfFeed = filePart.substring(filePart.lastIndexOf("linkid=") + new String("linkid=").length(), filePart.length());
+        %> 
+              <%
+        if(feedObjectRegistry!=null){
+            feedObjectList= feedObjectRegistry.getRssFeedObjectList();
+   %>
+     <%
+         if(feedObjectList!=null){
+
+         if(linkOfFeed!=null)
+            rssFeed=   feedObjectList.getFeedwithURl(linkOfFeed);
+             %>
+
+
+             <%
+         }
+         }
+
+               %>
+
+    <table border="0" width="50%" cellspacing="1" cellpadding="1">
+        <tr> <%
+              if(rssFeed!=null){
+        %>
+
+        <font color="blue"><a href="<%=rssFeed.getChannel().getLink().toString()%>"><%=rssFeed.getChannel().getTitle()%></a></font><br>
+  <%=rssFeed.getChannel().getDescription()
+        %> </br><br><hr></hr></br>
+        <%
+            Iterator iterator = rssFeed.getChannel().getItems();
+            if(iterator!=null) {
+                while(iterator.hasNext()) {
+                    Item item =(Item)iterator.next();
+                %> <tr> <font color="blue"><a href="<%
+                    if(item.getLink()!=null){
+                %><%=item.getLink().toString()%>"><%
+                    }if(item.getTitle()!=null) {
+                %><%=item.getTitle()%><%
+                    }if(item.getDescription()!=null){
+                %></a></font><br><font color="green"><%= item.getDescription()
+
+                %><%
+                    }
+                %></font> </br></tr><hr></hr>
+                    <%
+                }
+                     %>
+                <%
+            }  }
+        }
+        %>
+
+          </tr>
+         </table>
+
+
+</font>
+</body>
+</html>