1 17 package com.sun.syndication.feed; 18 19 import com.sun.syndication.feed.impl.ObjectBean; 20 import com.sun.syndication.feed.module.Module; 21 import com.sun.syndication.feed.module.impl.ModuleUtils; 22 23 import java.util.List ; 24 import java.util.ArrayList ; 25 import java.io.Serializable ; 26 27 40 public abstract class WireFeed implements Cloneable ,Serializable { 41 private ObjectBean _objBean; 42 private String _feedType; 43 private String _encoding; 44 private List _modules; 45 46 51 protected WireFeed() { 52 _objBean = new ObjectBean(this.getClass(),this); 53 } 54 55 61 protected WireFeed(String type) { 62 this(); 63 _feedType = type; 64 } 65 66 73 public Object clone() throws CloneNotSupportedException { 74 return _objBean.clone(); 75 } 76 77 84 public boolean equals(Object other) { 85 return _objBean.equals(other); 86 } 87 88 96 public int hashCode() { 97 return _objBean.hashCode(); 98 } 99 100 106 public String toString() { 107 return _objBean.toString(); 108 } 109 110 111 112 113 114 120 public void setFeedType(String feedType) { 121 _feedType = feedType; 122 } 123 124 129 public String getFeedType() { 130 return _feedType; 131 } 132 133 142 public String getEncoding() { 143 return _encoding; 144 } 145 146 155 public void setEncoding(String encoding) { 156 _encoding = encoding; 157 } 158 159 160 167 public List getModules() { 168 return (_modules==null) ? (_modules=new ArrayList ()) : _modules; 169 } 170 171 178 public void setModules(List modules) { 179 _modules = modules; 180 } 181 182 188 public Module getModule(String uri) { 189 return ModuleUtils.getModule(_modules,uri); 190 } 191 192 } 193 | Popular Tags |