Package org.rometools.feed.module.itunes.types

Examples of org.rometools.feed.module.itunes.types.Category


                image.setAttribute("href", info.getImage().toExternalForm());
                element.addContent(image);
            }

            for (Iterator it = info.getCategories().iterator(); it.hasNext();) {
          Category cat = (Category) it.next();
                Element category = this.generateSimpleElement("category", "");
                category.setAttribute("text", cat.getName());

                if (cat.getSubcategory() != null) {
                    Element subcat = this.generateSimpleElement("category", "");
                    subcat.setAttribute("text", cat.getSubcategory().getName());
                    category.addContent(subcat);
                }

                element.addContent(category);
            }
View Full Code Here


           
            List categories = element.getChildren("category", ns);
            for (Iterator it = categories.iterator(); it.hasNext();) {
                Element category = (Element) it.next();
                if ((category != null) && (category.getAttribute("text") != null)) {
                    Category cat = new Category();
                    cat.setName(category.getAttribute("text").getValue().trim());
                   
                    Element subcategory = category.getChild("category", ns);
                   
                    if (subcategory != null && subcategory.getAttribute("text") != null) {
                        Subcategory subcat = new Subcategory();
                        subcat.setName(subcategory.getAttribute("text").getValue().trim());
                        cat.setSubcategory(subcat);
                    }
                   
                    feedInfo.getCategories().add(cat);
                }
            }
View Full Code Here

TOP

Related Classes of org.rometools.feed.module.itunes.types.Category

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.