abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r482712 - in /incubator/abdera/java/branches/0.2.0-incubating/docs: building.html gettingstarted.html index.html knownissues.txt
Date Tue, 05 Dec 2006 17:10:36 GMT
Author: jmsnell
Date: Tue Dec  5 09:10:34 2006
New Revision: 482712

URL: http://svn.apache.org/viewvc?view=rev&rev=482712
Log:
Doc's were out of date. Fixed now

Modified:
    incubator/abdera/java/branches/0.2.0-incubating/docs/building.html
    incubator/abdera/java/branches/0.2.0-incubating/docs/gettingstarted.html
    incubator/abdera/java/branches/0.2.0-incubating/docs/index.html
    incubator/abdera/java/branches/0.2.0-incubating/docs/knownissues.txt

Modified: incubator/abdera/java/branches/0.2.0-incubating/docs/building.html
URL: http://svn.apache.org/viewvc/incubator/abdera/java/branches/0.2.0-incubating/docs/building.html?view=diff&rev=482712&r1=482711&r2=482712
==============================================================================
--- incubator/abdera/java/branches/0.2.0-incubating/docs/building.html (original)
+++ incubator/abdera/java/branches/0.2.0-incubating/docs/building.html Tue Dec  5 09:10:34
2006
@@ -25,7 +25,7 @@
   <!-- Header -->
   <div id="banner">
     <h1><a href="http://incubator.apache.org/abdera">Apache Abdera</a></h1>
-    <p>Version 0.1-SNAPSHOT (Incubating)</p>
+    <p>Version 0.2 (Incubating)</p>
     <hr/>
   </div>
   <div id="divider"></div>

Modified: incubator/abdera/java/branches/0.2.0-incubating/docs/gettingstarted.html
URL: http://svn.apache.org/viewvc/incubator/abdera/java/branches/0.2.0-incubating/docs/gettingstarted.html?view=diff&rev=482712&r1=482711&r2=482712
==============================================================================
--- incubator/abdera/java/branches/0.2.0-incubating/docs/gettingstarted.html (original)
+++ incubator/abdera/java/branches/0.2.0-incubating/docs/gettingstarted.html Tue Dec  5 09:10:34
2006
@@ -24,7 +24,7 @@
   <!-- Header -->
   <div id="banner">
     <h1><a href="http://incubator.apache.org/abdera">Apache Abdera</a></h1>
-    <p>Version 0.1-SNAPSHOT (Incubating)</p>
+    <p>Version 0.2 (Incubating)</p>
     <hr/>
   </div>
   <div id="divider"></div>
@@ -49,7 +49,8 @@
     instance by calling <code>Parser.INSTANCE</code>, or they may create an new
     <code>Parser</code> instance.
     
-    <pre>Parser parser = Parser.INSTANCE;
+    <pre>Abdera abdera = new Abdera();
+Parser parser = abdera.getParser();
 // or
 Parser parser = new FOMParser();
 // or
@@ -62,7 +63,7 @@
         
     <pre>URI uri = new URI("http://example.org/feed.xml");
 InputStream in = uri.toURL().openStream();
-Document&lt;Feed&gt; doc = Parser.INSTANCE.parse(in, uri);</pre>
+Document&lt;Feed&gt; doc = parser.parse(in, uri.toString());</pre>
 
     <p>The <code>uri</code> parameter on the <code>parse</code>
method establishes
     the Base URI for the parsed document and is used as the basis for relative
@@ -71,16 +72,16 @@
     <h3>Parsing an Atom Entry</h3>
     <pre>URI uri = new URI("http://example.org/entry.xml");
 InputStream in = uri.toURL().openStream();
-Document&lt;Entry&gt; doc = Parser.INSTANCE.parse(in, uri);</pre>
+Document&lt;Entry&gt; doc = parser.parse(in, uri.toString());</pre>
    
     <h3>Configuring the Parser</h3>
     
     <pre>URI uri = new URI("http://example.org/feed.xml");
 InputStream in = uri.toURL().openStream();
-<b>ParserOptions options = Parser.INSTANCE.getDefaultParserOptions();
+<b>ParserOptions options = parser.getDefaultParserOptions();
 options.setCharset('utf-8');
 //.. set other parser options</b>
-Document&lt;Feed&gt; doc = Parser.INSTANCE.parse(in, uri, options);</pre>
+Document&lt;Feed&gt; doc = parser.parse(in, uri.toString(), options);</pre>
     
     <h2>Creating Atom Feed and Entry Documents</h2>
     
@@ -89,7 +90,8 @@
     either use the default configured Factory by calling <code>Factory.INSTANCE</code>,
     or may create their own Factory instance.</t>
     
-    <pre>Factory factory = Factory.INSTANCE;
+    <pre>Abdera abdera = new Abdera();
+Factory factory = abdera.getFactory();
 // or
 Factory factory = new FOMFactory();
 // or
@@ -97,8 +99,8 @@
 
     <h3>Creating Atom Feed Documents</h3>
     
-    <pre>Feed feed = Factory.INSTANCE.newFeed();
-feed.setId("tag:example.org,2005:/myfeed", false);
+    <pre>Feed feed = factory.newFeed();
+feed.setId("tag:example.org,2005:/myfeed");
 feed.setTitle("My Example Feed");
 // .. set other feed properties
 Document&lt;Feed&gt; doc = feed.getDocument();
@@ -107,8 +109,8 @@
     
     <h3>Creating Atom Entry Documents</h3>
 
-    <pre>Entry entry = Factory.INSTANCE.newEntry();
-entry.setId("tag:example.org,2005:/myentry", false);
+    <pre>Entry entry = factory.newEntry();
+entry.setId("tag:example.org,2005:/myentry");
 entry.setTitle("My Example Entry");
 // .. set other feed properties
 Document&lt;Entry&gt; doc = entry.getDocument();
