Package com.sun.syndication.io

Examples of com.sun.syndication.io.FeedException


        String title = channel.getTitle();
        String link = channel.getLink();
        String description = channel.getDescription();

        if (title == null) {
            throw new FeedException("invalid RSS Channel - missing required title element");
        }
        if (link == null) {
            throw new FeedException("invalid RSS Channel - missing required link element");
        }
        if (description == null) {
            throw new FeedException("invalid RSS Channel - missing required description element");
        }
        Element channelElement = new Element("channel", RSS_NS);

        channelElement.addContent(generateSimpleElement("title", title, RSS_NS));
        channelElement.addContent(generateSimpleElement("link", link, RSS_NS));
View Full Code Here


        String description = textInput.getDescription();
        String name = textInput.getName();
        String link = textInput.getLink();

        if (title == null) {
            throw new FeedException("invalid RSS TextInput - missing required title element");
        }
        if (description == null) {
            throw new FeedException("invalid RSS TextInput - missing required description element");
        }
        if (name == null) {
            throw new FeedException("invalid RSS TextInput - missing required name element");
        }
        if (link == null) {
            throw new FeedException("invalid RSS TextInput - missing required link element");
        }

        Element textInputElement = new Element("textInput", RSS_NS);
        textInputElement.addContent(generateSimpleElement("title", title, RSS_NS));
        textInputElement.addContent(generateDescriptionElement(textInput.getDescription(), RSS_NS));
View Full Code Here

                try {
                    SAXBuilder saxBuilder = new SAXBuilder();
                    tmpDoc = saxBuilder.build(tmpDocReader);
                }
                catch (Exception ex) {
                    throw new FeedException("Invalid XML",ex);
                }

                List children = tmpDoc.getRootElement().removeContent();
                contentElement.addContent(children);
            }
View Full Code Here

        root.setNamespace(RDF_NS);
        root.addNamespaceDeclaration(RDF_NS);
        root.addNamespaceDeclaration(RSS_NS);

        if (channel == null) {
            throw new FeedException("invalid RSS Channel - missing required channel element");
        }
        root.addContent(generateChannelElement(channel));

        if (channel.getImage() != null) {
            root.addContent(generateImageElement(channel.getImage()));
View Full Code Here

        String title = channel.getTitle();
        String link = channel.getLink();
        String description = channel.getDescription();

        if (title == null) {
            throw new FeedException("invalid RSS Channel - missing required title element");
        }
        if (link == null) {
            throw new FeedException("invalid RSS Channel - missing required link element");
        }
        if (description == null) {
            throw new FeedException("invalid RSS Channel - missing required description element");
        }

        Element channelElement = new Element("channel", RSS_NS);
        channelElement.addContent(generateSimpleElement("title", title, RSS_NS));
        channelElement.addContent(generateSimpleElement("link", link, RSS_NS));
View Full Code Here

        String title = image.getTitle();
        String url = image.getUrl();
        String link = image.getLink();

        if (title == null) {
            throw new FeedException("invalid RSS Image - missing required title element");
        }
        if (url == null) {
            throw new FeedException("invalid RSS Image - missing required url element");
        }
        if (link == null) {
            throw new FeedException("invalid RSS Image - missing required link element");
        }

        Element imageElement = new Element("image", RSS_NS);
        imageElement.addContent(generateSimpleElement("title", title, RSS_NS));
        imageElement.addContent(generateSimpleElement("url", url, RSS_NS));
View Full Code Here

        String title = item.getTitle();
        String link = item.getLink();

        if (title == null) {
            throw new FeedException("invalid RSS Item - missing required title element");
        }
        if (link == null) {
            throw new FeedException("invalid RSS Item - missing required link element");
        }

        Element itemElement = new Element("item", RSS_NS);
        itemElement.addContent(generateSimpleElement("title", title, RSS_NS));
        itemElement.addContent(generateSimpleElement("link", link, RSS_NS));
View Full Code Here

        String description = textInput.getDescription();
        String name = textInput.getName();
        String link = textInput.getLink();

        if (title == null) {
            throw new FeedException("invalid RSS TextInput - missing required title element");
        }
        if (description == null) {
            throw new FeedException("invalid RSS TextInput - missing required description element");
        }
        if (name == null) {
            throw new FeedException("invalid RSS TextInput - missing required name element");
        }
        if (link == null) {
            throw new FeedException("invalid RSS TextInput - missing required link element");
        }

        Element textInputElement = new Element("textInput", RSS_NS);
        textInputElement.addContent(generateSimpleElement("title", title, RSS_NS));
        textInputElement.addContent(generateDescriptionElement(textInput.getDescription(), RSS_NS));
View Full Code Here

                try {
                    SAXBuilder saxBuilder = new SAXBuilder();
                    tmpDoc = saxBuilder.build(tmpDocReader);
                }
                catch (Exception ex) {
                    throw new FeedException("Invalid XML",ex);
                }

                List children = tmpDoc.getRootElement().removeContent();
                contentElement.addContent(children);
            }
View Full Code Here

                try {
                    SAXBuilder saxBuilder = new SAXBuilder();
                    tmpDoc = saxBuilder.build(tmpDocReader);
                }
                catch (Exception ex) {
                    throw new FeedException("Invalid XML",ex);
                }

                List children = tmpDoc.getRootElement().removeContent();
                contentElement.addContent(children);
            }
View Full Code Here

TOP

Related Classes of com.sun.syndication.io.FeedException

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.