burton 2004/04/16 13:20:01
Modified: feedparser/src/java/org/apache/commons/feedparser/locate
DiscoveryLocator.java FeedReference.java
LinkLocator.java
Log:
return the correct list
Revision Changes Path
1.6 +3 -4
jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/locate/DiscoveryLocator.java
Index: DiscoveryLocator.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/locate/DiscoveryLocator.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- DiscoveryLocator.java 15 Apr 2004 16:57:20 -0000 1.5
+++ DiscoveryLocator.java 16 Apr 2004 20:20:00 -0000 1.6
@@ -20,9 +20,6 @@
import java.util.*;
import java.util.regex.*;
-//FIXME: do NOT use apache regex as it has major problems.
-import org.apache.regexp.*;
-
/**
*
* @author <a href="mailto:[EMAIL PROTECTED]">Kevin A. Burton</a>
@@ -48,7 +45,9 @@
}
/**
- *
+ * Locate a feed via RSS/Atom auto-discovery. If both Atom and RSS are
+ * listed we return both. Actually we return all Atom/RSS or XML feeds
+ * including FOAF. It's up to the caller to use the correct feed.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Kevin A. Burton</a>
*/
1.5 +10 -0
jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/locate/FeedReference.java
Index: FeedReference.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/locate/FeedReference.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- FeedReference.java 15 Apr 2004 16:57:20 -0000 1.4
+++ FeedReference.java 16 Apr 2004 20:20:01 -0000 1.5
@@ -27,8 +27,18 @@
public static int METHOD_AUTODISCOVERY;
+ /**
+ * The network addressable resource forfor this feed.
+ */
public String resource = null;
+
public String type = null;
+
+ /**
+ * The title of the reference. Usually FOAF, RSS or Atom per auto-discovery
+ * link.
+ */
+ public String title = null;
public int method = 0;
1.2 +12 -1
jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/locate/LinkLocator.java
Index: LinkLocator.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/locate/LinkLocator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- LinkLocator.java 15 Apr 2004 16:58:15 -0000 1.1
+++ LinkLocator.java 16 Apr 2004 20:20:01 -0000 1.2
@@ -64,6 +64,17 @@
if ( current == null )
return true; //obviously not
+ //FIXME: if it's at the same directory level we should
prioritize it.
+ //for example:
+ //
+ // http://peerfear.org/blog/
+ //
+ // http://peerfear.org/blog/index.rdf
+ //
+ // instead of
+ //
+ // http://peerfear.org/index.rdf
+
//this is on a different site.
if ( ! getSite( current ).equals( site ) ) {
return true;
@@ -105,7 +116,7 @@
listener.setContext( resource );
AnchorParser.parseAnchors( content, listener );
- return null;
+ return (List)listener.getResult();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]