Top Description Fields Constructors Methods
com.rometools.rome.feed

public abstract Class WireFeed

extends Object
implements Cloneable, Serializable, Extendable
Class Inheritance
All Implemented Interfaces
com.rometools.rome.feed.module.Extendable, java.io.Serializable, java.lang.Cloneable
Known Direct Subclasses
com.rometools.rome.feed.atom.Feed, com.rometools.rome.feed.rss.Channel
Imports
java.io.Serializable, java.util.Collections, .List, org.jdom2.Element, com.rometools.rome.feed.impl.CloneableBean, .EqualsBean, .ToStringBean, com.rometools.rome.feed.module.Extendable, .Module, com.rometools.rome.feed.module.impl.ModuleUtils, com.rometools.utils.Lists

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

Field Summary

Modifier and TypeField and Description
private String
private String
private List<Element>
private List<Module>
private static final long
private String

Constructor Summary

AccessConstructor and Description
protected
WireFeed()

Default constructor, for bean cloning purposes only.

protected
WireFeed(final String
of the feed to create.
type
)

Creates a feed for a given type.

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

a clone of the object.
clone
()

Overrides java.lang.Object.clone.

Creates a deep 'bean' clone of the object.
public boolean

Returns:

true if 'this' object is equal to the 'other' object.
equals
(final Object
he reference object with which to compare.
other
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one as defined by the Object equals() method.
public String

Returns:

the charset encoding of the feed.
getEncoding
()

Returns the charset encoding of a the feed.

public String

Returns:

the type of the feed.
getFeedType
()

Returns the type of the feed.

public List<Element>

Returns:

Opaque object to discourage use
getForeignMarkup
()

Returns foreign markup found at channel level.

public Module

Returns:

The module with the given URI, null if none.
getModule
(final String
the URI of the ModuleImpl.
uri
)

Implements com.rometools.rome.feed.module.Extendable.getModule.

Returns the module identified by a given URI.
public List<Module>

Returns:

a list of ModuleImpl elements with the channel modules, an empty list if none.
getModules
()

Implements com.rometools.rome.feed.module.Extendable.getModules.

Returns the channel modules.
public String

Returns:

styleSheet URL or null
getStyleSheet
()

URL of XSL-Stylesheet.

public int

Returns:

the hashcode of the bean object.
hashCode
()

Overrides java.lang.Object.hashCode.

Returns a hashcode value for the object.
public void
setEncoding(final String
the charset encoding of the feed.
encoding
)

Sets the charset encoding of a the feed.

public void
setFeedType(final String
the feedType of the feed.
feedType
)

Sets the feedType of a the feed.

public void
setForeignMarkup(final List<Element>
Opaque object to discourage use
foreignMarkup
)

Sets foreign markup found at channel level.

public void
setModules(final List<Module>
the list of ModuleImpl elements with the channel modules to set, an empty list or null if none.
modules
)

Implements com.rometools.rome.feed.module.Extendable.setModules.

Sets the channel modules.
public void
setStyleSheet(final String
URL or null
styleSheet
)

URL of XSL-Stylesheet.

public String

Returns:

String representation for the object.
toString
()

Overrides java.lang.Object.toString.

Returns the String representation for the object.
Inherited from java.lang.Object:
finalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

encodingback to summary
private String encoding
feedTypeback to summary
private String feedType
foreignMarkupback to summary
private List<Element> foreignMarkup
modulesback to summary
private List<Module> modules
serialVersionUIDback to summary
private static final long serialVersionUID
styleSheetback to summary
private String styleSheet

Constructor Detail

WireFeedback to summary
protected WireFeed()

Default constructor, for bean cloning purposes only.

WireFeedback to summary
protected WireFeed(final String type)

Creates a feed for a given type.

Parameters
type:String

of the feed to create.

Method Detail

cloneback to summary
public Object clone() throws CloneNotSupportedException

Overrides java.lang.Object.clone.

Creates a deep 'bean' clone of the object.

Returns:Object

a clone of the object.

Annotations
@Override
Exceptions
CloneNotSupportedException:
thrown if an element of the object cannot be cloned.
equalsback to summary
public boolean equals(final Object other)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one as defined by the Object equals() method.

Parameters
other:Object

he reference object with which to compare.

Returns:boolean

true if 'this' object is equal to the 'other' object.

Annotations
@Override
getEncodingback to summary
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:String

the charset encoding of the feed.

getFeedTypeback to summary
public String getFeedType()

Returns the type of the feed.

Returns:String

the type of the feed.

getForeignMarkupback to summary
public List<Element> getForeignMarkup()

Returns foreign markup found at channel level.

Returns:List<Element>

Opaque object to discourage use

getModuleback to summary
public Module getModule(final String uri)

Implements com.rometools.rome.feed.module.Extendable.getModule.

Returns the module identified by a given URI.

Parameters
uri:String

the URI of the ModuleImpl.

Returns:Module

The module with the given URI, null if none.

Annotations
@Override
getModulesback to summary
public List<Module> getModules()

Implements com.rometools.rome.feed.module.Extendable.getModules.

Returns the channel modules.

Returns:List<Module>

a list of ModuleImpl elements with the channel modules, an empty list if none.

Annotations
@Override
getStyleSheetback to summary
public String getStyleSheet()

URL of XSL-Stylesheet.

Returns:String

styleSheet URL or null

Since
2.0.0
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns a hashcode value for the object.

It follows the contract defined by the Object hashCode() method.

Returns:int

the hashcode of the bean object.

Annotations
@Override
setEncodingback to summary
public void setEncoding(final 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:String

the charset encoding of the feed.

setFeedTypeback to summary
public void setFeedType(final String feedType)

Sets the feedType of a the feed. Do not use, for bean cloning purposes only.

Parameters
feedType:String

the feedType of the feed.

setForeignMarkupback to summary
public void setForeignMarkup(final List<Element> foreignMarkup)

Sets foreign markup found at channel level.

Parameters
foreignMarkup:List<Element>

Opaque object to discourage use

setModulesback to summary
public void setModules(final List<Module> modules)

Implements com.rometools.rome.feed.module.Extendable.setModules.

Sets the channel modules.

Parameters
modules:List<Module>

the list of ModuleImpl elements with the channel modules to set, an empty list or null if none.

Annotations
@Override
setStyleSheetback to summary
public void setStyleSheet(final String styleSheet)

URL of XSL-Stylesheet.

Parameters
styleSheet:String

URL or null

Since
2.0.0
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns the String representation for the object.

Returns:String

String representation for the object.

Annotations
@Override