Package org.apache.abdera.model

Examples of org.apache.abdera.model.Content

Per RFC4287:

 The "atom:content" element either contains or links to the content of the entry.  The content of atom:content is Language-Sensitive. atomInlineTextContent = element atom:content { atomCommonAttributes, attribute type { "text" | "html" }?, (text) } atomInlineXHTMLContent = element atom:content { atomCommonAttributes, attribute type { "xhtml" }, xhtmlDiv } atomInlineOtherContent = element atom:content { atomCommonAttributes, attribute type { atomMediaType }?, (text|anyElement) } atomOutOfLineContent = element atom:content { atomCommonAttributes, attribute type { atomMediaType }?, attribute src { atomUri }, empty } atomContent = atomInlineTextContent | atomInlineXHTMLContent | atomInlineOtherContent | atomOutOfLineContent 

        Entry entry = abdera.getFactory().newEntry();
        entry.setId(id);
        entry.setTitle("customer " + value);

        Content content = this.abdera.getFactory().newContent();
        content.setContentType(Content.Type.TEXT);
        content.setValue(value);

        entry.setContentElement(content);

        entry.addLink("" + id, "edit");
        entry.addLink("" + id, "alternate");
View Full Code Here


    private Entry postEntry(String value) {
        Entry entry = abdera.newEntry();
        entry.setTitle("customer " + value);

        Content content = abdera.getFactory().newContent();
        content.setContentType(Content.Type.TEXT);
        content.setValue(value);
        entry.setContentElement(content);

        return entry;
    }
View Full Code Here

        Entry entry = factory.newEntry();
        entry.setTitle("customer " + customerName);
        entry.setUpdated(new Date());
        entry.addAuthor("Apache Tuscany");
        // ID created by collection.
        Content content = abdera.getFactory().newContent();
        content.setContentType(Content.Type.TEXT);
        content.setValue(customerName);
        entry.setContentElement(content);

        RequestOptions opts = new RequestOptions();
        final String contentType = "application/atom+xml";
        opts.setContentType(contentType);
View Full Code Here

        String customerName = "Fred Farkle";
        Entry entry = factory.newEntry();
        entry.setTitle("customer " + customerName);
        entry.setUpdated(new Date());
        entry.addAuthor("Apache Tuscany");
        Content content = abdera.getFactory().newContent();
        content.setContentType(Content.Type.TEXT);
        content.setValue(customerName);
        entry.setContentElement(content);

        RequestOptions opts = new RequestOptions();
        String contentType = "application/atom+xml";
        opts.setContentType(contentType);
View Full Code Here

    private Entry newEntry(String value) {

        Entry entry = this.abdera.newEntry();
        entry.setTitle("customer " + value);

        Content content = this.abdera.getFactory().newContent();
        content.setContentType(Content.Type.TEXT);
        content.setValue(value);

        entry.setContentElement(content);

        return entry;
    }
View Full Code Here

    private Entry updateEntry(Entry entry, String value) {

        entry.setTitle("customer " + value);

        Content content = this.abdera.getFactory().newContent();
        content.setContentType(Content.Type.TEXT);
        content.setValue(value);

        entry.setContentElement(content);

        return entry;
    }
View Full Code Here

    private Entry newEntry(String value) {
        Entry entry = abdera.newEntry();
        entry.setTitle("customer " + value);

        Content content = abdera.getFactory().newContent();
        content.setContentType(Content.Type.TEXT);
        content.setValue(value);
        entry.setContentElement(content);

        return entry;
    }
View Full Code Here

        Entry entry = abdera.getFactory().newEntry();
        entry.setId(id);
        entry.setTitle("customer " + value);

        Content content = this.abdera.getFactory().newContent();
        content.setContentType(Content.Type.TEXT);
        content.setValue(value);

        entry.setContentElement(content);

        entry.addLink("" + id, "edit");
        entry.addLink("" + id, "alternate");
View Full Code Here

        entry.addAuthor("Apache Tuscany");
        // ID created by collection.
        // entry.setId(id); // auto-provided
        // entry.addLink("" + id, "edit"); // auto-provided
        // entry.addLink("" + id, "alternate"); // auto-provided
        Content content = abdera.getFactory().newContent();
        content.setContentType(Content.Type.TEXT);
        content.setValue(customerName);
        entry.setContentElement(content);

        RequestOptions opts = new RequestOptions();
        final String contentType = "application/atom+xml";
        opts.setContentType(contentType);
View Full Code Here

        entry.addAuthor("Apache Tuscany");
        String id = eTag.substring( 1, eTag.length()-1);
        entry.setId(id); // auto-provided
        // entry.addLink("" + id, "edit"); // auto-provided
        // entry.addLink("" + id, "alternate"); // auto-provided
        Content content = abdera.getFactory().newContent();
        content.setContentType(Content.Type.TEXT);
        content.setValue(customerName);
        entry.setContentElement(content);

        RequestOptions opts = new RequestOptions();
        final String contentType = "application/atom+xml";
        opts.setContentType(contentType);
View Full Code Here

TOP

Related Classes of org.apache.abdera.model.Content

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.