Class Icon

java.lang.Object
org.apache.juneau.bean.atom.Common
org.apache.juneau.bean.atom.Icon

@Bean(typeName="icon") public class Icon extends Common
Represents a small icon image for visual identification of a feed.

The icon element contains a URI reference to a small image that provides iconic visual identification for the feed. Icons are typically small, square images suitable for display in feed readers and aggregators.

Per RFC 4287 recommendations:

  • Should be square (aspect ratio of 1:1)
  • Should be small (e.g., 16x16, 32x32 pixels)
  • Common formats: PNG, ICO, GIF
Schema

atomIcon = element atom:icon { atomCommonAttributes, (atomUri) }

Example:

Icon icon = new Icon("http://example.org/icon.png"); Feed feed = new Feed(...) .setIcon(icon);

Specification:

Represents an atomIcon construct in the RFC 4287 - Section 4.2.5 specification.

See Also:
  • Constructor Details

    • Icon

      public Icon(Object uri)
      Normal constructor.

      The value can be of any of the following types: URI, URL, String. Strings must be valid URIs.

      URIs defined by UriResolver can be used for values.

      Parameters:
      uri - The URI of the icon.
    • Icon

      public Icon()
      Bean constructor.
  • Method Details

    • getUri

      @Xml(format=TEXT) public URI getUri()
      Bean property getter: uri.

      The URI of this icon.

      Returns:
      The property value, or null if it is not set.
    • setUri

      public Icon setUri(Object value)
      Bean property setter: uri.

      The URI of this icon.

      The value can be of any of the following types: URI, URL, String. Strings must be valid URIs.

      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object
    • setBase

      public Icon setBase(Object value)
      Description copied from class: Common
      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/");

      Overrides:
      setBase in class Common
      Parameters:
      value - The new value for this property.
      Can be null to unset the property.
      Returns:
      This object.
    • setLang

      public Icon setLang(String value)
      Description copied from class: Common
      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");

      Overrides:
      setLang in class Common
      Parameters:
      value - The new value for this property (e.g., "en", "fr", "de", "en-US").
      Can be null to unset the property.
      Returns:
      This object.