Package com.attribyte.parser.model
Class Resource.Builder
java.lang.Object
com.attribyte.parser.model.Resource.Builder
- Enclosing class:
Resource
Builds immutable resources.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds an author.Adds an entry.addFeedLink(String feedLink) Adds a feed link.Adds a tag.build()Builds an immutable resource.Gets the amp link.com.google.common.collect.ImmutableList<Author> Gets an immutable list of authors.Gets the base link.Gets the canonical link.Gets the description.com.google.common.collect.ImmutableList<Entry> Gets an immutable list of entries.com.google.common.collect.ImmutableList<String> Gets an immutable list of feed links.getIcon()Gets the icon.getLogo()Gets the logo.getMetadata(String key) Gets previously set metadata.longGets the published timestamp.Gets the rights.Gets the site link.Gets the source link.Gets the subtitle.com.google.common.collect.ImmutableList<String> getTags()Gets an immutable list of tags.getTitle()Gets the title.longGets the updated timestamp.setAmpLink(String ampLink) Sets the amp link.setAuthors(List<Author> authors) Sets the list of authors.setBaseLink(String baseLink) Sets the base link.setCanonicalLink(String canonicalLink) Sets the canonical link.setDescription(String description) Sets the description.setEntries(List<Entry> entries) Sets the list of entries.setFeedLinks(List<String> feedLinks) Sets the feed links.Sets the icon.Sets the logo.setMetadata(String key, String value) Sets a metadata value.setPublishedTimestamp(long publishedTimestamp) Sets the published timestamp.Sets the rights.setSiteLink(String siteLink) Sets the site link.setSourceLink(String sourceLink) Sets the source link.setSubtitle(String subtitle) Sets the subtitle.Sets the list of tags.Sets the title.setUpdatedTimestamp(long updatedTimestamp) Sets the updated timestamp.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
getSourceLink
Gets the source link.- Returns:
- The source link.
-
setSourceLink
Sets the source link.- Parameters:
sourceLink- The source link.- Returns:
- A self-reference.
-
getCanonicalLink
Gets the canonical link.- Returns:
- The canonical link.
-
setCanonicalLink
Sets the canonical link.- Parameters:
canonicalLink- The canonical link.- Returns:
- A self-reference.
-
getBaseLink
Gets the base link.- Returns:
- The base link.
-
setBaseLink
Sets the base link.- Parameters:
baseLink- The base link.- Returns:
- A self-reference.
-
getTitle
Gets the title.- Returns:
- The title.
-
setTitle
Sets the title.- Parameters:
title- The title.- Returns:
- A self-reference.
-
getSubtitle
Gets the subtitle.- Returns:
- The subtitle.
-
setSubtitle
Sets the subtitle.- Parameters:
subtitle- The subtitle.- Returns:
- A self-reference.
-
getDescription
Gets the description.- Returns:
- The description.
-
setDescription
Sets the description.- Parameters:
description- The description.- Returns:
- A self-reference.
-
getIcon
Gets the icon.- Returns:
- The icon.
-
setIcon
Sets the icon.- Parameters:
icon- The icon.- Returns:
- A self-reference.
-
getLogo
Gets the logo.- Returns:
- The logo.
-
setLogo
Sets the logo.- Parameters:
logo- The logo.- Returns:
- A self-reference.
-
getAuthors
Gets an immutable list of authors.- Returns:
- The list of authors.
-
setAuthors
Sets the list of authors.- Parameters:
authors- The list of authors.- Returns:
- A self-reference.
-
addAuthor
Adds an author.- Parameters:
author- The author to add.- Returns:
- A self reference.
-
getTags
Gets an immutable list of tags.- Returns:
- The list of tags.
-
setTags
Sets the list of tags.- Parameters:
tags- The list of tags.- Returns:
- A self-reference.
-
addTag
Adds a tag.- Parameters:
tag- The tag to add.- Returns:
- A self-reference.
-
getEntries
Gets an immutable list of entries.- Returns:
- The list of entries.
-
setEntries
Sets the list of entries.- Parameters:
entries- The list of entries.- Returns:
- A self-reference.
-
addEntry
Adds an entry.- Parameters:
entry- The entry to add.- Returns:
- A self-reference.
-
getPublishedTimestamp
public long getPublishedTimestamp()Gets the published timestamp.- Returns:
- The published timestamp.
-
setPublishedTimestamp
Sets the published timestamp.- Parameters:
publishedTimestamp- The published timestamp.- Returns:
- A self-reference.
-
getUpdatedTimestamp
public long getUpdatedTimestamp()Gets the updated timestamp.- Returns:
- The updated timestamp.
-
setUpdatedTimestamp
Sets the updated timestamp.- Parameters:
updatedTimestamp- The updated timestamp.- Returns:
- A self-reference.
-
getRights
Gets the rights.- Returns:
- The rights.
-
setRights
Sets the rights.- Parameters:
rights- The rights.- Returns:
- A self-reference.
-
getSiteLink
Gets the site link.- Returns:
- The site link.
-
setSiteLink
Sets the site link.- Parameters:
siteLink- The site link.- Returns:
- A self-reference.
-
getFeedLinks
Gets an immutable list of feed links.- Returns:
- The feed links.
-
setFeedLinks
Sets the feed links.- Parameters:
feedLinks- The feed links.- Returns:
- A self-reference.
-
addFeedLink
Adds a feed link.- Parameters:
feedLink- The link to add.- Returns:
- A self-reference.
-
getAmpLink
Gets the amp link.- Returns:
- The amp link.
-
setAmpLink
Sets the amp link.- Parameters:
ampLink- The amp link.- Returns:
- A self-reference.
-
setMetadata
Sets a metadata value.- Parameters:
key- The key.value- The value.- Returns:
- A self-reference.
-
getMetadata
Gets previously set metadata.- Parameters:
key- The key.- Returns:
- The value or
nullif none.
-
build
Builds an immutable resource.- Returns:
- The resource.
-