1 16 17 18 package org.apache.commons.digester.rss; 19 20 import java.io.PrintWriter ; 21 import java.io.Serializable ; 22 23 24 29 30 public class Item implements Serializable { 31 32 33 35 36 39 protected String description = null; 40 41 public String getDescription() { 42 return (this.description); 43 } 44 45 public void setDescription(String description) { 46 this.description = description; 47 } 48 49 50 53 protected String link = null; 54 55 public String getLink() { 56 return (this.link); 57 } 58 59 public void setLink(String link) { 60 this.link = link; 61 } 62 63 64 67 protected String title = null; 68 69 public String getTitle() { 70 return (this.title); 71 } 72 73 public void setTitle(String title) { 74 this.title = title; 75 } 76 77 78 80 81 87 void render(PrintWriter writer) { 88 89 writer.println(" <item>"); 90 91 writer.print(" <title>"); 92 writer.print(title); 93 writer.println("</title>"); 94 95 writer.print(" <link>"); 96 writer.print(link); 97 writer.println("</link>"); 98 99 if (description != null) { 100 writer.print(" <description>"); 101 writer.print(description); 102 writer.println("</description>"); 103 } 104 105 writer.println(" </item>"); 106 107 } 108 109 110 } 111 | Popular Tags |