com.sun.syndication.feed.atom

Class Content

public class Content extends Object implements Cloneable, Serializable

Bean for content elements of Atom feeds.

Author: Alejandro Abdelnur Dave Johnson (updated for Atom 1.0)

Field Summary
static StringBASE64
Atom 0.3 only
static StringESCAPED
Atom 0.3 only
static StringHTML
static SetMODES
static StringTEXT
static StringXHTML
static StringXML
Atom 0.3 only
String_mode
ObjectBean_objBean
String_src
String_type
String_value
Constructor Summary
Content()
Default constructor.
Method Summary
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.
StringgetMode()
Returns the content mode (Atom 0.3 only).
StringgetSrc()
Returns the src

StringgetType()
Returns the content type.
StringgetValue()
Returns the content value.
inthashCode()
Returns a hashcode value for the object.
voidsetMode(String mode)
Sets the content mode (Atom 0.3 only).
voidsetSrc(String src)
Set the src

voidsetType(String type)
Sets the content type.
voidsetValue(String value)
Sets the content value.
StringtoString()
Returns the String representation for the object.

Field Detail

BASE64

public static final String BASE64
Atom 0.3 only

ESCAPED

public static final String ESCAPED
Atom 0.3 only

HTML

public static final String HTML

Since: Atom 1.0

MODES

private static final Set MODES

TEXT

public static final String TEXT

Since: Atom 1.0

XHTML

public static final String XHTML

Since: Atom 1.0

XML

public static final String XML
Atom 0.3 only

_mode

private String _mode

_objBean

private ObjectBean _objBean

_src

private String _src

_type

private String _type

_value

private String _value

Constructor Detail

Content

public Content()
Default constructor. All properties are set to null.

Method Detail

clone

public Object clone()
Creates a deep 'bean' clone of the object.

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.

Parameters: other he reference object with which to compare.

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

getMode

public String getMode()
Returns the content mode (Atom 0.3 only).

The mode indicates how the value was/will-be encoded in the XML feed.

Returns: the content mode, null if none.

getSrc

public String getSrc()
Returns the src

Returns: Returns the src.

Since: Atom 1.0

getType

public String getType()
Returns the content type.

The type indicates how the value was/will-be encoded in the XML feed.

Since: Atom 1.0

getValue

public String getValue()
Returns the content value.

The return value should be decoded.

Returns: the content value, null if none.

hashCode

public int hashCode()
Returns a hashcode value for the object.

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

Returns: the hashcode of the bean object.

setMode

public void setMode(String mode)
Sets the content mode (Atom 0.3 only).

The mode indicates how the value was/will-be encoded in the XML feed.

Parameters: mode the content mode, null if none.

setSrc

public void setSrc(String src)
Set the src

Parameters: src The src to set.

Since: Atom 1.0

setType

public void setType(String type)
Sets the content type.

The type indicates how the value was/will-be encoded in the XML feed.

Since: Atom 1.0

setValue

public void setValue(String value)
Sets the content value.

The value being set should be decoded.

Parameters: value the content value, null if none.

toString

public String toString()
Returns the String representation for the object.

Returns: String representation for the object.

Copyright © Sun Microsystems. All Rights Reserved.