Examples of SyndContent


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

    private List<SyndEntry> getEntries( List<RssFeedEntry> dataEntries )
    {
        List<SyndEntry> entries = new ArrayList<>();

        SyndEntry entry;
        SyndContent description;

        for ( RssFeedEntry dataEntry : dataEntries )
        {
            entry = new SyndEntryImpl();
            entry.setTitle( dataEntry.getTitle() );
            entry.setPublishedDate( dataEntry.getPublishedDate() );

            description = new SyndContentImpl();
            description.setType( "text/plain" );
            description.setValue( dataEntry.getDescription() );
            entry.setDescription( description );

            entries.add( entry );
        }
View Full Code Here

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

    public Object jsGet_author() {
        return entry.getAuthor();
    }

    public void jsSet_description(Object newdescription) {
        SyndContent description = new SyndContentImpl();
        description.setType("text/html");
        description.setValue(String.valueOf(newdescription));
        entry.setDescription(description);
    }
View Full Code Here

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

        entry.setDescription(description);
    }

    public String jsGet_description() {
        if (entry.getDescription() != null) {
            SyndContent description = entry.getDescription();
            return description.getValue();
        } else {
            return null;
        }

    }
View Full Code Here

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

        }
        return null;
    }

    public void jsSet_content(Object content) {
        SyndContent contents = new SyndContentImpl();
        contents.setType("text/html");
        contents.setValue(String.valueOf(content));

        ArrayList cont = new ArrayList();
        cont.add(contents);

        entry.setContents(cont);
View Full Code Here

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

        if (entry.getContents() != null) {
            ArrayList contents = (ArrayList) entry.getContents();
            Iterator iterator = contents.iterator();

            SyndContent currentContent;
            StringBuilder stringBuilder = new StringBuilder(retContent);
            while (iterator.hasNext()) {
                currentContent = (SyndContent) iterator.next();
                stringBuilder.append(" " + currentContent.getValue());
            }
            retContent = stringBuilder.toString();
        }

        if (retContent.compareTo("") == 0) {
View Full Code Here

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

    public Date jsGet_published() {
        return entry.getPublishedDate();
    }

    public void jsSet_summary(Object summary) {
        SyndContent summaryContent = new SyndContentImpl();
        summaryContent.setType("text/html");
        summaryContent.setValue(String.valueOf(summary));

        entry.setDescription(summaryContent);
    }
View Full Code Here

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

        entry.setDescription(summaryContent);
    }

    public String jsGet_summary() {
        SyndContent summaryContent = entry.getDescription();
        return summaryContent.getValue();
    }
View Full Code Here

Examples of org.apache.wink.common.model.synd.SyndContent

        }

        // serialize the defect xml
        String contentString =
            ProviderUtils.writeToString(providers, defect, MediaType.APPLICATION_XML_TYPE);
        entry.setContent(new SyndContent(contentString, MediaType.APPLICATION_XML, false));

        // set base uri if this is a standalone entry
        if (!child) {
            entry.setBase(uriInfo.getAbsolutePath().toString());
        }
View Full Code Here

Examples of org.apache.wink.common.model.synd.SyndContent

     * made (such as application/atom+xml)
     */
    @Consumes
    public void setSyndEntry(SyndEntry entry, @Context Providers providers) {
        defect = null;
        SyndContent content = entry.getContent();
        if (content == null) {
            return;
        }
        String value = content.getValue();
        String type = content.getType();
        if (value == null || !MediaType.APPLICATION_XML.equalsIgnoreCase(type)) {
            return;
        }
        // deserialize the defect xml
        defect =
View Full Code Here

Examples of org.apache.wink.common.model.synd.SyndContent

        entry.setId(bookmarkId);
        entry.setTitle(new SyndText("My Bookmark " + bookmarkId));
        entry.setPublished(new Date());

        if (content != null) {
            entry.setContent(new SyndContent(content));
        }

        if (uriInfo != null) {
            entry.setBase(uriInfo.getAbsolutePath().toString());
        }
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.