Class Common
This abstract class defines attributes that can appear on any Atom element. Per RFC 4287,
all Atom elements may have
Common attributes:
- xml:base - Establishes a base URI for resolving relative references
- xml:lang - Indicates the natural language of the element's content
This class is extended by all Atom bean classes (Feed
, Entry
, Link
,
Person
, Category
, Text
, etc.).
Schema
atomCommonAttributes = attribute xml:base { atomUri }?, attribute xml:lang { atomLanguageTag }?, undefinedAttribute*
Examples:
Specification:
Represents
See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Common
public Common()
-
-
Method Details
-
getBase
Bean property getter:base .Returns the base URI for resolving relative URI references (xml:base attribute).
This attribute, defined by XML Base, establishes a base URI for resolving any relative references within the scope of this element. This is particularly useful when aggregating content from multiple sources.
- Returns:
- The property value, or
null if it is not set.
-
setBase
Bean property setter:base .Sets the base URI for resolving relative URI references (xml:base attribute).
The value can be of any of the following types:
URI
,URL
,String
. Strings must be valid URIs.Example:
Feed
feed =new Feed(...) .setBase("http://example.org/" );- Parameters:
value
- The new value for this property.
Can benull to unset the property.- Returns:
- This object.
-
getLang
Bean property getter:lang .Returns the natural language of the element's content (xml:lang attribute).
The language tag should be a language identifier as defined by RFC 3066. This attribute is inherited by child elements, so it need only be specified on the highest-level element where it applies.
- Returns:
- The property value, or
null if it is not set.
-
setLang
Bean property setter:lang .Sets the natural language of the element's content (xml:lang attribute).
Example:
Text
title =new Text("text" ) .setText("Mon Blog" ) .setLang("fr" );- Parameters:
value
- The new value for this property (e.g., "en", "fr", "de", "en-US").
Can benull to unset the property.- Returns:
- This object.
-
toString
-