001 /* 002 * Copyright 1999,2004 The Apache Software Foundation. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017 package org.apache.commons.feedparser.output; 018 019 import java.io.OutputStream; 020 021 import org.apache.commons.feedparser.DefaultFeedParserListener; 022 import org.apache.commons.feedparser.FeedParserListener; 023 import org.apache.commons.feedparser.FeedParserState; 024 025 /** 026 * 027 * @author <a href="mailto:burton@apache.org">Kevin A. Burton (burtonator)</a> 028 * @version $Id: RSS10_OutputFeedParserListener.java 373622 2006-01-30 22:53:00Z mvdb $ 029 */ 030 public class RSS10_OutputFeedParserListener extends DefaultFeedParserListener 031 implements FeedParserListener { 032 033 private OutputStream out = null; 034 035 /** 036 * 037 * Create a new <code>RSS10_OutputFeedParserListener</code> instance. 038 * 039 * 040 */ 041 public RSS10_OutputFeedParserListener( OutputStream out ) { 042 this.out = out; 043 } 044 045 /** 046 * Called prior to event parsing to signal the parsing of a new feed. 047 * 048 * 049 */ 050 public void init() {} 051 public void setContext( Object context ) {} 052 053 /** 054 * Called when a channel item is found. 055 * 056 * 057 */ 058 public void onChannel( FeedParserState state, 059 String title, 060 String link, 061 String description ) { 062 063 } 064 065 public void onChannelEnd() { 066 067 } 068 069 /** 070 * Called when an RSS image is found. 071 * 072 * 073 */ 074 public void onImage( FeedParserState state, 075 String title, 076 String link, 077 String url ) { 078 079 } 080 081 public void onImageEnd() { 082 083 } 084 085 /** 086 * Called when an RSS item or Atom entry is found. 087 * 088 * 089 */ 090 public void onItem( FeedParserState state, 091 String title, 092 String link, 093 String description, 094 String permalink ) { 095 096 } 097 098 public void onItemEnd() { 099 100 } 101 102 /** 103 * Called when the feed has finished parsing. 104 * 105 * 106 */ 107 public void finished() { 108 109 } 110 111 } 112