Package org.apache.abdera.factory

Examples of org.apache.abdera.factory.Factory.newEntry()


        AbderaClient client = new AbderaClient(abdera);
        String base = "http://localhost:9002" + basePath + "/";

        // Testing of entry creation
        IRI colUri = new IRI(base).resolve("customers");
        Entry entry = factory.newEntry();
        entry.setTitle("Hmmm this is ignored right now");
        entry.setUpdated(new Date());
        entry.addAuthor("Acme Industries");
        entry.setId(factory.newUuidUri());
        entry.setSummary("Customer document");
View Full Code Here


        feed.addAuthor(FEED_AUTHOR);

        // Get all blog posts and convert to Atom entries
        final List<BlogPost> blogEntries = getAllBlogPosts();
        for (BlogPost blogEntry : blogEntries) {
            final Entry entry = factory.newEntry();
            entry.setId(nextBlogID());
            entry.addAuthor(blogEntry.getAuthor());
            entry.setTitle(blogEntry.getTitle());
            entry.setContentAsHtml(blogEntry.getContent());
            entry.setUpdated(blogEntry.getUpdated());
View Full Code Here

        try {       
            AlertsType alerts = this.alerts.getAllNewAlerts("");
           
            for( Object alertObject : alerts.getAlert() ){        
                AlertType alert = ((AlertType)alertObject);
                Entry entry = factory.newEntry();
                entry.setTitle(alert.getTitle());
                //entry.(alert.getSummary());                   
                entry.addLink(alert.getAddress());
                entry.setPublished(dateFormatter.parse(alert.getDate()));
                       
View Full Code Here

  public void testPost() throws Exception {
    System.out.println(">>>ContentNegotiationTest.testPost");
    // Testing of entry creation
    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();
View Full Code Here

    // MediaCollection role
    public Entry postMedia(String title, String slug, String contentType, InputStream media) {
        System.out.println(">>> MediaCollectionImpl.postMedia title=" + title + ", slug=" + slug + ", contentType=" + contentType );

        Factory factory = abdera.getFactory();
        Entry entry = factory.newEntry();
        // Must provide entry to media as per Atom Pub spec (http://tools.ietf.org/html/rfc5023#section-9.6)
        // <?xml version="1.0"?>
        // <entry xmlns="http://www.w3.org/2005/Atom">
        //   <title>The Beach</title> (REQUIRED)
        //   <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> (REQUIRED)
View Full Code Here

    //        </entry>   
   
    // Testing of entry creation
    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
View Full Code Here

    //         <content>Update: it's a hoax!</content>
    //       </entry>
    // Testing of entry creation
    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
View Full Code Here

    public void testModifiedGetIfNoneMatch() throws Exception {   
    System.out.println(">>>ProviderFeedEntityTagsTestCase.testFeedModifiedGetIfNoneMatch");
    // Post some new content to the feed.
    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);
View Full Code Here

        //        </entry>

        // Testing of entry creation
        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
View Full Code Here

        //         <content>Update: it's a hoax!</content>
        //       </entry>
        // Testing of entry creation
        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
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.