commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bur...@apache.org
Subject svn commit: r149174 - in jakarta/commons/sandbox/feedparser/trunk: ./ src/java/org/apache/commons/feedparser/ xdocs/
Date Sun, 30 Jan 2005 22:51:32 GMT
Author: burton
Date: Sun Jan 30 14:51:30 2005
New Revision: 149174

URL: http://svn.apache.org/viewcvs?view=rev&rev=149174
Log:
Support for onFeedVersion in other parsers including opml, foaf, etc

Modified:
    jakarta/commons/sandbox/feedparser/trunk/TODO
    jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/ChangesFeedParser.java
    jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/FOAFFeedParser.java
    jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/FeedVersion.java
    jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/HTMLFeedParser.java
    jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/OPMLFeedParser.java
    jakarta/commons/sandbox/feedparser/trunk/xdocs/index.xml

Modified: jakarta/commons/sandbox/feedparser/trunk/TODO
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/feedparser/trunk/TODO?view=diff&r1=149173&r2=149174
==============================================================================
--- jakarta/commons/sandbox/feedparser/trunk/TODO (original)
+++ jakarta/commons/sandbox/feedparser/trunk/TODO Sun Jan 30 14:51:30 2005
@@ -24,6 +24,9 @@
 
 - (DONE) Atom GUIDs and RSS 2.0 GUIDs
 
+- (DONE) Rework the factory mechanism to support multiple FeedParsers... should
+  be an interface.
+
 - BUG:
 
     Make SURE that all these tests work
@@ -37,9 +40,6 @@
 - Do we support multiple content items in Atom?
 
 - We do not support multipart/alternative in the feedparser.
-
-- Rework the factory mechanism to support multiple FeedParsers... should be an
-  interface.
  
 - Migrate away from JDOM (slower than just using DOM/SAX)
 

Modified: jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/ChangesFeedParser.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/ChangesFeedParser.java?view=diff&r1=149173&r2=149174
==============================================================================
--- jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/ChangesFeedParser.java
(original)
+++ jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/ChangesFeedParser.java
Sun Jan 30 14:51:30 2005
@@ -34,7 +34,7 @@
  * Handles parsing Blogger.com changes.xml files.
  *
  * @author <a href="mailto:burton@apache.org">Kevin A. Burton (burtonator)</a>
