Package org.apache.wink.common.model.synd

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


        SyndLink syndLink = new SyndLink();
        syndLink.setType(LINK_TYPE);
        syndLink.setRel(LINK_REL);
        syndLink.setHref(LINK_HREF);
        syndEntry.addLink(syndLink);
        SyndContent content = new SyndContent();
        content.setValue(CONTENT_TEXT);
        syndEntry.setContent(content);

        return syndEntry;
    }
View Full Code Here


        }

        // 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

    }

    @Consumes
    public void setSyndEntry(SyndEntry entry, @Context Providers providers) throws IOException {
        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

        entry.setTitle(new SyndText("My Bookmark " + bookmarkId));
        entry.setPublished(new Date());
        entry.setBase(uriInfo.getAbsolutePath().toString());

        if (content != null) {
            entry.setContent(new SyndContent(content));
        }
        return entry;
    }
View Full Code Here

        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

        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

        }

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

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

     * @throws IOException
     */
    @Consumes
    public void setSyndEntry(SyndEntry entry, @Context Providers providers) throws IOException {
        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

        }

        // 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

    }

    @Consumes
    public void setSyndEntry(SyndEntry entry, @Context Providers providers) throws IOException {
        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

TOP

Related Classes of org.apache.wink.common.model.synd.SyndContent

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.