Examples of SyndContent


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

    }

    @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

        }

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

    }

    @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

     *
     * @return the content of the resource - can be text,link or XML
     */
    public String getContent() throws IOException {

        SyndContent content = syndEntry.getContent();
        if (content != null) {

            String src = content.getSrc();
            if (src != null) {
                return src;
            }

            String type = content.getType();
            // TODO: get content using type?
            String value = String.valueOf(content.getValue());
            value = value != null ? value : "";
            if (type != null && (SyndTextType.xhtml.name().equals(type) || AtomJAXBUtils
                .isTypeXml(type))) {
                return StringEscapeUtils.escapeXml(value);
            }
View Full Code Here

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

        value.setId(getId());
        value.setPublished(getPublished());
        value.setSummary(getSummary() != null ? getSummary().toSynd(new SyndText()) : null);
        value.setTitle(getTitle() != null ? getTitle().toSynd(new SyndText()) : null);
        value.setUpdated(getUpdated());
        value.setContent(getContent() != null ? getContent().toSynd(new SyndContent()) : null);
        value.getAuthors().addAll(getAuthorsAsSynd());
        value.getCategories().addAll(getCategoriesAsSynd());
        value.getLinks().addAll(getLinksAsSynd());
        return value;
    }
View Full Code Here

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

        }

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

        if (!child) {
            entry.setBase(uriInfo.getAbsolutePath().toString());
        }
View Full Code Here

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

    }

    @Consumes
    public void setSyndEntry(SyndEntry entry, @Context Providers providers) {
        test = 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
        test =
View Full Code Here

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

        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

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

     *
     * @return the content of the resource - can be text,link or XML
     */
    public String getContent() throws IOException {

        SyndContent content = syndEntry.getContent();
        if (content != null) {

            String src = content.getSrc();
            if (src != null) {
                return src;
            }

            String type = content.getType();
            // TODO: get content using type?
            String value = String.valueOf(content.getValue());
            value = value != null ? value : "";
            if (type != null && (SyndTextType.xhtml.name().equals(type) || ModelUtils
                .isTypeXml(type))) {
                return StringEscapeUtils.escapeXml(value);
            }
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.