- * @version $Id: ChangesFeedParser.java,v 1.1 2004/08/31 21:00:32 burton Exp $
+ * @version $Id$
  */
 public class ChangesFeedParser {
 
@@ -50,8 +50,9 @@
                 
             FeedParserState state = new FeedParserState();
 
-            //will result in an incorrect interface if the caller isn't using the
-            //system correctly.
+            FeedVersion v = new FeedVersion();
+            v.isChanges = true;
+            listener.onFeedVersion( v );
 
             listener.init();
 

Modified: jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/FOAFFeedParser.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/FOAFFeedParser.java?view=diff&r1=149173&r2=149174
==============================================================================
--- jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/FOAFFeedParser.java
(original)
+++ jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/FOAFFeedParser.java
Sun Jan 30 14:51:30 2005
@@ -28,7 +28,7 @@
  * Handles parsing FOAF.
  *
  * @author <a href="mailto:burton@apache.org">Kevin A. Burton (burtonator)</a>
- * @version $Id: FOAFFeedParser.java,v 1.5 2004/08/27 18:07:01 burton Exp $
+ * @version $Id$
  */
 public class FOAFFeedParser {
 
@@ -44,8 +44,9 @@
                 
             FeedParserState state = new FeedParserState();
 
-            //will result in an incorrect interface if the caller isn't using the
-            //system correctly.
+            FeedVersion v = new FeedVersion();
+            v.isFOAF = true;
+            listener.onFeedVersion( v );
 
             listener.init();
 

Modified: jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/FeedVersion.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/FeedVersion.java?view=diff&r1=149173&r2=149174
==============================================================================
--- jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/FeedVersion.java
(original)
+++ jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/FeedVersion.java
Sun Jan 30 14:51:30 2005
@@ -21,7 +21,7 @@
 /**
  *
  * @author <a href="mailto:burton@apache.org">Kevin A. Burton (burtonator)</a>
- * @version $Id: FeedVersion.java,v 1.2 2004/02/28 03:35:22 bayard Exp $
+ * @version $Id$
  */
 public class FeedVersion {
 
@@ -35,4 +35,15 @@
      */
     public boolean isRSS;
     
+    public boolean isFOAF;
+
+    public boolean isOPML;
+
+    public boolean isXFN;
+
+    /**
+     * True if this is a changes.xml file.
+     */
+    public boolean isChanges;
+
 }

Modified: jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/HTMLFeedParser.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/HTMLFeedParser.java?view=diff&r1=149173&r2=149174
==============================================================================
--- jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/HTMLFeedParser.java
(original)
+++ jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/HTMLFeedParser.java
Sun Jan 30 14:51:30 2005
@@ -26,11 +26,11 @@
 /**
  *
  * Experimental class to play with supporting XFN.  HTML parsing in general is
- * interesting because I could start with teh AnchorParser and move to an HTML
+ * interesting because I could start with the AnchorParser and move to an HTML
  * parser but that might be too generic.
  * 
  * @author <a href="mailto:burton@apache.org">Kevin A. Burton (burtonator)</a>
- * @version $Id: HTMLFeedParser.java,v 1.1 2005/01/20 09:00:37 burton Exp $
+ * @version $Id$
  */
 public class HTMLFeedParser extends BaseParser {
 
@@ -40,6 +40,10 @@
 
         if ( listener instanceof FeedDirectoryParserListener == false )
             return;
+
+        //FIXME: only convert to using XFN if these types of links are detected.
+        //If its just a plain XHTML file then we shouldn't use this interface.
+        //Also FeedVersion needs to be called.
         
         final FeedDirectoryParserListener directoryParserLisener =
             (FeedDirectoryParserListener)listener;

Modified: jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/OPMLFeedParser.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/OPMLFeedParser.java?view=diff&r1=149173&r2=149174
==============================================================================
--- jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/OPMLFeedParser.java
(original)
+++ jakarta/commons/sandbox/feedparser/trunk/src/java/org/apache/commons/feedparser/OPMLFeedParser.java
Sun Jan 30 14:51:30 2005
@@ -34,7 +34,7 @@
  * Handles parsing OPML.
  *
  * @author <a href="mailto:burton@apache.org">Kevin A. Burton (burtonator)</a>
- * @version $Id: OPMLFeedParser.java,v 1.3 2004/06/28 19:59:47 burton Exp $
+ * @version $Id$
  */
 public class OPMLFeedParser {
 
@@ -52,6 +52,10 @@
 
             //will result in an incorrect interface if the caller isn't using the
             //system correctly.
+
+            FeedVersion v = new FeedVersion();
+            v.isOPML = true;
+            listener.onFeedVersion( v );
 
             listener.init();
 

Modified: jakarta/commons/sandbox/feedparser/trunk/xdocs/index.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/feedparser/trunk/xdocs/index.xml?view=diff&r1=149173&r2=149174
==============================================================================
--- jakarta/commons/sandbox/feedparser/trunk/xdocs/index.xml (original)
+++ jakarta/commons/sandbox/feedparser/trunk/xdocs/index.xml Sun Jan 30 14:51:30 2005
@@ -152,8 +152,13 @@
         <section name="API">
 
             <p>
-                Developers place all their logic in a FeedParserListener which
-                receives callbacks from the FeedParser.  They then pass the
+                Developers place all their logic in a 
+
+                <a href="api/org/apache/commons/feedparser/FeedParserListener.html">
+                    FeedParserListener 
+                </a>
+
+                whichreceives callbacks from the FeedParser.  They then pass the
                 FeedParser an InputStream and they are ready to get events:
             </p>
 
@@ -255,18 +260,27 @@
 
         </section>
 
+        <section name="Developers">
+
+            <dt>Kevin Burton</dt>
+            <dd>Developer and Project Lead</dd>
+
+            <dt>Brad Neuberg</dt>
+            <dd>Developer</dd>
+
+            <dt>Joseph Ottinger</dt>
+            <dd>Developer</dd>
+
+        </section>
+
         <section name="Future Directions">
 
             <p>
                 <ol>
-                    <li>
-                        Support FOAF parsing which correct RDF handling.
-                    </li>
 
                     <li>
 
-                        Better support for unique Atom features such as
-                        atom:summary.
+                        Support FOAF parsing with better arbitrary RDF handling.
 
                     </li>
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message