You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@abdera.apache.org by jm...@apache.org on 2006/11/10 21:23:28 UTC
svn commit: r473454 - in /incubator/abdera/site/trunk: docs/developers.html
docs/gettingstarted.html faq.html project.html releases.xml
Author: jmsnell
Date: Fri Nov 10 12:23:27 2006
New Revision: 473454
URL: http://svn.apache.org/viewvc?view=rev&rev=473454
Log:
Site doc updates.
Introduce a releases atom feed so folks can subscribe to releases
Added:
incubator/abdera/site/trunk/releases.xml
Modified:
incubator/abdera/site/trunk/docs/developers.html
incubator/abdera/site/trunk/docs/gettingstarted.html
incubator/abdera/site/trunk/faq.html
incubator/abdera/site/trunk/project.html
Modified: incubator/abdera/site/trunk/docs/developers.html
URL: http://svn.apache.org/viewvc/incubator/abdera/site/trunk/docs/developers.html?view=diff&rev=473454&r1=473453&r2=473454
==============================================================================
--- incubator/abdera/site/trunk/docs/developers.html (original)
+++ incubator/abdera/site/trunk/docs/developers.html Fri Nov 10 12:23:27 2006
@@ -114,15 +114,36 @@
<h3>Parsing optimizations</h3>
- <p>TBD</p>
+ <p>Abdera's default parser implementation is based on the StAX streaming
+ XML parser and can be optimized to filter out parse events a developer
+ doesn't care about.</p>
- <h2>Changing Abdera code</h2>
-
- <p>TBD</p>
+ <pre>Parser parser = Abdera.getNewParser();
+ParserOptions opts = parser.getDefaultParserOptions();
+
+// We only want to pay attention to Feed, Entry and Title elements
+ListParseFilter filter = new WhiteListParseFilter();
+filter.add(Constants.FEED);
+filter.add(Constants.ENTRY);
+filter.add(Constants.TITLE);
+opts.setParseFilter(filter);
+
+Document<Feed> doc parser.parse(input, "", opts);
+Feed feed = doc.getRoot();
+List<Entry> entries = feed.getEntries();
+
+for (Entry e : entries) {
+ System.out.println(e.getTitle());
+}</pre>
<h2>Building static extensions</h2>
- <p>TBD</p>
+ <p>Developers can work with extensions to the Atom format using either
+ the a generic, dynamic API or via static extension implementations. The
+ Abdera extensions module contains a number of examples that illustrate
+ the use of both methods.</p>
+
+ <p>TODO: Fill in the details of the ElementWrapper model</p>
<h3>The Extension Factory Model</h3>
Modified: incubator/abdera/site/trunk/docs/gettingstarted.html
URL: http://svn.apache.org/viewvc/incubator/abdera/site/trunk/docs/gettingstarted.html?view=diff&rev=473454&r1=473453&r2=473454
==============================================================================
--- incubator/abdera/site/trunk/docs/gettingstarted.html (original)
+++ incubator/abdera/site/trunk/docs/gettingstarted.html Fri Nov 10 12:23:27 2006
@@ -266,6 +266,44 @@
Document doc = enc.encrypt(feed.getDocument(), options);
doc.writeTo(System.out); // outs the encrypted XML</pre>
+ <h2>Using the Atom Publishing Protocol Client</h2>
+
+ <p>Abdera includes an Atom Publishing Protocol (APP) client that can be used to
+ access APP-based services such as Google Calendar, Blogger, Google Base,
+ Roller, etc.</p>
+
+ <pre>String start = "http://roller.example.org/app";
+
+Abdera abdera = new Abdera();
+Factory factory = abdera.getFactory();
+Entry entry = factory.newEntry();
+entry.setId(FOMHelper.generateUuid());
+entry.setUpdated(new java.util.Date());
+entry.addAuthor("James");
+entry.setTitle("Posting to Roller");
+entry.setContentAsHtml("<p>This is an example post to Roller</p>");
+
+Client client = new CommonsClient(abdera);
+client.addCredentials(
+ start, null, null,
+ new UsernamePasswordCredentials(
+ "username", "password"));
+
+// Get the collection URI from the service document
+Document<Service> service_doc = client.get(start).getDocument();
+Service service = service_doc.getRoot();
+Collection collection =
+ service.getWorkspaces().get(0)
+ .getCollections().get(0);
+String uri = collection.getHref().toString();
+
+Response response = client.post(uri, entry);
+
+if (response.getStatus() == 201)
+ System.out.println("Success!");
+else
+ System.out.println("Failed!");</pre>
+
</div>
<div id="footer">
Modified: incubator/abdera/site/trunk/faq.html
URL: http://svn.apache.org/viewvc/incubator/abdera/site/trunk/faq.html?view=diff&rev=473454&r1=473453&r2=473454
==============================================================================
--- incubator/abdera/site/trunk/faq.html (original)
+++ incubator/abdera/site/trunk/faq.html Fri Nov 10 12:23:27 2006
@@ -81,8 +81,8 @@
<dd>Apache Abdera is an effort to produce a high-performance and
functionally complete implementation of the IETF Atom Syndication
Format and Atom Publishing Protocol specifications. Initial efforts
- are focusing on a Java-language implementation. A C/C++ language
- implementation is also being considered.</dd>
+ are focusing on a Java-language implementation. C/C++ and .NET
+ implementations are also being considered.</dd>
<a name="whatisatom"></a>
<dt>What is Atom?</dt>
Modified: incubator/abdera/site/trunk/project.html
URL: http://svn.apache.org/viewvc/incubator/abdera/site/trunk/project.html?view=diff&rev=473454&r1=473453&r2=473454
==============================================================================
--- incubator/abdera/site/trunk/project.html (original)
+++ incubator/abdera/site/trunk/project.html Fri Nov 10 12:23:27 2006
@@ -91,6 +91,7 @@
<li>James M Snell</li>
<li>Elias Torres</li>
<li>Robert Yates</li>
+ <li>Ugo Cei</li>
</ul>
</div>
Added: incubator/abdera/site/trunk/releases.xml
URL: http://svn.apache.org/viewvc/incubator/abdera/site/trunk/releases.xml?view=auto&rev=473454
==============================================================================
--- incubator/abdera/site/trunk/releases.xml (added)
+++ incubator/abdera/site/trunk/releases.xml Fri Nov 10 12:23:27 2006
@@ -0,0 +1,47 @@
+<?xml version="1.0" ?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+ <id>http://incubator.apache.org/abdera/releases.xml</id>
+ <title>Apache Abdera - Releases</title>
+ <updated>2006-11-10T12:17:00-08:00</updated>
+ <author><name>Abdera PPMC</name></author>
+ <link href="http://incubator.apache.org/abdera" />
+ <link href="http://incubator.apache.org/abdera/releases.xml" rel="self" />
+ <entry>
+ <id>tag:incubator.apache.org,2006:abdera/releases/0.2.0-incubating</id>
+ <title>Abdera 0.2.0-incubating</title>
+ <updated>2006-11-10T12:17:00-08:00</updated>
+ <summary>Abdera 0.2.0-incubating Release</summary>
+ <link href="http://incubator.apache.org/abdera/" />
+ <link href="http://people.apache.org/dist/incubator/abdera/0.2.0-incubating/abdera.0.2.0-incubating.zip"
+ rel="enclosure"
+ title="Abdera 0.2.0-incubating Java 1.5"
+ type="application/zip" />
+ <link href="http://people.apache.org/dist/incubator/abdera/0.2.0-incubating/abdera.0.2.0-incubating.jdk142.zip"
+ rel="enclosure"
+ title="Abdera 0.2.0-incubating Java 1.4.2"
+ type="application/zip" />
+ <link href="http://people.apache.org/dist/incubator/abdera/0.2.0-incubating/abdera.0.2.0-incubating.src.zip"
+ rel="enclosure"
+ title="Abdera 0.2.0-incubating Source"
+ type="application/zip" />
+ </entry>
+ <entry>
+ <id>tag:incubator.apache.org,2006:abdera/releases/0.1.0-incubating</id>
+ <title>Abdera 0.1.0-incubating</title>
+ <updated>2006-11-10T12:17:00-08:00</updated>
+ <summary>Abdera 0.1.0-incubating Release</summary>
+ <link href="http://incubator.apache.org/abdera/" />
+ <link href="http://people.apache.org/dist/incubator/abdera/0.1.0-incubating/abdera.0.1.0-incubating.zip"
+ rel="enclosure"
+ title="Abdera 0.1.0-incubating Java 1.5"
+ type="application/zip" />
+ <link href="http://people.apache.org/dist/incubator/abdera/0.1.0-incubating/abdera.0.1.0-incubating.jdk142.zip"
+ rel="enclosure"
+ title="Abdera 0.1.0-incubating Java 1.4.2"
+ type="application/zip" />
+ <link href="http://people.apache.org/dist/incubator/abdera/0.1.0-incubating/abdera.0.1.0-incubating.src.zip"
+ rel="enclosure"
+ title="Abdera 0.1.0-incubating Source"
+ type="application/zip" />
+ </entry>
+</feed>
\ No newline at end of file
Re: svn commit: r473454 - in /incubator/abdera/site/trunk: docs/developers.html
docs/gettingstarted.html faq.html project.html releases.xml
Posted by James M Snell <ja...@gmail.com>.
It actually already is. There is a method on Factory for creating a new
UUID URI. That's what we should be using.
- James
Garrett Rooney wrote:
> On 11/10/06, jmsnell@apache.org <jm...@apache.org> wrote:
>
>> + <pre>String start = "http://roller.example.org/app";
>> +
>> +Abdera abdera = new Abdera();
>> +Factory factory = abdera.getFactory();
>> +Entry entry = factory.newEntry();
>> +entry.setId(FOMHelper.generateUuid());
>
> It occurs to me that this is the second time that I've seen
> FOMHelper.generateUuid() used in some example code. Perhaps we should
> consider moving it to a less parser-impl-specific location, since it
> seems generally useful.
>
> -garrett
>
Re: svn commit: r473454 - in /incubator/abdera/site/trunk: docs/developers.html docs/gettingstarted.html faq.html project.html releases.xml
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 11/10/06, jmsnell@apache.org <jm...@apache.org> wrote:
> + <pre>String start = "http://roller.example.org/app";
> +
> +Abdera abdera = new Abdera();
> +Factory factory = abdera.getFactory();
> +Entry entry = factory.newEntry();
> +entry.setId(FOMHelper.generateUuid());
It occurs to me that this is the second time that I've seen
FOMHelper.generateUuid() used in some example code. Perhaps we should
consider moving it to a less parser-impl-specific location, since it
seems generally useful.
-garrett