Posting Atom Entries to Queso from Java(tm)

On Monday, July 17, Elias Torres, Wing Yung and I, released an openly available version of an Atom Server, called Queso. Even though we have been working on the project for just over a month, it has been a neat experience working closely with both Wing and Elias together for the first time. We maintained a tight build cycle with (hopefully) extensive test coverage that will enable us to hunt down all the bugs the Atom community finds on our server. The project could not have been achieved without the help of Matt Roy, providing constant support for the Boca RDF database. Wing and Elias include very nice descriptions of the service on their blogs so you can visit them for the overview. This short post illustrates, via a simple example, how to post a new Atom Entry to our Queso Atom Service (http://abdera.watson.ibm.com:8080/atom).

Even though the Queso Atom Server uses an RDF database with versioning and named graph support under the covers, the REST-ful interface to the server conforms to the standard Atom Publishing Protocol. The Apache Abdera Project provides a nice API for interacting with Atom servers in Java(tm). This example shows how to use the Abdera Atom Client and Abdera Atom Model to post entries to our Queso Atom Server. The code is fairly self explanatory. To run the code, download the zipped Eclipse project. It contains all the necessary dependant libraries. If you are not an Eclipse user, you can run the main program PostEntry located in lib/quesoexample.jar, making sure that all the jars in the lib folder are in your classpath.


import java.util.Date;

import org.apache.abdera.examples.appclient.AtomClient;
import org.apache.abdera.factory.Factory;
import org.apache.abdera.model.Entry;

public class PostEntry {

  public static void main(String[] args) throws Exception {

    Entry entry = Factory.INSTANCE.newEntry();
    // the entry ID will be replaced by the server
    // so it doesn't matter if it isn't unique
    entry.setId("urn:lsid:example.org:queso:entry1", false);
    entry.setTitle("My First Queso Post");
    entry.setUpdated(new Date());
    entry.addAuthor("Ben");
    entry.setContent("Queso melds together the Semantic Web" +
       " and Web 2.0 like cheese fuses the chicken" +
       " and beans in a Boca Grande Burrito");

    AtomClient client = new AtomClient();
    Entry postedEntry = client.post(
      "http://abdera.watson.ibm.com:8080/atom/example", entry).getRoot();

    System.err.println(
      "**Queso Example** Posted entry, the new id is: " + postedEntry.getId());

  }

}

10 Responses to “Posting Atom Entries to Queso from Java(tm)”

  1. Brandon Smith » Posting Atom Entries to Queso from Java Says:

    […] Into the Woods » Blog Archive » Posting Atom Entries to Queso from Java(tm) […]

  2. backseat bangers backseatbangers Says:

    backseat bangers backseatbangers…

    hottest backseat bangers backseatbangers…

  3. all iternal Says:

    All Internal…

    all internal…

  4. Selcuk Bozdag Says:

    http://abdera.watson.ibm.com:8080/atom did not work?

  5. and paxil Says:

    paxil problems paxil social

  6. overvemor Says:

    thereupon try wait preface some advanced inside of levitra at sea Viagrums because old learn humanities well levitra than hang down right forbearance

  7. Michael Says:

    Interesting - but being java-based installation would be a pain

    is there anything similar in php or perl?

  8. softoclown Says:

    Microsoft Exchange Server 2003 Enterpfise
    (nero image) 373.59 Mb
    msexchserv2003ent.nrg

    Enterprise Edition Features

    The following feature enhancements are included in Exchange Server 2003 Enterprise Edition:

    * Exchange 2003 Enterprise Edition supports up to four storage groups, with each storage group having up to five databases.
    * Database size is limited only by hardware (with a maximum size of 16 terabytes).
    * Exchange 2003 Enterprise Edition can be clustered on the Microsoft Cluster Server cluster service.
    * The X.400 connector is included.

  9. sue Says:

    informative piece there, Thanks for this.its wonderfull to see someone with a like mind.

  10. ñêà÷àòü áåñïëàòíî ìèíóñîâêè 2009 Says:

    I to like Your editing.

Leave a Reply