Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 34187 invoked from network); 17 Sep 2004 00:15:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 17 Sep 2004 00:15:26 -0000 Received: (qmail 26096 invoked by uid 500); 17 Sep 2004 00:14:58 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 25894 invoked by uid 500); 17 Sep 2004 00:14:55 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 25696 invoked by uid 500); 17 Sep 2004 00:14:52 -0000 Received: (qmail 25685 invoked by uid 99); 17 Sep 2004 00:14:52 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 16 Sep 2004 17:14:48 -0700 Received: (qmail 33344 invoked by uid 1431); 17 Sep 2004 00:14:46 -0000 Date: 17 Sep 2004 00:14:46 -0000 Message-ID: <20040917001446.33343.qmail@minotaur.apache.org> From: dion@apache.org To: jakarta-commons-cvs@apache.org Subject: cvs commit: jakarta-commons/jelly/jelly-tags/betwixt/xdocs changes.xml X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N dion 2004/09/16 17:14:46 Modified: jelly/jelly-tags/betwixt project.xml jelly/jelly-tags/betwixt/xdocs changes.xml Added: jelly/jelly-tags/betwixt/src/test/org/apache/commons/digester/rss Channel.java rss-example.xml TextInput.java RSSDigester.java package.html Item.java Image.java Log: Move to digester 1.6 and betwixt 0.5 Revision Changes Path 1.1 jakarta-commons/jelly/jelly-tags/betwixt/src/test/org/apache/commons/digester/rss/Channel.java Index: Channel.java =================================================================== /* * Copyright 2001-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.digester.rss; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.io.Serializable; import java.io.UnsupportedEncodingException; import java.io.Writer; import java.util.ArrayList; /** *

Implementation object representing a channel in the * Rich Site Summary DTD, version 0.91. This class may be subclassed * to further specialize its behavior.

*/ public class Channel implements Serializable { // ----------------------------------------------------- Instance Variables /** * The set of items associated with this Channel. */ protected ArrayList items = new ArrayList(); /** * The set of skip days for this channel. */ protected ArrayList skipDays = new ArrayList(); /** * The set of skip hours for this channel. */ protected ArrayList skipHours = new ArrayList(); // ------------------------------------------------------------- Properties /** * The channel copyright (1-100 characters). */ protected String copyright = null; public String getCopyright() { return (this.copyright); } public void setCopyright(String copyright) { this.copyright = copyright; } /** * The channel description (1-500 characters). */ protected String description = null; public String getDescription() { return (this.description); } public void setDescription(String description) { this.description = description; } /** * The channel description file URL (1-500 characters). */ protected String docs = null; public String getDocs() { return (this.docs); } public void setDocs(String docs) { this.docs = docs; } /** * The image describing this channel. */ protected Image image = null; public Image getImage() { return (this.image); } public void setImage(Image image) { this.image = image; } /** * The channel language (2-5 characters). */ protected String language = null; public String getLanguage() { return (this.language); } public void setLanguage(String language) { this.language = language; } /** * The channel last build date (1-100 characters). */ protected String lastBuildDate = null; public String getLastBuildDate() { return (this.lastBuildDate); } public void setLastBuildDate(String lastBuildDate) { this.lastBuildDate = lastBuildDate; } /** * The channel link (1-500 characters). */ protected String link = null; public String getLink() { return (this.link); } public void setLink(String link) { this.link = link; } /** * The managing editor (1-100 characters). */ protected String managingEditor = null; public String getManagingEditor() { return (this.managingEditor); } public void setManagingEditor(String managingEditor) { this.managingEditor = managingEditor; } /** * The channel publication date (1-100 characters). */ protected String pubDate = null; public String getPubDate() { return (this.pubDate); } public void setPubDate(String pubDate) { this.pubDate = pubDate; } /** * The channel rating (20-500 characters). */ protected String rating = null; public String getRating() { return (this.rating); } public void setRating(String rating) { this.rating = rating; } /** * The text input description for this channel. */ protected TextInput textInput = null; public TextInput getTextInput() { return (this.textInput); } public void setTextInput(TextInput textInput) { this.textInput = textInput; } /** * The channel title (1-100 characters). */ protected String title = null; public String getTitle() { return (this.title); } public void setTitle(String title) { this.title = title; } /** * The RSS specification version number used to create this Channel. */ protected double version = 0.91; public double getVersion() { return (this.version); } public void setVersion(double version) { this.version = version; } /** * The webmaster email address (1-100 characters). */ protected String webMaster = null; public String getWebMaster() { return (this.webMaster); } public void setWebMaster(String webMaster) { this.webMaster = webMaster; } // --------------------------------------------------------- Public Methods /** * Add an additional item. * * @param item The item to be added */ public void addItem(Item item) { synchronized (items) { items.add(item); } } /** * Add an additional skip day name. * * @param skipDay The skip day to be added */ public void addSkipDay(String skipDay) { synchronized (skipDays) { skipDays.add(skipDay); } } /** * Add an additional skip hour name. * * @param skipHour The skip hour to be added */ public void addSkipHour(String skipHour) { synchronized (skipHours) { skipHours.add(skipHour); } } /** * Return the items for this channel. */ public Item[] findItems() { synchronized (items) { Item items[] = new Item[this.items.size()]; return ((Item[]) this.items.toArray(items)); } } /** * Return the items for this channel. */ public Item[] getItems() { return findItems(); } /** * Return the skip days for this channel. */ public String[] findSkipDays() { synchronized (skipDays) { String skipDays[] = new String[this.skipDays.size()]; return ((String[]) this.skipDays.toArray(skipDays)); } } /** * Return the skip hours for this channel. */ public String[] getSkipHours() { return findSkipHours(); } /** * Return the skip hours for this channel. */ public String[] findSkipHours() { synchronized (skipHours) { String skipHours[] = new String[this.skipHours.size()]; return ((String[]) this.skipHours.toArray(skipHours)); } } /** * Return the skip days for this channel. */ public String[] getSkipDays() { return findSkipDays(); } /** * Remove an item for this channel. * * @param item The item to be removed */ public void removeItem(Item item) { synchronized (items) { items.remove(item); } } /** * Remove a skip day for this channel. * * @param skipDay The skip day to be removed */ public void removeSkipDay(String skipDay) { synchronized (skipDays) { skipDays.remove(skipDay); } } /** * Remove a skip hour for this channel. * * @param skipHour The skip hour to be removed */ public void removeSkipHour(String skipHour) { synchronized (skipHours) { skipHours.remove(skipHour); } } /** * Render this channel as XML conforming to the RSS 0.91 specification, * to the specified output stream, with no indication of character * encoding. * * @param stream The output stream to write to */ public void render(OutputStream stream) { try { render(stream, null); } catch (UnsupportedEncodingException e) { ; // Can not happen } } /** * Render this channel as XML conforming to the RSS 0.91 specification, * to the specified output stream, with the specified character encoding. * * @param stream The output stream to write to * @param encoding The character encoding to declare, or null * for no declaration * * @exception UnsupportedEncodingException if the named encoding * is not supported */ public void render(OutputStream stream, String encoding) throws UnsupportedEncodingException { PrintWriter pw = null; if (encoding == null) { pw = new PrintWriter(stream); } else { pw = new PrintWriter(new OutputStreamWriter(stream, encoding)); } render(pw, encoding); pw.flush(); } /** * Render this channel as XML conforming to the RSS 0.91 specification, * to the specified writer, with no indication of character encoding. * * @param writer The writer to render output to */ public void render(Writer writer) { render(writer, null); } /** * Render this channel as XML conforming to the RSS 0.91 specification, * to the specified writer, indicating the specified character encoding. * * @param writer The writer to render output to * @param encoding The character encoding to declare, or null * for no declaration */ public void render(Writer writer, String encoding) { PrintWriter pw = new PrintWriter(writer); render(pw, encoding); pw.flush(); } /** * Render this channel as XML conforming to the RSS 0.91 specification, * to the specified writer, with no indication of character encoding. * * @param writer The writer to render output to */ public void render(PrintWriter writer) { render(writer, null); } /** * Render this channel as XML conforming to the RSS 0.91 specification, * to the specified writer, indicating the specified character encoding. * * @param writer The writer to render output to * @param encoding The character encoding to declare, or null * for no declaration */ public void render(PrintWriter writer, String encoding) { writer.print(""); writer.println(); writer.println(""); writer.println(); writer.println(""); writer.println(); writer.println(" "); writer.println(); writer.print(" "); writer.print(title); writer.println(""); writer.print(" "); writer.print(description); writer.println(""); writer.print(" "); writer.print(link); writer.println(""); writer.print(" "); writer.print(language); writer.println(""); if (rating != null) { writer.print(" "); writer.print(rating); writer.println(""); } if (copyright != null) { writer.print(" "); writer.print(copyright); writer.print(""); } if (pubDate != null) { writer.print(" "); writer.print(pubDate); writer.println(""); } if (lastBuildDate != null) { writer.print(" "); writer.print(lastBuildDate); writer.println(""); } if (docs != null) { writer.print(" "); writer.print(docs); writer.println(""); } if (managingEditor != null) { writer.print(" "); writer.print(managingEditor); writer.println(""); } if (webMaster != null) { writer.print(" "); writer.print(webMaster); writer.println(""); } writer.println(); if (image != null) { image.render(writer); writer.println(); } if (textInput != null) { textInput.render(writer); writer.println(); } String skipDays[] = findSkipDays(); if (skipDays.length > 0) { writer.println(" "); for (int i = 0; i < skipDays.length; i++) { writer.print(" "); writer.print(skipDays[i]); writer.println(""); } writer.println(" "); } String skipHours[] = findSkipHours(); if (skipHours.length > 0) { writer.println(" "); for (int i = 0; i < skipHours.length; i++) { writer.print(" "); writer.print(skipHours[i]); writer.println(""); } writer.println(" "); writer.println(); } Item items[] = findItems(); for (int i = 0; i < items.length; i++) { items[i].render(writer); writer.println(); } writer.println(" "); writer.println(); writer.println(""); } } 1.1 jakarta-commons/jelly/jelly-tags/betwixt/src/test/org/apache/commons/digester/rss/rss-example.xml Index: rss-example.xml =================================================================== Apache http://www.apache.org The Apache Software Foundation en-US (PICS-1.1 "http://www.rsac.org/ratingsv01.html" 2 gen true comment "RSACi North America Server" for "http://www.rsac.org" on "1996.04.16T08:15-0500" r (n 0 s 0 v 0 l 0)) Apache http://jakarta.apache.org/images/jakarta-logo.gif http://jakarta.apache.org 505 480 The Jakarta project. Open source, serverside java. Commons Attributes 2.1 Released http://jakarta.apache.org/site/news/news-2004-2ndHalf.html#20040815.1 The Jakarta Commons team is happy to announce the release of Commons Attributes 2.1. This is the first release of the new Commons-Attributes code. Cloudscape Becomes Apache Derby http://jakarta.apache.org/site/news/elsewhere-2004-2ndHalf.html#20040803.1 IBM has submitted a proposal to the Apache DB project for a Java-based package to be called 'Derby'. Commons BeanUtils 1.7 Released http://jakarta.apache.org/site/news/news-2004-2ndHalf.html#20040802.1 Commons JXPath 1.2 Released http://jakarta.apache.org/site/news/news-2004-2ndHalf.html#20040801.2 1.1 jakarta-commons/jelly/jelly-tags/betwixt/src/test/org/apache/commons/digester/rss/TextInput.java Index: TextInput.java =================================================================== /* * Copyright 2001-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.digester.rss; import java.io.PrintWriter; import java.io.Serializable; /** *

Implementation object representing a textinput in the * Rich Site Summary DTD, version 0.91. This class may be subclassed * to further specialize its behavior.

*/ public class TextInput implements Serializable { // ------------------------------------------------------------- Properties /** * The text input description (1-100 characters). */ protected String description = null; public String getDescription() { return (this.description); } public void setDescription(String description) { this.description = description; } /** * The text input link (1-500 characters). */ protected String link = null; public String getLink() { return (this.link); } public void setLink(String link) { this.link = link; } /** * The text input field name (1-100 characters). */ protected String name = null; public String getName() { return (this.name); } public void setName(String name) { this.name = name; } /** * The text input submit button label (1-100 characters). */ protected String title = null; public String getTitle() { return (this.title); } public void setTitle(String title) { this.title = title; } // -------------------------------------------------------- Package Methods /** * Render this channel as XML conforming to the RSS 0.91 specification, * to the specified writer. * * @param writer The writer to render output to */ void render(PrintWriter writer) { writer.println(" "); writer.print(" "); writer.print(title); writer.println(""); writer.print(" "); writer.print(description); writer.println(""); writer.print(" "); writer.print(name); writer.println(""); writer.print(" "); writer.print(link); writer.println(""); writer.println(" "); } } 1.1 jakarta-commons/jelly/jelly-tags/betwixt/src/test/org/apache/commons/digester/rss/RSSDigester.java Index: RSSDigester.java =================================================================== /* * Copyright 2001-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.digester.rss; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.URL; import org.apache.commons.digester.Digester; import org.apache.commons.logging.LogFactory; import org.xml.sax.InputSource; import org.xml.sax.SAXException; /** *

Implementation of org.apache.commons.digester.Digester * designed to process input streams that conform to the Rich Site * Summary DTD, version 0.91. For more information about this format, * see the My Netscape site.

* *

The default implementation object returned by calling * parse() (an instance of * org.apache.commons.digester.rss.Channel) * knows how to render itself in XML format via the render() * method. See the test main() method below for an * example of using these classes.

*/ public class RSSDigester extends Digester { // ----------------------------------------------------------- Constructors // ----------------------------------------------------- Instance Variables /** * Have we been configured yet? */ protected boolean configured = false; /** * The set of public identifiers, and corresponding resource names, * for the versions of the DTDs that we know about. */ protected static final String registrations[] = { "-//Netscape Communications//DTD RSS 0.9//EN", "/org/apache/commons/digester/rss/rss-0.9.dtd", "-//Netscape Communications//DTD RSS 0.91//EN", "/org/apache/commons/digester/rss/rss-0.91.dtd", }; // ------------------------------------------------------------- Properties /** * The fully qualified class name of the Channel * implementation class. */ protected String channelClass = "org.apache.commons.digester.rss.Channel"; public String getChannelClass() { return (this.channelClass); } public void setChannelClass(String channelClass) { this.channelClass = channelClass; } /** * The fully qualified class name of the Image * implementation class. */ protected String imageClass = "org.apache.commons.digester.rss.Image"; public String getImageClass() { return (this.imageClass); } public void setImageClass(String imageClass) { this.imageClass = imageClass; } /** * The fully qualified class name of the Item * implementation class. */ protected String itemClass = "org.apache.commons.digester.rss.Item"; public String getItemClass() { return (this.itemClass); } public void setItemClass(String itemClass) { this.itemClass = itemClass; } /** * The fully qualified class name of the TextInput * implementation class. */ protected String textInputClass = "org.apache.commons.digester.rss.TextInput"; public String getTextInputClass() { return (this.textInputClass); } public void setTextInputClass(String textInputClass) { this.textInputClass = textInputClass; } // --------------------------------------------------------- Public Methods /** * Parse the content of the specified file using this Digester. Returns * the root element from the object stack (which will be the Channel). * * @param file File containing the XML data to be parsed * * @exception IOException if an input/output error occurs * @exception SAXException if a parsing exception occurs */ public Object parse(File file) throws IOException, SAXException { configure(); return (super.parse(file)); } /** * Parse the content of the specified input source using this Digester. * Returns the root element from the object stack (which will be the * Channel). * * @param input Input source containing the XML data to be parsed * * @exception IOException if an input/output error occurs * @exception SAXException if a parsing exception occurs */ public Object parse(InputSource input) throws IOException, SAXException { configure(); return (super.parse(input)); } /** * Parse the content of the specified input stream using this Digester. * Returns the root element from the object stack (which will be * the Channel). * * @param input Input stream containing the XML data to be parsed * * @exception IOException if an input/output error occurs * @exception SAXException if a parsing exception occurs */ public Object parse(InputStream input) throws IOException, SAXException { configure(); return (super.parse(input)); } /** * Parse the content of the specified URI using this Digester. * Returns the root element from the object stack (which will be * the Channel). * * @param uri URI containing the XML data to be parsed * * @exception IOException if an input/output error occurs * @exception SAXException if a parsing exception occurs */ public Object parse(String uri) throws IOException, SAXException { configure(); return (super.parse(uri)); } // -------------------------------------------------------- Package Methods // ------------------------------------------------------ Protected Methods /** * Configure the parsing rules that will be used to process RSS input. */ protected void configure() { if (configured) { return; } // Register local copies of the DTDs we understand for (int i = 0; i < registrations.length; i += 2) { URL url = this.getClass().getResource(registrations[i + 1]); if (url != null) { register(registrations[i], url.toString()); } } // FIXME - validate the "version" attribute of the rss element? // Add the rules for the Channel object addObjectCreate("rss/channel", channelClass); addCallMethod("rss/channel/copyright", "setCopyright", 0); addCallMethod("rss/channel/description", "setDescription", 0); addCallMethod("rss/channel/docs", "setDocs", 0); addCallMethod("rss/channel/language", "setLanguage", 0); addCallMethod("rss/channel/lastBuildDate", "setLastBuildDate", 0); addCallMethod("rss/channel/link", "setLink", 0); addCallMethod("rss/channel/managingEditor", "setManagingEditor", 0); addCallMethod("rss/channel/pubDate", "setPubDate", 0); addCallMethod("rss/channel/rating", "setRating", 0); addCallMethod("rss/channel/skipDays/day", "addSkipDay", 0); addCallMethod("rss/channel/skipHours/hour", "addSkipHour", 0); addCallMethod("rss/channel/title", "setTitle", 0); addCallMethod("rss/channel/webMaster", "setWebMaster", 0); // Add the rules for the Image object addObjectCreate("rss/channel/image", imageClass); addSetNext("rss/channel/image", "setImage", "org.apache.commons.digester.rss.Image"); addCallMethod("rss/channel/image/description", "setDescription", 0); addCallMethod("rss/channel/image/height", "setHeight", 0, new Class[]{ Integer.TYPE }); addCallMethod("rss/channel/image/link", "setLink", 0); addCallMethod("rss/channel/image/title", "setTitle", 0); addCallMethod("rss/channel/image/url", "setURL", 0); addCallMethod("rss/channel/image/width", "setWidth", 0, new Class[]{ Integer.TYPE }); // Add the rules for the Item object addObjectCreate("rss/channel/item", itemClass); addSetNext("rss/channel/item", "addItem", "org.apache.commons.digester.rss.Item"); addCallMethod("rss/channel/item/description", "setDescription", 0); addCallMethod("rss/channel/item/link", "setLink", 0); addCallMethod("rss/channel/item/title", "setTitle", 0); // Add the rules for the TextInput object addObjectCreate("rss/channel/textinput", textInputClass); addSetNext("rss/channel/textinput", "setTextInput", "org.apache.commons.digester.rss.TextInput"); addCallMethod("rss/channel/textinput/description", "setDescription", 0); addCallMethod("rss/channel/textinput/link", "setLink", 0); addCallMethod("rss/channel/textinput/name", "setName", 0); addCallMethod("rss/channel/textinput/title", "setTitle", 0); // Mark this digester as having been configured configured = true; } // ------------------------------------------------------ Test Main Program /** * Test main program that parses the channel description included in this * package as a static resource. * * @param args The command line arguments (ignored) */ public static void main(String args[]) { try { System.out.println("RSSDigester Test Program"); System.out.println("Opening input stream ..."); InputStream is = RSSDigester.class.getResourceAsStream ("/org/apache/commons/digester/rss/rss-example.xml"); System.out.println("Creating new digester ..."); RSSDigester digester = new RSSDigester(); if ((args.length > 0) && (args[0].equals("-debug"))) { digester.setLogger(LogFactory.getLog("RSSDigester")); } System.out.println("Parsing input stream ..."); Channel channel = (Channel) digester.parse(is); System.out.println("Closing input stream ..."); is.close(); System.out.println("Dumping channel info ..."); channel.render(System.out); } catch (Exception e) { System.out.println("-->Exception"); e.printStackTrace(System.out); } } } 1.1 jakarta-commons/jelly/jelly-tags/betwixt/src/test/org/apache/commons/digester/rss/package.html Index: package.html =================================================================== Package Documentation for org.apache.commons.digester.rss Package

Example usage of Digester to parse XML documents compatible with the Rich Site Summary format used by many newsfeeds.

1.1 jakarta-commons/jelly/jelly-tags/betwixt/src/test/org/apache/commons/digester/rss/Item.java Index: Item.java =================================================================== /* * Copyright 2001-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.digester.rss; import java.io.PrintWriter; import java.io.Serializable; /** *

Implementation object representing an item in the * Rich Site Summary DTD, version 0.91. This class may be subclassed * to further specialize its behavior.

*/ public class Item implements Serializable { // ------------------------------------------------------------- Properties /** * The item description (1-500 characters). */ protected String description = null; public String getDescription() { return (this.description); } public void setDescription(String description) { this.description = description; } /** * The item link (1-500 characters). */ protected String link = null; public String getLink() { return (this.link); } public void setLink(String link) { this.link = link; } /** * The item title (1-100 characters). */ protected String title = null; public String getTitle() { return (this.title); } public void setTitle(String title) { this.title = title; } // -------------------------------------------------------- Package Methods /** * Render this channel as XML conforming to the RSS 0.91 specification, * to the specified writer. * * @param writer The writer to render output to */ void render(PrintWriter writer) { writer.println(" "); writer.print(" "); writer.print(title); writer.println(""); writer.print(" "); writer.print(link); writer.println(""); if (description != null) { writer.print(" "); writer.print(description); writer.println(""); } writer.println(" "); } } 1.1 jakarta-commons/jelly/jelly-tags/betwixt/src/test/org/apache/commons/digester/rss/Image.java Index: Image.java =================================================================== /* * Copyright 2001-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.digester.rss; import java.io.PrintWriter; import java.io.Serializable; /** *

Implementation object representing an image in the * Rich Site Summary DTD, version 0.91. This class may be subclassed * to further specialize its behavior.

*/ public class Image implements Serializable { // ------------------------------------------------------------- Properties /** * The image description (1-100 characters). */ protected String description = null; public String getDescription() { return (this.description); } public void setDescription(String description) { this.description = description; } /** * The image height in pixels (1-400). */ protected int height = 31; public int getHeight() { return (this.height); } public void setHeight(int height) { this.height = height; } /** * The image link (1-500 characters). */ protected String link = null; public String getLink() { return (this.link); } public void setLink(String link) { this.link = link; } /** * The image alternate text (1-100 characters). */ protected String title = null; public String getTitle() { return (this.title); } public void setTitle(String title) { this.title = title; } /** * The image location URL (1-500 characters). */ protected String url = null; public String getURL() { return (this.url); } public void setURL(String url) { this.url = url; } /** * The image width in pixels (1-400). */ protected int width = 31; public int getWidth() { return (this.width); } public void setWidth(int width) { this.width = width; } // -------------------------------------------------------- Package Methods /** * Render this channel as XML conforming to the RSS 0.91 specification, * to the specified writer. * * @param writer The writer to render output to */ void render(PrintWriter writer) { writer.println(" "); writer.print(" "); writer.print(title); writer.println(""); writer.print(" "); writer.print(url); writer.println(""); if (link != null) { writer.print(" "); writer.print(link); writer.println(""); } writer.print(" "); writer.print(width); writer.println(""); writer.print(" "); writer.print(height); writer.println(""); if (description != null) { writer.print(" "); writer.print(description); writer.println(""); } writer.println(" "); } } 1.22 +3 -3 jakarta-commons/jelly/jelly-tags/betwixt/project.xml Index: project.xml =================================================================== RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/betwixt/project.xml,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- project.xml 10 Sep 2004 23:25:48 -0000 1.21 +++ project.xml 17 Sep 2004 00:14:46 -0000 1.22 @@ -18,7 +18,7 @@ ${basedir}/../tag-project.xml commons-jelly-tags-betwixt commons-jelly-tags-betwixt - 1.0 + 1.1-SNAPSHOT org.apache.commons.jelly.tags.betwixt @@ -46,13 +46,13 @@ commons-betwixt - 1.0-beta-1 + 0.5 http://jakarta.apache.org/commons/betwixt/ commons-digester - 1.5 + 1.6 http://jakarta.apache.org/commons/digester/ 1.3 +3 -0 jakarta-commons/jelly/jelly-tags/betwixt/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/betwixt/xdocs/changes.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- changes.xml 10 Sep 2004 23:25:49 -0000 1.2 +++ changes.xml 17 Sep 2004 00:14:46 -0000 1.3 @@ -24,6 +24,9 @@ dIon Gillard + + Move to betwixt 0.5 and digester 1.6 + Initial Release --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org