KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > nava > informa > utils > RssUrlTestData


1 //
2
//Informa -- RSS Library for Java
3
//Copyright (c) 2002-2003 by Niko Schmuck
4
//
5
//Niko Schmuck
6
//http://sourceforge.net/projects/informa
7
//mailto:niko_schmuck@users.sourceforge.net
8
//
9
//This library is free software.
10
//
11
//You may redistribute it and/or modify it under the terms of the GNU
12
//Lesser General Public License as published by the Free Software Foundation.
13
//
14
//Version 2.1 of the license should be included with this distribution in
15
//the file LICENSE. If the license is not included with this distribution,
16
//you may find a copy at the FSF web site at 'www.gnu.org' or 'www.fsf.org',
17
//or you may write to the Free Software Foundation, 675 Mass Ave, Cambridge,
18
//MA 02139 USA.
19
//
20
//This library is distributed in the hope that it will be useful,
21
//but WITHOUT ANY WARRANTY; without even the implied waranty of
22
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23
//Lesser General Public License for more details.
24
//
25
package de.nava.informa.utils;
26
27 /**
28  * Handy Dandy Test Data generator. There are two ways of using this. By calling 'generate()' we
29  * just generate a stream of different rss urls to use for testing. The stream wraps around
30  * eventually. Calling reset() we start the stream up again. Or, you can just call 'get(int)' to get
31  * the nth url.
32  *
33  */

34 public class RssUrlTestData
35 {
36
37     static int current = 0;
38     static String JavaDoc[] xmlURLs = {
39             "http://www.7nights.com/asterisk/index.xml",
40             "http://barlow.typepad.com/barlowfriendz/index.rdf",
41             "http://www.edithere.com/barry/xml/rss.xml",
42             "http://cyber.law.harvard.edu/blogs/audio/lydonRss.xml",
43             "http://comdig2.de/test/issue_rss2.php?id_issue=2003.46",
44             "http://danbricklin.com/log_rss.xml",
45             "http://weblog.siliconvalley.com/column/dangillmor/index.rdf",
46             "http://blog.ziffdavis.com/coursey/Rss.aspx",
47             "http://blog.fastcompany.com/index.xml",
48             "http://isen.com/blog/index.rdf",
49             "http://weblogs.cs.cornell.edu/AllThingsDistributed/",
50             "http://seems2shel.typepad.com/itseemstome/index.rdf",
51             "http://www.zeldman.com/feed/zeldman.xml",
52             "http://joi.ito.com/index.xml",
53             "http://www.meskill.net/weblogs/index.xml",
54             "http://www.lessig.org/blog/index.rdf",
55             "http://www.librarystuff.net/index.rdf",
56             "http://www.lifewithalacrity.com/index.rdf",
57             "http://blogs.law.harvard.edu/lydon/xml/rss.xml",
58             "http://www.corante.com/many/index.rdf",
59             "http://microdoc-news.info/rss",
60             "http://novaspivack.typepad.com/nova_spivacks_weblog/index.rdf",
61             "http://blogs.osafoundation.org/mitch/index.rdf",
62             "http://www.tbray.org/ongoing/ongoing.rss",
63             "http://paolo.evectors.it/rss.xml",
64             "http://www.edventure.com/rss/R1feed.xml",
65             "http://satn.org/satn_rss.xml",
66             "http://partners.userland.com/people/docSearls.xml",
67             "http://feedster.com/blog/rss.php?version=2.0",
68             "http://www.neward.net/ted/weblog/rss.jsp",
69             "http://www.theshiftedlibrarian.com/rss.xml",
70             "http://socialsoftware.weblogsinc.com/entries.xml",
71             "http://blog.zmag.org/ttt/index.rdf",
72             "http://www.decafbad.com/blog/index.rdf",
73             "http://www.activewin.com/awin/headlines.rss",
74             "http://www.adambosworth.net/index.rdf",
75             "http://weblog.anthonyeden.com/index.xml",
76             "http://enthusiasm.cozy.org/index.rdf",
77             "http://chris.pirillo.com/index.rdf",
78             "http://cshipley.typepad.com/chris_shipley_group/index.rdf",
79             "http://reviews.cnet.com/4924-3000_7-0.xml?orderBy=-7eRating&7rType=70-80&9lwPrc=0-\\",
80             "http://www.ipadventures.com/blog/index.rdf",
81             "http://grumet.net/weblog/rsstv.xml",
82             "http://michaelthompson.org/news/gms.xml",
83             "http://www.rassoc.com/gregr/weblog/rss.aspx",
84             "http://weblog.infoworld.com/techwatch/index.rdf",
85             "http://lockergnome.com/rss/windows.php", "http://rss.lockergnome.com/feed/",
86             "http://www.lockergnome.com/lockergnome.xml", "http://blogs.it/0100198/rss.xml",
87             "http://blogs.msdn.com/michael_howard/Rss.aspx",
88             "http://rssnewsapps.ziffdavis.com/msw.xml", "http://blogs.msdn.com/MainFeed.aspx",
89             "http://www.nedbatchelder.com/blog/rss.xml",
90             "http://www.tbray.org/ongoing/ongoing.rss", "http://raindrop.msresearch.us/rss.aspx",
91             "http://www.intertwingly.net/blog/index.rss", "http://www.kunal.org/scoble/index.rdf",
92             "http://weblogs.asp.net/smguest/Rss.aspx", "http://www.telepocalypse.net/index.rdf",
93             "http://www.officeletter.com/tolrss.xml",
94             "http://www.theregister.co.uk/tonys/slashdot.rdf", "http://werbach.com/blog/rss.xml",
95             "http://www.windley.com/rss.xml"};
96
97     static public String JavaDoc get(int i)
98     {
99         return xmlURLs[i % xmlURLs.length];
100     }
101
102     static public String JavaDoc generate()
103     {
104         return get(current++);
105     }
106
107     static public void reset()
108     {
109         current = 0;
110     }
111
112 }
Popular Tags