Package com.sun.syndication.feed.synd

Examples of com.sun.syndication.feed.synd.SyndCategory


      
        List sCats = sEntry.getCategories();
        List aCats = new ArrayList();
        if (sCats != null) {
            for (Iterator iter=sCats.iterator(); iter.hasNext();) {
                SyndCategory sCat = (SyndCategory)iter.next();
                Category aCat = new Category();
                aCat.setTerm(sCat.getName());
                // TODO: aCat.setLabel(sCat.getLabel());
                aCat.setScheme(sCat.getTaxonomyUri());
                aCats.add(aCat);
            }
        }
        if (aCats.size() > 0) aEntry.setCategories(aCats);
       
View Full Code Here


    protected List createSyndCategories(List rssCats) {
        List syndCats = new ArrayList();
        for (int i=0;i<rssCats.size();i++) {
            Category rssCat = (Category) rssCats.get(i);
            SyndCategory sCat = new SyndCategoryImpl();
            sCat.setTaxonomyUri(rssCat.getDomain());
            sCat.setName(rssCat.getValue());
            syndCats.add(sCat);
        }
        return syndCats;
    }
View Full Code Here

    }

    protected List createRSSCategories(List sCats) {
        List cats = new ArrayList();
        for (int i=0;i<sCats.size();i++) {
            SyndCategory sCat = (SyndCategory) sCats.get(i);
            Category cat = new Category();
            cat.setDomain(sCat.getTaxonomyUri());
            cat.setValue(sCat.getName());
            cats.add(cat);
        }
        return cats;
    }
View Full Code Here

    protected List createSyndCategories(List rssCats) {
        List syndCats = new ArrayList();
        for (int i=0;i<rssCats.size();i++) {
            Category rssCat = (Category) rssCats.get(i);
            SyndCategory sCat = new SyndCategoryImpl();
            sCat.setTaxonomyUri(rssCat.getDomain());
            sCat.setName(rssCat.getValue());
            syndCats.add(sCat);
        }
        return syndCats;
    }
View Full Code Here

    }

    protected List createRSSCategories(List sCats) {
        List cats = new ArrayList();
        for (int i=0;i<sCats.size();i++) {
            SyndCategory sCat = (SyndCategory) sCats.get(i);
            Category cat = new Category();
            cat.setDomain(sCat.getTaxonomyUri());
            cat.setValue(sCat.getName());
            cats.add(cat);
        }
        return cats;
    }
View Full Code Here

        List categories = entry.getCategories();
        if (categories!=null) {
            List syndCategories = new ArrayList();
            for (Iterator iter=categories.iterator(); iter.hasNext();) {
                Category c = (Category)iter.next();
                SyndCategory syndCategory = new SyndCategoryImpl();
                syndCategory.setName(c.getTerm());
                syndCategory.setTaxonomyUri(c.getSchemeResolved());
                // TODO: categories MAY have labels
                //       syndCategory.setLabel(c.getLabel());
                syndCategories.add(syndCategory);
            }
            syndEntry.setCategories(syndCategories);
View Full Code Here

       
        List sCats = syndFeed.getCategories();
        List aCats = new ArrayList();
        if (sCats != null) {
            for (Iterator iter=sCats.iterator(); iter.hasNext();) {
                SyndCategory sCat = (SyndCategory)iter.next();
                Category aCat = new Category();
                aCat.setTerm(sCat.getName());
                // TODO: aCat.setLabel(sCat.getLabel());
                aCat.setScheme(sCat.getTaxonomyUri());
                aCats.add(aCat);
            }
        }
        if (aCats.size() > 0) aFeed.setCategories(aCats);
View Full Code Here

      
        List sCats = sEntry.getCategories();
        List aCats = new ArrayList();
        if (sCats != null) {
            for (Iterator iter=sCats.iterator(); iter.hasNext();) {
                SyndCategory sCat = (SyndCategory)iter.next();
                Category aCat = new Category();
                aCat.setTerm(sCat.getName());
                // TODO: aCat.setLabel(sCat.getLabel());
                aCat.setScheme(sCat.getTaxonomyUri());
                aCats.add(aCat);
            }
        }
        if (aCats.size() > 0) aEntry.setCategories(aCats);
       
View Full Code Here

        // copy categories
        if (romeEntry.getCategories().size() > 0) {
            List list = new ArrayList();
            Iterator cats = romeEntry.getCategories().iterator();
            while (cats.hasNext()) {
                SyndCategory cat = (SyndCategory)cats.next();
                list.add(cat.getName());
            }
            setCategoriesString(list);
        }
    }
View Full Code Here

    byte b[] = downloadAndSendBinary(url);
    if (b != null) {
      SyndFeed feed = input.build(new XmlReader(new ByteArrayInputStream(b)));
      setName(feed.getTitle());
      if (feed.getCategories() != null && feed.getCategories().size() > 0) {
        SyndCategory category = (SyndCategory) feed.getCategories().get(0);
        setTempCategory(category.getName());
      }
      List<SyndEntry> entries = feed.getEntries();
      for (SyndEntry entry : entries) {
        setTempItemTitle(entry.getTitle());
        setTempItemLink(entry.getLink());
View Full Code Here

TOP

Related Classes of com.sun.syndication.feed.synd.SyndCategory

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.