@Introspected
public class JsonFeed
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
JsonFeed.Builder
JSON Feed Builder.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
KEY_AUTHOR |
static java.lang.String |
KEY_AUTHORS |
static java.lang.String |
KEY_DESCRIPTION |
static java.lang.String |
KEY_EXPIRED |
static java.lang.String |
KEY_FAVICON |
static java.lang.String |
KEY_FEED_URL |
static java.lang.String |
KEY_HOME_PAGE_URL |
static java.lang.String |
KEY_HUBS |
static java.lang.String |
KEY_ICON |
static java.lang.String |
KEY_ITEMS |
static java.lang.String |
KEY_LANGUAGE |
static java.lang.String |
KEY_NEXT_URL |
static java.lang.String |
KEY_TITLE |
static java.lang.String |
KEY_USER_COMMENT |
static java.lang.String |
KEY_VERSION |
static java.lang.String |
VERSION_JSON_FEED_1 |
static java.lang.String |
VERSION_JSON_FEED_1_1 |
Constructor and Description |
---|
JsonFeed() |
Modifier and Type | Method and Description |
---|---|
void |
addAuthor(JsonFeedAuthor author) |
void |
addHub(JsonHub hub) |
void |
addItem(JsonFeedItem item) |
static JsonFeed.Builder |
builder() |
static JsonFeed.Builder |
builder(java.lang.String title,
java.util.List<JsonFeedItem> items)
Creates builder with required fields.
|
static JsonFeed.Builder |
builder(java.lang.String version,
java.lang.String title,
java.util.List<JsonFeedItem> items) |
java.util.List<JsonFeedAuthor> |
getAuthors()
Specifies one or more feed authors.
|
java.lang.String |
getDescription()
Detail on what the feed is about.
|
java.lang.Boolean |
getExpired()
Says whether or not the feed is finished — that is, whether or not it will ever update again.
|
java.lang.String |
getFavicon()
The URL of an image for the feed suitable to be used in a source list.
|
java.lang.String |
getFeedUrl()
The URL of the feed, and serves as the unique identifier for the feed.
|
java.lang.String |
getHomePageUrl()
The URL of the resource that the feed describes.
|
java.util.List<JsonHub> |
getHubs()
Describes endpoints that can be used to subscribe to real-time notifications from the
publisher of this feed.
|
java.lang.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.
|
java.util.List<JsonFeedItem> |
getItems()
The items in the field.
|
java.lang.String |
getLanguage()
The primary language for the feed in the format specified in RFC 5646.
|
java.lang.String |
getNextURL()
The URL of a feed that provides the next n items, where n is determined by the publisher.
|
java.lang.String |
getTitle()
The name of the feed, which will often correspond to the name of the website.
|
java.lang.String |
getUserComment()
Description of the purpose of the feed.
|
java.lang.String |
getVersion()
Returns the URL of the version of the format the feed uses.
|
void |
setAuthors(java.util.List<JsonFeedAuthor> authors)
Specifies one or more feed authors.
|
void |
setDescription(java.lang.String description)
Detail on what the feed is about.
|
void |
setExpired(java.lang.Boolean expired)
Says whether or not the feed is finished — that is, whether or not it will ever update again.
|
void |
setFavicon(java.lang.String favicon)
The URL of an image for the feed suitable to be used in a source list.
|
void |
setFeedUrl(java.lang.String feedUrl)
The URL of the feed, and serves as the unique identifier for the feed.
|
void |
setHomePageUrl(java.lang.String homePageUrl)
The URL of the resource that the feed describes.
|
void |
setHubs(java.util.List<JsonHub> hubs)
Describes endpoints that can be used to subscribe to real-time notifications from the
publisher of this feed.
|
void |
setIcon(java.lang.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.
|
void |
setItems(java.util.List<JsonFeedItem> items)
The items in the field.
|
void |
setLanguage(java.lang.String language)
The primary language for the feed in the format specified in RFC 5646.
|
void |
setNextURL(java.lang.String nextURL)
The URL of a feed that provides the next n items, where n is determined by the publisher.
|
void |
setTitle(java.lang.String title)
The name of the feed, which will often correspond to the name of the website.
|
void |
setUserComment(java.lang.String userComment)
Description of the purpose of the feed.
|
void |
setVersion(java.lang.String version)
URL of the version of the format the feed uses.
|
java.util.Map<java.lang.String,java.lang.Object> |
toMap() |
public static final java.lang.String VERSION_JSON_FEED_1
public static final java.lang.String VERSION_JSON_FEED_1_1
public static final java.lang.String KEY_VERSION
public static final java.lang.String KEY_TITLE
public static final java.lang.String KEY_HOME_PAGE_URL
public static final java.lang.String KEY_FEED_URL
public static final java.lang.String KEY_DESCRIPTION
public static final java.lang.String KEY_USER_COMMENT
public static final java.lang.String KEY_NEXT_URL
public static final java.lang.String KEY_ICON
public static final java.lang.String KEY_FAVICON
public static final java.lang.String KEY_AUTHORS
public static final java.lang.String KEY_ITEMS
public static final java.lang.String KEY_AUTHOR
public static final java.lang.String KEY_LANGUAGE
public static final java.lang.String KEY_EXPIRED
public static final java.lang.String KEY_HUBS
@NonNull public static JsonFeed.Builder builder()
@NonNull public static JsonFeed.Builder builder(@NonNull java.lang.String title, @NonNull java.util.List<JsonFeedItem> items)
title
- JSON Feed's titleitems
- JSON Feed's items@NonNull public static JsonFeed.Builder builder(@NonNull java.lang.String version, @NonNull java.lang.String title, @NonNull java.util.List<JsonFeedItem> items)
version
- JSON Feed versiontitle
- JSON Feed's titleitems
- JSON Feed's itemspublic void setVersion(@NonNull java.lang.String version)
version
- of JSON feed@NonNull public java.lang.String getVersion()
@NonNull public java.lang.String getTitle()
public void setTitle(@NonNull java.lang.String title)
title
- the name of the feed@Nullable public java.lang.String getHomePageUrl()
public void setHomePageUrl(@Nullable java.lang.String homePageUrl)
homePageUrl
- The URL of the resource that the feed describespublic java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- detail on what the feed is about@Nullable public java.lang.String getFeedUrl()
public void setFeedUrl(@Nullable java.lang.String feedUrl)
feedUrl
- the URL of the feed, and serves as the unique identifier for the feed@Nullable public java.lang.String getUserComment()
public void setUserComment(@Nullable java.lang.String userComment)
userComment
- description of the purpose of the feed.@Nullable public java.lang.String getNextURL()
public void setNextURL(@Nullable java.lang.String nextURL)
nextURL
- the URL of a feed that provides the next n items@Nullable public java.lang.String getIcon()
public void setIcon(@Nullable java.lang.String icon)
icon
- the URL of an image for the feed suitable to be used in a timeline@Nullable public java.lang.String getFavicon()
public void setFavicon(@Nullable java.lang.String favicon)
favicon
- the URL of an image for the feed suitable to be used in a source listpublic java.util.List<JsonFeedAuthor> getAuthors()
public void setAuthors(@Nullable java.util.List<JsonFeedAuthor> authors)
authors
- specifies one or more feed authors@Nullable public java.lang.String getLanguage()
public void setLanguage(@Nullable java.lang.String language)
language
- the primary language for the feed@Nullable public java.lang.Boolean getExpired()
public void setExpired(@Nullable java.lang.Boolean expired)
expired
- says whether or not the feed is finished@Nullable public java.util.List<JsonHub> getHubs()
public void setHubs(@Nullable java.util.List<JsonHub> hubs)
hubs
- Describes endpoints that can be used to subscribe to real-time notificationspublic void addHub(@NonNull JsonHub hub)
hub
- Endpoint that can be used to subscribe to real-time notifications from the publisher of this feed.@NonNull public java.util.List<JsonFeedItem> getItems()
public void setItems(@NonNull java.util.List<JsonFeedItem> items)
items
- list of items in the feedpublic void addAuthor(@NonNull JsonFeedAuthor author)
author
- Global JSON Feed's authorpublic void addItem(@NonNull JsonFeedItem item)
item
- JSON Feed's item@NonNull public java.util.Map<java.lang.String,java.lang.Object> toMap()