Examples of newEntry()


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

    el = factory.newEmail();
    el.setText("a");
    assertEquals(el.getText(), "a");
    Entry entry = factory.newEntry();
    assertNotNull(entry);
    entry = factory.newEntry();
    assertNotNull(entry);
    Element ee = factory.newExtensionElement(new QName("urn:foo", "bar", "b"));
    assertNotNull(ee);
    assertEquals(ee.getQName(), new QName("urn:foo", "bar", "b"));
    Feed feed = factory.newFeed();
View Full Code Here

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

  public static void testThread() throws Exception {
   
    Abdera abdera = new Abdera();
    Factory factory = abdera.getFactory();
    Entry e1 = factory.newEntry();
    Entry e2 = factory.newEntry();
   
    e1.setId("tag:example.org,2006:first");
    e2.setId("tag:example.org,2006:second");
   
View Full Code Here

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

  public static void testThread() throws Exception {
   
    Abdera abdera = new Abdera();
    Factory factory = abdera.getFactory();
    Entry e1 = factory.newEntry();
    Entry e2 = factory.newEntry();
   
    e1.setId("tag:example.org,2006:first");
    e2.setId("tag:example.org,2006:second");
   
    ThreadHelper.addInReplyTo(e2,e1); // e2 is a response to e1
View Full Code Here

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

  public static void testMedia() throws Exception {
   
    Abdera abdera = new Abdera();
    Factory factory = abdera.getFactory();
    Entry entry = factory.newEntry();
    MediaGroup group = entry.addExtension(GROUP);
    MediaContent content = group.addExtension(CONTENT);
    content.setUrl("http://example.org");
    content.setBitrate(123);
    content.setChannels(2);
View Full Code Here

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

    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

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

    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

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

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

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

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

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

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

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

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