@@ -123,15 +125,15 @@
     
     <pre>URI uri = ...
 InputStream inputStream = ...
-Document&lt;Feed&gt; doc = Parser.INSTANCE.parse(inputStream, uri);
+Document&lt;Feed&gt; doc = parser.parse(inputStream, uri.toString());
 Feed feed = doc.getRoot();
-URI id = feed.getId();
+IRI id = feed.getId();
 Text.Type titleType = feed.getTitleType();
 String title = feed.getTitle();
 
 List&lt;Entry&gt; entries = feed.getEntries();
 for (Entry entry : entries) {
-  URI entryId = entry.getId();
+  IRI entryId = entry.getId();
   Text.Type entryTitleType = entry.getTitleType();
   String entryTitle = entry.getTitle();
 }
@@ -144,31 +146,32 @@
     
     <pre>URI uri = ...
 InputStream inputStream = ...
-Document&lt;Feed&gt; doc = Parser.INSTANCE.parse(inputStream, uri);
+Document&lt;Feed&gt; doc = parser.parse(inputStream, uri.toString());
 
 // Select the id of the document
-String id = XPath.INSTANCE.valueOf("/a:feed/a:id", doc);
+XPath xpath = abdera.getXPath();
+String id = xpath.valueOf("/a:feed/a:id", doc);
 
 // Select all entries from the document
-List entries = XPath.INSTANCE.valueOf("//a:entry", doc);
+List entries = xpath.valueOf("//a:entry", doc);
 for (Iterator i = entries.iterator(); i.hasNext();) {
   Entry entry = (Entry)i.next();
   //...
 }
 
 // Determine if a feed contains a specific extension
-boolean hasFoo = XPath.INSTANCE.isTrue("//x:foo", doc);
+boolean hasFoo = xpath.isTrue("//x:foo", doc);
 
 // The XPath support works on any element in the FOM
-Entry entry = (Entry)XPath.INSTANCE.selectSingleNode("//a:entry", doc);
-String id = XPath.INSTANCE.valueOf("a:id", entry);</pre>
+Entry entry = (Entry)xpath.selectSingleNode("//a:entry", doc);
+String id = xpath.valueOf("a:id", entry);</pre>
     
     <h2>Using Extensions</h2>
     
     <p>The Feed Object Model is designed to fully and dynamically support 
     extensions to the Atom Feed format.</p>
     
-    <pre>Feed feed = Factory.INSTANCE.newFeed();
+    <pre>Feed feed = factory.newFeed();
 // ... set other feed properties
 feed.addSimpleExtension(
   new QName("urn:foo", "myExtension", "a"), 
@@ -206,10 +209,11 @@
     
     <h3>Digitally Signing Atom Documents</h3>
     
-    <pre>Feed feed = Factory.INSTANCE.newFeed();
+    <pre>Feed feed = factory.newFeed();
 PrivateKey myPrivateKey = ...
 X509Certificate myX509Cert = ...
-Signature sig = Signature.INSTANCE;
+AbderaSecurity absec = new AbderaSecurity(abdera);
+Signature sig = absec.getSignature();
 SignatureOptions options = sig.getDefaultSignatureOptions();
 options.setSigningKey(myPrivateKey);
 options.setCertificate(myX509Cert);
@@ -218,10 +222,11 @@
 
     <h3>Encrypting Atom Documents</h3>
     
-    <pre>Feed feed = Factory.INSTANCE.newFeed();
+    <pre>Feed feed = factory.newFeed();
 Key kek = ... // Key encryption key
 Key dek = ... // Data encryption key
-Encryption enc = Encryption.INSTANCE;
+AbderaSecurity absec = new AbderaSecurity(abdera);
+Encryption enc = absec.getEncryption();
 EncryptionOptions options = enc.getDefaultEncryptionOptions();
 options.setKeyEncryptionKey(kek);
 options.setDataEncryptionKey(dek);

Modified: incubator/abdera/java/branches/0.2.0-incubating/docs/index.html
URL: http://svn.apache.org/viewvc/incubator/abdera/java/branches/0.2.0-incubating/docs/index.html?view=diff&rev=482712&r1=482711&r2=482712
==============================================================================
--- incubator/abdera/java/branches/0.2.0-incubating/docs/index.html (original)
+++ incubator/abdera/java/branches/0.2.0-incubating/docs/index.html Tue Dec  5 09:10:34 2006
@@ -28,7 +28,7 @@
 <body>
   <div id="banner">
     <h1><a href="http://incubator.apache.org/abdera">Apache Abdera</a></h1>
-    <p>Version 0.1-SNAPSHOT (Incubating)</p>
+    <p>Version 0.2 (Incubating)</p>
     <hr/>
   </div>
   <div id="divider"></div>

Modified: incubator/abdera/java/branches/0.2.0-incubating/docs/knownissues.txt
URL: http://svn.apache.org/viewvc/incubator/abdera/java/branches/0.2.0-incubating/docs/knownissues.txt?view=diff&rev=482712&r1=482711&r2=482712
==============================================================================
--- incubator/abdera/java/branches/0.2.0-incubating/docs/knownissues.txt (original)
+++ incubator/abdera/java/branches/0.2.0-incubating/docs/knownissues.txt Tue Dec  5 09:10:34
2006
@@ -1,4 +1,3 @@
  * The client-side cache implementation in the Abdera Client does not support
    the HTTP Vary header
-   
- * 
\ No newline at end of file
+   
\ No newline at end of file



Mime
View raw message