View Javadoc

1   /*
2    * Copyright 1999,2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.apache.commons.feedparser;
18  
19  import org.jdom.*;
20  
21  /***
22   * Atom link, RSS 2.0 enclosure, and RSS 1.0 mod_link support.
23   *
24   * Note that you are given callbacks for *all* atom:link and RSS mod_link
25   * callbacks.  This includes the HTML permalink URL so its important that you
26   * handle this situation as well.  
27   * 
28   * More info on the link mechanism:
29   *
30   * http://web.resource.org/rss/1.0/modules/link/
31   * 
32   * http://xml.com/pub/a/2004/06/16/dive.html
33   * 
34   * http://www.peerfear.org/rss/permalink/2004/06/17/AtomLinkModel
35   *
36   * 
37   * @author <a href="mailto:burton@apache.org">Kevin A. Burton (burtonator)</a>
38   * @version $Id: LinkFeedParserListener.java 155416 2005-02-26 13:00:10Z dirkv $
39   */
40  public interface LinkFeedParserListener {
41  
42      /***
43       *
44       * 
45       * @param length The length of the content or -1 if not specified.
46       */
47      public void onLink( FeedParserState state,
48                          String rel,
49                          String type,
50                          String href,
51                          String title,
52                          long length ) throws FeedParserException;
53  
54  }
55