FeedEntry
One entry of a feed. Stable Core. Built with FeedEntry(id) { title = …; link = … }, by RomeFeedParser and by a parser of your own.
What every entry guarantees (the factory enforces it, whichever parser built the entry):
id is never blank.
link, when present, is a canonical absolute
httporhttpslink with its fragment kept.Urlis not used: it drops fragments and refuses non-ASCII hosts.every enclosure has a canonical absolute URL and a FeedEnclosure.lengthBytes that is
nullor positive.
Whichever parser built the entry, treat summary and content as untrusted markup (HTML, XHTML or text, the format does not say) and sanitise them before rendering.
As RomeFeedParser builds it (a parser of your own guarantees only the invariants above):
id is the guid or Atom id, else the entry's link as written, else a digest
webtools-feeds:v1:<32 hex digits>of its title, summary or content, enclosure URL and published date. The rule is frozen: an id you stored stays the same for the same entry across releases, and does not change when the feed moves host or protocol. An entry with nothing to hash has the constant digest of nothing, so several can share an id.publishedAtEpochMillis and updatedAtEpochMillis are
nullwhen absent, unparseable or outside the years 1 to 9999.categories hold no exact duplicates; enclosures hold no two with the same URL.
Never use the dates to decide whether an entry is new: use id. Equality is on every field. toString() prints counts and presence, never text, and links as scheme, host and port.
Types
Collects the optional fields of a FeedEntry. Not thread-safe; use it only inside the factory's lambda.
Properties
Functions
Two FeedEntrys are equal when their id, title, link, summary, content, author, publishedAtEpochMillis, updatedAtEpochMillis, categories and enclosures are equal.
A diagnostic string for logs: the length of id, the link as scheme, host and port, the numbers of categories and enclosures, and whether each other optional field is present, never any text. Its format is not part of the API and may change.