Examples of addAuthor()


Examples of org.apache.abdera.model.Entry.addAuthor()

    Entry entry = factory.newEntry();
    entry.setId("http://example.org/foo/entry");
    entry.setUpdated(new java.util.Date());
    entry.setTitle("This is an entry");
    entry.setContentAsXhtml("This <b>is</b> <i>markup</i>");
    entry.addAuthor("James");
    entry.addLink("http://www.example.org");

    // Prepare the encryption options
    Encryption enc = absec.getEncryption();
    EncryptionOptions options = enc.getDefaultEncryptionOptions();
View Full Code Here

Examples of org.apache.abdera.model.Entry.addAuthor()

        Factory factory = abdera.getFactory();
        String customerName = "Fred Farkle";
        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);
View Full Code Here

Examples of org.apache.abdera.model.Entry.addAuthor()

        Factory factory = abdera.getFactory();
        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);
View Full Code Here

Examples of org.apache.abdera.model.Entry.addAuthor()

        Factory factory = abdera.getFactory();
        String customerName = "Fred Farkle";
        Entry entry = factory.newEntry();
        entry.setTitle("customer " + customerName);
        entry.setUpdated(new Date());
        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();
View Full Code Here

Examples of org.apache.abdera.model.Entry.addAuthor()

        Factory factory = abdera.getFactory();
        String customerName = "Molly Ringwald";
        Entry entry = factory.newEntry();
        entry.setTitle("customer " + customerName);
        entry.setUpdated( new Date());
        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();
View Full Code Here

Examples of org.apache.abdera.model.Entry.addAuthor()

    // Create the entry to post to the collection
    Entry entry = factory.newEntry();
    entry.setId("tag:example.org,2006:foo", false);
    entry.setTitle("This is the title");
    entry.setUpdated(new Date());
    entry.addAuthor("James");
    entry.setContent("This is the content");
    report("The Entry to Post", entry.toString());
   
    // Post the entry. Be sure to grab the resolved HREF of the collection
    Document<Entry> doc = client.post(
View Full Code Here

Examples of org.apache.abdera.model.Entry.addAuthor()

        Parser parser = abdera.getParser();
        Document<Entry> document = parser.parse(connection.getInputStream());
        connection.disconnect();

        Entry e = document.getRoot();
        e.addAuthor("Tester X McTestness");

        url = new URL(generateBaseUrl() + "/packages/restPackage1/assets/model1");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setRequestMethod("PUT");
        conn.setRequestProperty("Content-type", MediaType.APPLICATION_ATOM_XML);
View Full Code Here

Examples of org.apache.abdera.model.Entry.addAuthor()

        org.apache.abdera.model.Link l = abdera.getNewFactory().newLink();
        l.setHref(generateBaseUrl() + "/packages/" + "testCreatePackageFromAtom");
        l.setRel("self");
        e.addLink(l);
        e.setSummary("updated desc for testCreatePackageFromAtom");
        e.addAuthor("Test McTesty");   
        resp = client.put(generateBaseUrl() + "/packages/testCreatePackageFromAtom", e);
        assertEquals(ResponseType.SUCCESS, resp.getType());

        //NOTE: could not figure out why the code below always returns -1 as the ResponseCode.
/*        URL url = new URL(generateBaseUrl() + "/packages/testCreatePackageFromAtom");
View Full Code Here

Examples of org.apache.abdera.model.Entry.addAuthor()

        Factory factory = abdera.getFactory();
        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);
View Full Code Here

Examples of org.apache.abdera.model.Entry.addAuthor()

        Factory factory = abdera.getFactory();
        String customerName = "Fred Farkle";
        Entry entry = factory.newEntry();
        entry.setTitle("customer " + customerName);
        entry.setUpdated(new Date());
        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();
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.