Examples of AtomContent


Examples of org.apache.wink.common.model.atom.AtomContent

        AtomPerson author = entry.getAuthors().get(0);
        author.setName(author.getName() + "Updated");
        author.setEmail(author.getEmail() + "Updated");
        AtomText title = entry.getTitle();
        title.setValue(title.getValue() + "Updated");
        AtomContent content = entry.getContent();
        content.setValue(content.getValue() + "Updated");

        resource = client.resource(BASE_URI + "/blogs/0/entries/0");
        AtomEntry updated =
            resource.accept("application/atom+xml").contentType("application/atom+xml")
                .put(AtomEntry.class, entry);
View Full Code Here

Examples of org.apache.wink.common.model.atom.AtomContent

        AtomPerson author = entry.getAuthors().get(0);
        author.setName(author.getName() + "Updated");
        author.setEmail(author.getEmail() + "Updated");
        AtomText title = entry.getTitle();
        title.setValue(title.getValue() + "Updated");
        AtomContent content = entry.getContent();
        content.setValue(content.getValue() + "Updated");

        resource = client.resource(BASE_URI + "/blogs/0/entries/1/comments/0");
        AtomEntry updated =
            resource.accept("application/atom+xml").contentType("application/atom+xml")
                .put(AtomEntry.class, entry);
View Full Code Here

Examples of org.apache.wink.common.model.atom.AtomContent

        return false;
    }

    public static boolean isValueActuallyXml(Object source) {
        if (source instanceof AtomContent) {
            AtomContent content = (AtomContent)source;
            String type = content.getType();
            if (ModelUtils.isTypeXml(type)) {
                return true;
            }
        } else if (source instanceof AtomText) {
            AtomText text = (AtomText)source;
View Full Code Here

Examples of org.apache.wink.common.model.atom.AtomContent

        return toAtomEntry();
    }
   
    public AtomEntry toAtomEntry() {
        AtomEntry entry = new AtomEntry();
        AtomContent content = new AtomContent();
        content.setValue(this.content);
        content.setType("text");
        entry.setContent(content);
        entry.getAuthors().add(this.author.toAtomPerson());
        entry.setTitle(new AtomText(this.title));
        return entry;
    }
View Full Code Here

Examples of org.apache.wink.common.model.atom.AtomContent

        return false;
    }

    public static boolean isValueActuallyXml(Object source) {
        if (source instanceof AtomContent) {
            AtomContent content = (AtomContent)source;
            String type = content.getType();
            if (ModelUtils.isTypeXml(type)) {
                return true;
            }
        } else if (source instanceof AtomText) {
            AtomText text = (AtomText)source;
View Full Code Here

Examples of org.apache.wink.common.model.atom.AtomContent

         * We have to be careful to use the real Providers list instead of the one from the injected
         * local providers field in this class.  The injected object may be a "proxy" to the real
         * providers, and could cause an infinite loop when ModelUtils.readValue calls back through
         * the providers.
         */
        AtomContent content = atomEntry.getContent();
        if (content != null) {
            content.setProviders(RuntimeContextTLS.getRuntimeContext().getAttribute(Providers.class));
        }

        return atomEntry;
    }
View Full Code Here

Examples of org.apache.wink.common.model.atom.AtomContent

        AtomEntry entry = new AtomEntry();
        entry.setId("" + this.id);
        entry.setTitle(new AtomText(this.title));
        entry.setUpdated(this.updated);
        entry.getAuthors().add(author.toAtomPerson());
        AtomContent content = new AtomContent();
        content.setType("text");
        content.setValue(this.posting);
        entry.setContent(content);
        AtomLink link = null;
        int i = 0;
        for (Comment comment : comments) {
            link = new AtomLink();
View Full Code Here

Examples of org.apache.wink.common.model.atom.AtomContent

        return toAtomEntry();
    }
   
    public AtomEntry toAtomEntry() {
        AtomEntry entry = new AtomEntry();
        AtomContent content = new AtomContent();
        content.setValue(this.content);
        content.setType("text");
        entry.setContent(content);
        entry.getAuthors().add(this.author.toAtomPerson());
        entry.setTitle(new AtomText(this.title));
        return entry;
    }
View Full Code Here

Examples of org.apache.wink.common.model.atom.AtomContent

        @POST
        @Path("jaxbentry")
        public JAXBElement<AtomEntry> createWrappedElement(JAXBElement<AtomEntry> element) {
            AtomEntry atomEntry = new AtomEntry();
            atomEntry.setId(element.getValue().getId());
            AtomContent content = new AtomContent();
            content.setType(MediaType.APPLICATION_XML);
            Blob blob = new Blob();
            content.setValue(blob);
            atomEntry.setContent(content);
            JAXBElement<AtomEntry> wrappedEntry = new ObjectFactory().createEntry(atomEntry);
            return wrappedEntry;
        }
View Full Code Here

Examples of org.apache.wink.common.model.atom.AtomContent

        return toAtomEntry();
    }
   
    public AtomEntry toAtomEntry() {
        AtomEntry entry = new AtomEntry();
        AtomContent content = new AtomContent();
        content.setValue(this.content);
        content.setType("String");
        entry.setContent(content);
        entry.getAuthors().add(this.author.toAtomPerson());
        entry.setTitle(new AtomText(this.title));
        return entry;
    }
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.