/*
 * Created on May 12, 2005
 *
 */
package com.kellegous.mas864.clusterss;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;

/**
 * @author knorton
 * Copyright (C) 2005 MIT Media Lab, All Right Reserved.
 */
public class Feeds {
    private static URL[]			FEEDURLS = null;
    
    private static final String[]  LABELS = new String[] {
            "Generated Feeds - 2 Trivial Clusters",
            "Generated Feeds - 3 Trivial Clusters",
            "Generated Feeds - 4 Trivial Clusters",
            "Generated Feeds - 5 Trivial Clusters",
            "Subset of my Feeds"
    };
    
    private static final String[][] FEEDS = new String[][] {
            {
                "http://dhcp-23-146.media.mit.edu/~knorton/trivial-0.xml",
                "http://dhcp-23-146.media.mit.edu/~knorton/trivial-1.xml",                
            },
            {
                "http://dhcp-23-146.media.mit.edu/~knorton/trivial-0.xml",
                "http://dhcp-23-146.media.mit.edu/~knorton/trivial-1.xml",
                "http://dhcp-23-146.media.mit.edu/~knorton/trivial-2.xml",
            },
            {
                "http://dhcp-23-146.media.mit.edu/~knorton/trivial-0.xml",
                "http://dhcp-23-146.media.mit.edu/~knorton/trivial-1.xml",
                "http://dhcp-23-146.media.mit.edu/~knorton/trivial-2.xml",
                "http://dhcp-23-146.media.mit.edu/~knorton/trivial-3.xml",                
            },
            {
                "http://dhcp-23-146.media.mit.edu/~knorton/trivial-0.xml",
                "http://dhcp-23-146.media.mit.edu/~knorton/trivial-1.xml",
                "http://dhcp-23-146.media.mit.edu/~knorton/trivial-2.xml",
                "http://dhcp-23-146.media.mit.edu/~knorton/trivial-3.xml",
                "http://dhcp-23-146.media.mit.edu/~knorton/trivial-4.xml",
            },
            {          
                "http://pimpmysafari.com/atom/",
                "http://daringfireball.net/index.xml",
                "http://developer.apple.com/rss/adcheadlines.rss",
                "http://blogs.msdn.com/oldnewthing/rss.aspx",
                "http://www.drunkenblog.com/index.rdf",
                "http://www.loudthinking.com/index.rdf",
                "http://www.sixthhappiness.ca/blog/rss.xml",
                "http://www.joelonsoftware.com/rss.xml",
                "http://simon.incutio.com/syndicate/rss1.0",
                "http://www.interact-sw.co.uk/iangblog/rss2.0",
                "http://h_a_s_h.blogspot.com/atom.xml",
                "http://www.schneier.com/blog/atom.xml",
                "http://www.forgetfoo.com/rss/",
                "http://www.kottke.org/index.xml",
                //"http://www.jasonsantamaria.com/index.rdf",
                //"http://www.mikeindustries.com/blog/index.rdf",
                //"http://www.1976design.com/blog/syndicate/main/full/atom/0.3/",
                //"http://www.mezzoblue.com/rss/index.xml",
                //"http://www.alistapart.com/articles.rdf",
                //"http://www.designbyfire.com/index.rdf",
                //"http://byrdhouse.typepad.com/byrdhouse/index.rdf",
                //"http://flickr.com/services/feeds/photos_public.gne?id=13332682@N00&format=rss_200",
                //"http://lossless.blogs.com/main/index.rdf",
                //"http://stopdesign.com/index.rdf",
                //"http://hicksdesign.co.uk/?rss=1&section=journal",
                //"http://weblogs.media.mit.edu/SIMPLICITY/index.rdf",
                //"http://www.shauninman.com/feeds/commentary.rdf",
                //"http://www.subtraction.com/index.rdf",
                //"http://www.k10k.net/feeds/rss/rss.xml",
                //"http://www.eff.org/news/index.xml",
                //"http://www.livejournal.com/~kestrell/data/rss",
                //"http://www.wired.com/news_drop/netcenter/netcenter.rdf",
                //"http://slashdot.org/rss/slashdot.rss",
                //"http://tantek.com/log/posts.atom",
                //"http://web.kellegous.com/feed/ecrits-rss.xml",
                //"http://web.kellegous.com/feed/photography-rss.xml",
                //"http://del.icio.us/rss/cameron",
                //"http://del.icio.us/rss/rocha",
                //"http://del.icio.us/rss/maku",
                //"http://del.icio.us/rss/knowuh",
                //"http://del.icio.us/rss/kellegous",
                //"http://del.icio.us/rss/arikan",
                //"http://live.curry.com/rss.xml",
                //"http://web.kellegous.com/feed/external/angrynoodle.cgi",
                //"http://noah.cx/blog/atom.xml",
                //"http://web.kellegous.com/beta/copper.cgi",
                //"http://web.mit.edu/newsoffice/mitcampus-rss.xml",
                //"http://www.overstated.net/index.xml",
                //"http://weblogs.media.mit.edu/compcult/index.rdf",
                //"http://www.nelson.monkey.org/~nelson/weblog/index.rss091",
            }
    };
    
    private Feeds() {
    }
    
    public static String[] getLabels() {
    	    return LABELS;
    }
    
    public static URL[] getFeedURLS(int index) {
        
        ArrayList ul = new ArrayList(FEEDS[index].length);
        for (int i=0;i<FEEDS[index].length;i++) {
            try {
                ul.add(new URL(FEEDS[index][i]));
            }
            catch (MalformedURLException e) {
                //Just throw it away.
            }
        }
    
        URL[] out = new URL[ul.size()];
        ul.toArray(out);
        return out;
    }
}
