Class JsonFeed

java.lang.Object
io.micronaut.rss.jsonfeed.JsonFeed

@Introspected public class JsonFeed extends Object
A JSON Feed is a list that may change over time, and the individual items in the list may change..
Since:
2.2.0
Author:
Sergio del Amo, mark1626
See Also:
  • Field Details

  • Constructor Details

    • JsonFeed

      public JsonFeed()
  • Method Details

    • builder

      @NonNull public static @NonNull JsonFeed.Builder builder()
      Returns:
      JSON Feed Builder
    • builder

      @NonNull public static @NonNull JsonFeed.Builder builder(@NonNull @NonNull String title, @NonNull @NonNull List<JsonFeedItem> items)
      Creates builder with required fields.
      Parameters:
      title - JSON Feed's title
      items - JSON Feed's items
      Returns:
      JSON Feed Builder
    • builder

      @NonNull public static @NonNull JsonFeed.Builder builder(@NonNull @NonNull String version, @NonNull @NonNull String title, @NonNull @NonNull List<JsonFeedItem> items)
      Parameters:
      version - JSON Feed version
      title - JSON Feed's title
      items - JSON Feed's items
      Returns:
      JSON Feed Builder
    • setVersion

      public void setVersion(@NonNull @NonNull String version)
      URL of the version of the format the feed uses.
      Parameters:
      version - of JSON feed
    • getVersion

      @NonNull public @NonNull String getVersion()
      Returns the URL of the version of the format the feed uses.
      Returns:
      version of JSON feed
    • getTitle

      @NonNull public @NonNull String getTitle()
      The name of the feed, which will often correspond to the name of the website.
      Returns:
      the name of the feed
    • setTitle

      public void setTitle(@NonNull @NonNull String title)
      The name of the feed, which will often correspond to the name of the website.
      Parameters:
      title - the name of the feed
    • getHomePageUrl

      @Nullable public @Nullable String getHomePageUrl()
      The URL of the resource that the feed describes. This resource may or may not actually be a “home” page, but it should be an HTML page
      Returns:
      The URL of the resource that the feed describes
    • setHomePageUrl

      public void setHomePageUrl(@Nullable @Nullable String homePageUrl)
      The URL of the resource that the feed describes. This resource may or may not actually be a “home” page, but it should be an HTML page
      Parameters:
      homePageUrl - The URL of the resource that the feed describes
    • getDescription

      public String getDescription()
      Detail on what the feed is about. A feed reader may display this text.
      Returns:
      detail on what the feed is about
    • setDescription

      public void setDescription(String description)
      Detail on what the feed is about. A feed reader may display this text.
      Parameters:
      description - detail on what the feed is about
    • getFeedUrl

      @Nullable public @Nullable String getFeedUrl()
      The URL of the feed, and serves as the unique identifier for the feed.
      Returns:
      the URL of the feed, and serves as the unique identifier for the feed
    • setFeedUrl

      public void setFeedUrl(@Nullable @Nullable String feedUrl)
      The URL of the feed, and serves as the unique identifier for the feed.
      Parameters:
      feedUrl - the URL of the feed, and serves as the unique identifier for the feed
    • getUserComment

      @Nullable public @Nullable String getUserComment()
      Description of the purpose of the feed. This is for the use of people looking at the raw JSON, and should be ignored by feed readers
      Returns:
      description of the purpose of the feed.
    • setUserComment

      public void setUserComment(@Nullable @Nullable String userComment)
      Description of the purpose of the feed. This is for the use of people looking at the raw JSON, and should be ignored by feed readers
      Parameters:
      userComment - description of the purpose of the feed.
    • getNextURL

      @Nullable public @Nullable String getNextURL()
      The URL of a feed that provides the next n items, where n is determined by the publisher. This allows for pagination, but with the expectation that reader software is not required to use it and probably won’t use it very often
      Returns:
      the URL of a feed that provides the next n items
    • setNextURL

      public void setNextURL(@Nullable @Nullable String nextURL)
      The URL of a feed that provides the next n items, where n is determined by the publisher. This allows for pagination, but with the expectation that reader software is not required to use it and probably won’t use it very often
      Parameters:
      nextURL - the URL of a feed that provides the next n items
    • getIcon

      @Nullable public @Nullable String getIcon()
      The URL of an image for the feed suitable to be used in a timeline, much the way an avatar might be used. It should be square and relatively large — such as 512 x 512 pixels
      Returns:
      the URL of an image for the feed suitable to be used in a timeline
    • setIcon

      public void setIcon(@Nullable @Nullable String icon)
      The URL of an image for the feed suitable to be used in a timeline, much the way an avatar might be used. It should be square and relatively large — such as 512 x 512 pixels
      Parameters:
      icon - the URL of an image for the feed suitable to be used in a timeline
    • getFavicon

      @Nullable public @Nullable String getFavicon()
      The URL of an image for the feed suitable to be used in a source list. It should be square and relatively small, but not smaller than 64 x 64 pixels
      Returns:
      the URL of an image for the feed suitable to be used in a source list
    • setFavicon

      public void setFavicon(@Nullable @Nullable String favicon)
      The URL of an image for the feed suitable to be used in a source list. It should be square and relatively small, but not smaller than 64 x 64 pixels
      Parameters:
      favicon - the URL of an image for the feed suitable to be used in a source list
    • getAuthors

      public List<@Valid JsonFeedAuthor> getAuthors()
      Specifies one or more feed authors. The author object has several members
      Returns:
      specifies one or more feed authors
    • setAuthors

      public void setAuthors(@Nullable @Nullable List<@Valid JsonFeedAuthor> authors)
      Specifies one or more feed authors. The author object has several members
      Parameters:
      authors - specifies one or more feed authors
    • getLanguage

      @Nullable public @Nullable String getLanguage()
      The primary language for the feed in the format specified in RFC 5646.
      Returns:
      the primary language for the feed
    • setLanguage

      public void setLanguage(@Nullable @Nullable String language)
      The primary language for the feed in the format specified in RFC 5646.
      Parameters:
      language - the primary language for the feed
    • getExpired

      @Nullable public @Nullable Boolean getExpired()
      Says whether or not the feed is finished — that is, whether or not it will ever update again.
      Returns:
      expired says whether or not the feed is finished
    • setExpired

      public void setExpired(@Nullable @Nullable Boolean expired)
      Says whether or not the feed is finished — that is, whether or not it will ever update again.
      Parameters:
      expired - says whether or not the feed is finished
    • getHubs

      @Nullable public @Nullable List<@Valid JsonHub> getHubs()
      Describes endpoints that can be used to subscribe to real-time notifications from the publisher of this feed.
      Returns:
      Describes endpoints that can be used to subscribe to real-time notifications
    • setHubs

      public void setHubs(@Nullable @Nullable List<@Valid JsonHub> hubs)
      Describes endpoints that can be used to subscribe to real-time notifications from the publisher of this feed.
      Parameters:
      hubs - Describes endpoints that can be used to subscribe to real-time notifications
    • addHub

      public void addHub(@NonNull @NonNull JsonHub hub)
      Parameters:
      hub - Endpoint that can be used to subscribe to real-time notifications from the publisher of this feed.
    • getItems

      @NonNull public @NonNull List<JsonFeedItem> getItems()
      The items in the field.
      Returns:
      list of items in the feed
    • setItems

      public void setItems(@NonNull @NonNull List<JsonFeedItem> items)
      The items in the field.
      Parameters:
      items - list of items in the feed
    • addAuthor

      public void addAuthor(@NonNull @NonNull JsonFeedAuthor author)
      Parameters:
      author - Global JSON Feed's author
    • addItem

      public void addItem(@NonNull @NonNull JsonFeedItem item)
      Parameters:
      item - JSON Feed's item
    • toMap

      @NonNull public @NonNull Map<String,Object> toMap()
      Returns:
      Map representation of Object.