Package com.salas.bbutilities.opml.objects

Examples of com.salas.bbutilities.opml.objects.DirectOPMLFeed


    {
        final OPMLGuide emptyGuide = new OPMLGuide("test", null, false, null, null, false, 0, false, false, false);

        final OPMLGuide guide1 = new OPMLGuide("guide1", null, false, null, null, false, 0, false, false, false);
        final ArrayList<DefaultOPMLFeed> al1 = new ArrayList<DefaultOPMLFeed>();
        al1.add(new DirectOPMLFeed("1", "1", "1", 0, null, null, -1, null, null, null, null, null, null, false, 1, false, 0, false, 0));
        guide1.setFeeds(al1);

        final OPMLGuide[] guides = {emptyGuide, guide1};

        assertEquals(1, ImportGuidesAction.countFeeds(guides));
View Full Code Here


        final OPMLGuide g1, g2;
        final ArrayList<DefaultOPMLFeed> a1, a2;

        g1 = new OPMLGuide("g1", "icon1", false, null, null, false, 0, false, false, false);
        a1 = new ArrayList<DefaultOPMLFeed>();
        a1.add(new DirectOPMLFeed("1", "file://1", "file://1", 0, null, null, -1, null, null, null, null, null, null, false, 1, false, 0, false, 0));
        a1.add(new DirectOPMLFeed("2", "file://2", "file://2", 0, null, null, -1, null, null, null, null, null, null, false, 1, false, 0, false, 0));
        g1.setFeeds(a1);

        g2 = new OPMLGuide("g2", null, false, null, null, false, 0, false, false, false);
        a2 = new ArrayList<DefaultOPMLFeed>();
        a2.add(new DirectOPMLFeed("3", "file://3", "file://3", 0, null, null, -1, null, null, null, null, null, null, false, 1, false, 0, false, 0));
        a2.add(new DirectOPMLFeed("4", "file://4", "file://4", 0, null, null, -1, null, null, null, null, null, null, false, 1, false, 0, false, 0));
        g2.setFeeds(a2);

        final OPMLGuide[] guides = {g1, g2};

        // Put in ChannelGuideSet guide with duplicate name to check how dedupe works
View Full Code Here

        final OPMLGuide g1, g2;
        final ArrayList<DefaultOPMLFeed> a1, a2;

        g1 = new OPMLGuide("g1", "icon1", false, null, null, false, 0, false, false, false);
        a1 = new ArrayList<DefaultOPMLFeed>();
        a1.add(new DirectOPMLFeed("1", "file://1", "file://1", 0, null, null, -1, null, null, null, null, null, null, false, 1, false, 0, false, 0));
        a1.add(new DirectOPMLFeed("2", "file://2", "file://2", 0, null, null, -1, null, null, null, null, null, null, false, 1, false, 0, false, 0));
        g1.setFeeds(a1);

        g2 = new OPMLGuide("g1", null, false, null, null, false, 0, false, false, false);
        a2 = new ArrayList<DefaultOPMLFeed>();
        a2.add(new DirectOPMLFeed("3", "file://3", "file://3", 0, null, null, -1, null, null, null, null, null, null, false, 1, false, 0, false, 0));
        a2.add(new DirectOPMLFeed("4", "file://4", "file://4", 0, null, null, -1, null, null, null, null, null, null, false, 1, false, 0, false, 0));
        g2.setFeeds(a2);

        final OPMLGuide[] guides = {g1, g2};

        // Put in ChannelGuideSet guide with duplicate name to check how dedupe works
View Full Code Here

        final OPMLGuide g1, g2;
        final ArrayList<DefaultOPMLFeed> a1, a2;

        g1 = new OPMLGuide("g1", "icon1", false, null, null, false, 0, false, false, false);
        a1 = new ArrayList<DefaultOPMLFeed>();
        a1.add(new DirectOPMLFeed("1", "file://1", "file://1", 0, null, null, -1, null, null, null, null, null, null, false, 1, false, 0, false, 0));
        a1.add(new DirectOPMLFeed("2", "file://2", "file://2", 0, null, null, -1, null, null, null, null, null, null, false, 1, false, 0, false, 0));
        g1.setFeeds(a1);

        g2 = new OPMLGuide("g1", null, false, null, null, false, 0, false, false, false);
        a2 = new ArrayList<DefaultOPMLFeed>();
        a2.add(new DirectOPMLFeed("3", "file://3", "file://3", 0, null, null, -1, null, null, null, null, null, null, false, 1, false, 0, false, 0));
        a2.add(new DirectOPMLFeed("4", "file://4", "file://4", 0, null, null, -1, null, null, null, null, null, null, false, 1, false, 0, false, 0));
        g2.setFeeds(a2);

        final OPMLGuide[] guides = {g1, g2};

        // Leave cgs empty
View Full Code Here

    {
        initDB();

        final OPMLGuide guide = new OPMLGuide("g1", "icon", false, null, null, false, 0, false, false, false);
        final ArrayList<DefaultOPMLFeed> a1 = new ArrayList<DefaultOPMLFeed>();
        a1.add(new DirectOPMLFeed("1", "file://1", "file://1", 0, null, null, -1, null, null, null, null, null, null, false, 1, false, 0, false, 0));
        a1.add(new DirectOPMLFeed("2", "file://2", "file://2", 0, null, null, 1, "A", "B", "C", "D", "E", "F", false, 1, false, 0, false, 0));
        guide.setFeeds(a1);

        // Put in GuidesSet guide with duplicate name to check how dedupe works
        GuidesSet cgs = GlobalModel.SINGLETON.getGuidesSet();
        final StandardGuide g = new StandardGuide();
View Full Code Here

        assertEquals(1, lists.length);

        OPMLReadingList lst = lists[0];
        List feeds = lst.getFeeds();
        assertEquals(1, feeds.size());
        DirectOPMLFeed feed = (DirectOPMLFeed)feeds.get(0);
        assertEquals("dyn", feed.getTitle());

        feeds = opmlGuide.getFeeds();
        assertEquals(1, feeds.size());
        feed = (DirectOPMLFeed)feeds.get(0);
        assertEquals("stat", feed.getTitle());
    }
View Full Code Here

        dfeed.setXmlURL(new URL("file://stat"));

        // Set no update period
        dfeed.setUpdatePeriod(-1);

        DirectOPMLFeed ofeed = Converter.convertToOPML(dfeed);
        assertNull(ofeed.getUpdatePeriod());
       
        // Set update period
        dfeed.setUpdatePeriod(1);
        ofeed = Converter.convertToOPML(dfeed);
        assertEquals(new Long(1), ofeed.getUpdatePeriod());
    }
