You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Dion Gillard <di...@gmail.com> on 2005/01/28 12:13:06 UTC

[feedparser] Fwd: Fwd: [ST-J] java rss?

---------- Forwarded message ----------
From: Scot Mcphee <sc...@gmail.com>
Date: Fri, 28 Jan 2005 21:31:31 +1100
Subject: Re: Fwd: [ST-J] java rss?
To: straight_talking_java@yahoogroups.com



Dion I was looking at feedparser a little (and btw my comment
previously was about the commons-configuration project not feedparser)
and my understanding it's an event based API, eg analogous to SAX.

However this project is an aggregator plugin written for use with
Pebble, where Pebble controls the start/stop lifecycle and the plugin
itself extends TimerTask to be regularly scheduled to check and post
the blog entries it finds on the feeds. What I don't get with the
Feedparser is how it's event based model would work with such a
threading model.

Also the front page 'example' indicates classes that just don't seem
to even exist in the Javadoc. The example has the text "Developers
place all their logic in a FeedParserListener which receives callbacks
from the FeedParser. They then pass the FeedParser an InputStream and
they are ready to get events:" but the Javadoc has no class called
FeedParser. The sample code then shows that the FeedParserListener is
implemented as an inline class of type DefaultFeedParserListener which
is also not in the javadoc. It has  utilises a variable called parser
- FeedParser parser = FeedParserFactory.newFeedParser(); - again this
class doesn't exist in the javadoc.

finally the method signature of the onItem()

 public void onItem( FeedParserState state,
                            String title,
                            String link,
                            String description,
                            String permalink ) throws FeedParserException {

shows that it doesn't support the many features of RSS 2.0 for example
enclosures (important in my context) plus many other tags you can find
in the rss item.

of course the example might just be very old but it's not exactly
awe-inspiring when the given example doesn't appear to match anything
documented in the api.

just thought you might like to pass this feedback on.

thanks
scot.


_______________________________________________________
ST-J Wiki: http://tarasis.net/STWiki/

.
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/straight_talking_java/

<*> To unsubscribe from this group, send an email to:
    straight_talking_java-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/



-- 
http://www.multitask.com.au/people/dion/

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


Re: [feedparser] Fwd: Fwd: [ST-J] java rss?

Posted by "Kevin A. Burton" <bu...@newsmonster.org>.
Dion Gillard wrote:

>Dion I was looking at feedparser a little (and btw my comment
>previously was about the commons-configuration project not feedparser)
>and my understanding it's an event based API, eg analogous to SAX.
>
>  
>
Yes...

>Also the front page 'example' indicates classes that just don't seem
>to even exist in the Javadoc. 
>
I know. Joseph Ottinger just gave me a patch to build all packages in 
SVN with Javadoc. Now I just need to figure out how to update the site :)

>The example has the text "Developers
>place all their logic in a FeedParserListener which receives callbacks
>from the FeedParser. They then pass the FeedParser an InputStream and
>they are ready to get events:" but the Javadoc has no class called
>FeedParser. The sample code then shows that the FeedParserListener is
>implemented as an inline class of type DefaultFeedParserListener which
>is also not in the javadoc. It has  utilises a variable called parser
>- FeedParser parser = FeedParserFactory.newFeedParser(); - again this
>class doesn't exist in the javadoc.
>
>  
>
Hm... that one should... The javadoc is out of date. Again we're still 
trying to get everything setup within Apache correctly. Still trying to 
work on that. Any help appreciated ;)

There's a wiki page I created for this:

http://wiki.apache.org/jakarta-commons/FeedParser/HelpingDevel

>finally the method signature of the onItem()
>
> public void onItem( FeedParserState state,
>                            String title,
>                            String link,
>                            String description,
>                            String permalink ) throws FeedParserException {
>
>shows that it doesn't support the many features of RSS 2.0 for example
>enclosures (important in my context) plus many other tags you can find
>in the rss item.
>
>  
>
Yes... it was designed that way. onItem() is designed to be compatible 
across all flavors of RSS and Atom. Any additional metadata is passed 
within additional events.

For example the above has no date information. If you want dates a 
second event is called after onItem() called onCreated() with a java 
Date object (and we handle the complexity of ISO8601 vs RFC822 dates)

>of course the example might just be very old but it's not exactly
>awe-inspiring when the given example doesn't appear to match anything
>documented in the api.
>
>  
>
The API is just out of sync. We should still have more examples.

>just thought you might like to pass this feedback on.
>
>  
>
Thanks for the feedback!

-- 

Use Rojo (RSS/Atom aggregator).  Visit http://rojo.com. Ask me for an 
invite!  Also see irc.freenode.net #rojo if you want to chat.

Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html

If you're interested in RSS, Weblogs, Social Networking, etc... then you 
should work for Rojo!  If you recommend someone and we hire them you'll 
get a free iPod!
    
Kevin A. Burton, Location - San Francisco, CA
       AIM/YIM - sfburtonator,  Web - http://peerfear.org/
GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412


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