Examples of SyndContent


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

            entry.setTitle("Feature A");
            entry.setLink("http://geoserver.org/a");
            entry.setPublishedDate(DATE_PARSER.parse("2004-06-08"));
           
            //encode the content as the wfs transcation
            SyndContent description = new SyndContentImpl();
            description.setType("text/xml");
            description.setValue(encodeTransaction( e ));

            // GeoRSSModule geoInfo = new W3CGeoModuleImpl();
            // Polygon bounds = new Polygon();
            // PositionList exterior = new PositionList();
            // double minLat = 0, minLong = 0, maxLat = 0, maxLong = 0;
View Full Code Here

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

    }

    protected void addMessageToFeed(SyndFeed feed, MessageExchange exchange, NormalizedMessage message) throws TransformerException, MessagingException {
        List entries = feed.getEntries();
        SyndEntry entry = createEntry(exchange, message);
        SyndContent description = createEntryContent(exchange, message);
        entry.setDescription(description);
       
        // TODO this line really should work but for some reason it doesn't
        // entries.add(0, entry);
       
View Full Code Here

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

        entry.setPublishedDate(new Date());
        return entry;
    }

    protected SyndContent createEntryContent(MessageExchange exchange, NormalizedMessage message) throws TransformerException, MessagingException {
        SyndContent description = new SyndContentImpl();
        description.setType(contentType);
        Source content = message.getContent();

        String value = ExpressionHelper.asString(getEntryValue(), exchange, message, null);
        if (value == null && content != null) {
            value = getSourceTransformer().toString(content);
            value = encodeContent(value);
        }
        if (value != null) {
            description.setValue(value);
        }
        return description;
    }
View Full Code Here

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

        entry.setTitle("Changes to " + evt.getLayerName().getLocalPart());
        // entry.setLink("http://geoserver.org/a");
        entry.setPublishedDate(new Date());

        //encode the content as the wfs transcation
        SyndContent description = new SyndContentImpl();
        description.setType("text/xml");
        description.setValue(encodeTransaction( evt ));

        // attach the content to the entry
        List contents = new ArrayList();
        contents.add(description);
        entry.setContents(contents);
View Full Code Here

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

    public void renderMessage(PrintWriter writer, HttpServletRequest request, HttpServletResponse response, QueueBrowser browser, Message message) throws JMSException {
        SyndFeed feed = getFeed(browser, request);

        List<SyndEntry> entries = feed.getEntries();
        SyndEntry entry = createEntry(browser, message, request);
        SyndContent description = createEntryContent(browser, message, request);
        entry.setDescription(description);
        entries.add(entry);
    }
View Full Code Here

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

        entry.setPublishedDate(new Date());
        return entry;
    }

    protected SyndContent createEntryContent(QueueBrowser browser, Message message, HttpServletRequest request) throws JMSException {
        SyndContent description = new SyndContentImpl();
        description.setType(entryContentType);

        if (message instanceof TextMessage) {
            String text = ((TextMessage)message).getText();
            description.setValue(text);
        }
        return description;
    }
View Full Code Here

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

        for (Iterator i = entries.iterator(); i.hasNext();) {
            SyndEntry entry = (SyndEntry) i.next();
            String link = entry.getLink();
            if (link == null)
                continue;
            SyndContent description = entry.getDescription();

            String title = stripTags(entry.getTitleEx());
            xhtml.startElement("a", "href", link);
            xhtml.characters(title);
            xhtml.endElement("a");
            xhtml.startElement("p");
            if (description != null)
                xhtml.characters(description.getValue());
            xhtml.endElement("p");
        }

        xhtml.endDocument();
    }
View Full Code Here

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

            QueueBrowser browser, Message message) throws JMSException {
        SyndFeed feed = getFeed(browser, request);

        List entries = feed.getEntries();
        SyndEntry entry = createEntry(browser, message, request);
        SyndContent description = createEntryContent(browser, message, request);
        entry.setDescription(description);
        entries.add(entry);
    }
View Full Code Here

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

        entry.setPublishedDate(new Date());
        return entry;
    }

    protected SyndContent createEntryContent(QueueBrowser browser, Message message, HttpServletRequest request) throws JMSException {
        SyndContent description = new SyndContentImpl();
        description.setType(entryContentType);

        if (message instanceof TextMessage) {
            String text = ((TextMessage) message).getText();
            description.setValue(text);
        }
        return description;
    }
View Full Code Here

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

                if (link != null) {
                    xhtml.startElement("li");
                    xhtml.startElement("a", "href", link);
                    xhtml.characters(stripTags(entry.getTitleEx()));
                    xhtml.endElement("a");
                    SyndContent content = entry.getDescription();
                    if (content != null) {
                        xhtml.newline();
                        xhtml.characters(content.getValue());
                    }
                    xhtml.endElement("li");
                }
            }
            xhtml.endElement("ul");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.