1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.feedparser;
18
19 import org.jdom.*;
20
21 /***
22 *
23 * @author <a href="mailto:burton@apache.org">Kevin A. Burton (burtonator)</a>
24 * @version $Id: FeedParserListener.java 159212 2005-03-27 23:31:07Z burton $
25 */
26 public interface FeedParserListener extends FeedLifecycleListener {
27
28 /***
29 * Called when a channel item is found.
30 *
31 *
32 */
33 public void onChannel( FeedParserState state,
34 String title,
35 String link,
36 String description ) throws FeedParserException;
37
38 public void onChannelEnd() throws FeedParserException;
39
40 /***
41 * Called when an RSS image is found.
42 *
43 *
44 */
45 public void onImage( FeedParserState state,
46 String title,
47 String link,
48 String url ) throws FeedParserException;
49
50 public void onImageEnd() throws FeedParserException;
51
52 /***
53 * Called when an RSS item or Atom entry is found.
54 *
55 *
56 */
57 public void onItem( FeedParserState state,
58 String title,
59 String link,
60 String description,
61 String permalink ) throws FeedParserException;
62
63 public void onItemEnd() throws FeedParserException;
64
65 /***
66 * Called when we are first able to determine the feed version for this
67 * feed. Ideally implementations should call this BEFORE onChannel but
68 * depending on the parser infrastructure this might not be possible.
69 *
70 * Should be called before init()
71 *
72 *
73 */
74 public void onFeedVersion( FeedVersion version ) throws FeedParserException;
75
76 }
77