View Full Code Here

    /**
     * Tests creation of the guide with reading list.
     */
    public void testCreateGuideWithRL()
    {
        DirectOPMLFeed opmlFeed = new DirectOPMLFeed("Feed", "file://test", "", 1, null, null, -1,
            null, null, null, null, null, null, false, 0, false, 1, false, 0);

        OPMLReadingList opmlRL = new OPMLReadingList("ReadingList", "file://test");
        opmlRL.setFeeds(Arrays.asList(opmlFeed));

View Full Code Here

     *
     * @throws MalformedURLException in case of URL format problems.
     */
    public void testCreateFeedWithCustomModeAndType() throws MalformedURLException
    {
        DirectOPMLFeed opmlFeed = new DirectOPMLFeed("Feed", "file://test", "", 1, null, null, -1,
            null, null, null, null, null, null, false, 1, true, 2, false, 0);

        DirectFeed feed = Helper.createDirectFeed(new URL("file://test"), opmlFeed);

        assertEquals(1, feed.getType().getType());
View Full Code Here

                // Convert query feed to normal direct feed
                if (feed instanceof QueryOPMLFeed)
                {
                    QueryFeed qFeed = Helper.createQueryFeed((QueryOPMLFeed)feed);
                    feed = new DirectOPMLFeed(feed.getTitle(), qFeed.getXmlURL().toString(), null,
                        feed.getRating(), feed.getReadArticlesKeys(), feed.getPinnedArticlesKeys(), feed.getLimit(),
                        null, null, null, null, null, null, false, qFeed.getType().getType(), false, 0, null,
                        qFeed.getHandlingType().toInteger());
                }

                if (feed instanceof DirectOPMLFeed)
                {
                    DirectOPMLFeed doFeed = (DirectOPMLFeed)feed;
                    String feedURL = doFeed.getXmlURL();

                    try
                    {
                        URL url = new URL(baseURL, feedURL);
                        if (!urls.contains(url.toString()))
View Full Code Here

TOP

Related Classes of com.salas.bbutilities.opml.objects.DirectOPMLFeed

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.