Package com.rometools.rome.feed
Class WireFeed
- java.lang.Object
-
- com.rometools.rome.feed.WireFeed
-
- All Implemented Interfaces:
Extendable,Serializable,Cloneable
public abstract class WireFeed extends Object implements Cloneable, Serializable, Extendable
Parent class of the RSS (Channel) and Atom (Feed) feed beans.NOTE: We don't like this class at this package level but the alternative would have been a proliferation of packages (one more level to hold atom and rss package with this class just in that package).
The format of the 'type' property must be [FEEDNAME]_[FEEDVERSION] with the FEEDNAME in lower case, for example: rss_0.9, rss_0.93, atom_0.3
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectclone()Creates a deep 'bean' clone of the object.booleanequals(Object other)Indicates whether some other object is "equal to" this one as defined by the Object equals() method.StringgetEncoding()Returns the charset encoding of a the feed.StringgetFeedType()Returns the type of the feed.List<org.jdom2.Element>getForeignMarkup()Returns foreign markup found at channel level.ModulegetModule(String uri)Returns the module identified by a given URI.List<Module>getModules()Returns the channel modules.StringgetStyleSheet()URL of XSL-Stylesheet.inthashCode()Returns a hashcode value for the object.voidsetEncoding(String encoding)Sets the charset encoding of a the feed.voidsetFeedType(String feedType)Sets the feedType of a the feed.voidsetForeignMarkup(List<org.jdom2.Element> foreignMarkup)Sets foreign markup found at channel level.voidsetModules(List<Module> modules)Sets the channel modules.voidsetStyleSheet(String styleSheet)URL of XSL-Stylesheet.StringtoString()Returns the String representation for the object.
-
-
-
Constructor Detail
-
WireFeed
protected WireFeed()
Default constructor, for bean cloning purposes only.
-
WireFeed
protected WireFeed(String type)
Creates a feed for a given type.- Parameters:
type- of the feed to create.
-
-
Method Detail
-
clone
public Object clone() throws CloneNotSupportedException
Creates a deep 'bean' clone of the object.- Overrides:
clonein classObject- Returns:
- a clone of the object.
- Throws:
CloneNotSupportedException- thrown if an element of the object cannot be cloned.
-
equals
public boolean equals(Object other)
Indicates whether some other object is "equal to" this one as defined by the Object equals() method.
-
hashCode
public int hashCode()
Returns a hashcode value for the object.It follows the contract defined by the Object hashCode() method.
-
toString
public String toString()
Returns the String representation for the object.
-
setFeedType
public void setFeedType(String feedType)
Sets the feedType of a the feed. Do not use, for bean cloning purposes only.- Parameters:
feedType- the feedType of the feed.
-
getFeedType
public String getFeedType()
Returns the type of the feed.- Returns:
- the type of the feed.
-
getEncoding
public String getEncoding()
Returns the charset encoding of a the feed.This property is not set by feed parsers. But it is used by feed generators to set the encoding in the XML prolog.
- Returns:
- the charset encoding of the feed.
-
setEncoding
public void setEncoding(String encoding)
Sets the charset encoding of a the feed.This property is not set by feed parsers. But it is used by feed generators to set the encoding in the XML prolog.
- Parameters:
encoding- the charset encoding of the feed.
-
getModules
public List<Module> getModules()
Returns the channel modules.- Specified by:
getModulesin interfaceExtendable- Returns:
- a list of ModuleImpl elements with the channel modules, an empty list if none.
-
setModules
public void setModules(List<Module> modules)
Sets the channel modules.- Specified by:
setModulesin interfaceExtendable- Parameters:
modules- the list of ModuleImpl elements with the channel modules to set, an empty list or null if none.
-
getModule
public Module getModule(String uri)
Returns the module identified by a given URI.- Specified by:
getModulein interfaceExtendable- Parameters:
uri- the URI of the ModuleImpl.- Returns:
- The module with the given URI, null if none.
-
getForeignMarkup
public List<org.jdom2.Element> getForeignMarkup()
Returns foreign markup found at channel level.- Returns:
- Opaque object to discourage use
-
setForeignMarkup
public void setForeignMarkup(List<org.jdom2.Element> foreignMarkup)
Sets foreign markup found at channel level.- Parameters:
foreignMarkup- Opaque object to discourage use
-
getStyleSheet
public String getStyleSheet()
URL of XSL-Stylesheet.- Returns:
- styleSheet URL or
null - Since:
- 2.0.0
-
setStyleSheet
public void setStyleSheet(String styleSheet)
URL of XSL-Stylesheet.- Parameters:
styleSheet- URL ornull- Since:
- 2.0.0
-
-