Class Resource.Builder

java.lang.Object
com.attribyte.parser.model.Resource.Builder
Enclosing class:
Resource

public static class Resource.Builder extends Object
Builds immutable resources.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • getSourceLink

      public String getSourceLink()
      Gets the source link.
      Returns:
      The source link.
    • setSourceLink

      public Resource.Builder setSourceLink(String sourceLink)
      Sets the source link.
      Parameters:
      sourceLink - The source link.
      Returns:
      A self-reference.
    • getCanonicalLink

      public String getCanonicalLink()
      Gets the canonical link.
      Returns:
      The canonical link.
    • setCanonicalLink

      public Resource.Builder setCanonicalLink(String canonicalLink)
      Sets the canonical link.
      Parameters:
      canonicalLink - The canonical link.
      Returns:
      A self-reference.
    • getBaseLink

      public String getBaseLink()
      Gets the base link.
      Returns:
      The base link.
    • setBaseLink

      public Resource.Builder setBaseLink(String baseLink)
      Sets the base link.
      Parameters:
      baseLink - The base link.
      Returns:
      A self-reference.
    • getTitle

      public String getTitle()
      Gets the title.
      Returns:
      The title.
    • setTitle

      public Resource.Builder setTitle(String title)
      Sets the title.
      Parameters:
      title - The title.
      Returns:
      A self-reference.
    • getSubtitle

      public String getSubtitle()
      Gets the subtitle.
      Returns:
      The subtitle.
    • setSubtitle

      public Resource.Builder setSubtitle(String subtitle)
      Sets the subtitle.
      Parameters:
      subtitle - The subtitle.
      Returns:
      A self-reference.
    • getDescription

      public String getDescription()
      Gets the description.
      Returns:
      The description.
    • setDescription

      public Resource.Builder setDescription(String description)
      Sets the description.
      Parameters:
      description - The description.
      Returns:
      A self-reference.
    • getIcon

      public Image getIcon()
      Gets the icon.
      Returns:
      The icon.
    • setIcon

      public Resource.Builder setIcon(Image icon)
      Sets the icon.
      Parameters:
      icon - The icon.
      Returns:
      A self-reference.
    • getLogo

      public Image getLogo()
      Gets the logo.
      Returns:
      The logo.
    • setLogo

      public Resource.Builder setLogo(Image logo)
      Sets the logo.
      Parameters:
      logo - The logo.
      Returns:
      A self-reference.
    • getAuthors

      public com.google.common.collect.ImmutableList<Author> getAuthors()
      Gets an immutable list of authors.
      Returns:
      The list of authors.
    • setAuthors

      public Resource.Builder setAuthors(List<Author> authors)
      Sets the list of authors.
      Parameters:
      authors - The list of authors.
      Returns:
      A self-reference.
    • addAuthor

      public Resource.Builder addAuthor(Author author)
      Adds an author.
      Parameters:
      author - The author to add.
      Returns:
      A self reference.
    • getTags

      public com.google.common.collect.ImmutableList<String> getTags()
      Gets an immutable list of tags.
      Returns:
      The list of tags.
    • setTags

      public Resource.Builder setTags(List<String> tags)
      Sets the list of tags.
      Parameters:
      tags - The list of tags.
      Returns:
      A self-reference.
    • addTag

      public Resource.Builder addTag(String tag)
      Adds a tag.
      Parameters:
      tag - The tag to add.
      Returns:
      A self-reference.
    • getEntries

      public com.google.common.collect.ImmutableList<Entry> getEntries()
      Gets an immutable list of entries.
      Returns:
      The list of entries.
    • setEntries

      public Resource.Builder setEntries(List<Entry> entries)
      Sets the list of entries.
      Parameters:
      entries - The list of entries.
      Returns:
      A self-reference.
    • addEntry

      public Resource.Builder addEntry(Entry entry)
      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

      public Resource.Builder setPublishedTimestamp(long publishedTimestamp)
      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

      public Resource.Builder setUpdatedTimestamp(long updatedTimestamp)
      Sets the updated timestamp.
      Parameters:
      updatedTimestamp - The updated timestamp.
      Returns:
      A self-reference.
    • getRights

      public String getRights()
      Gets the rights.
      Returns:
      The rights.
    • setRights

      public Resource.Builder setRights(String rights)
      Sets the rights.
      Parameters:
      rights - The rights.
      Returns:
      A self-reference.
    • getSiteLink

      public String getSiteLink()
      Gets the site link.
      Returns:
      The site link.
    • setSiteLink

      public Resource.Builder setSiteLink(String siteLink)
      Sets the site link.
      Parameters:
      siteLink - The site link.
      Returns:
      A self-reference.
    • getFeedLinks

      public com.google.common.collect.ImmutableList<String> getFeedLinks()
      Gets an immutable list of feed links.
      Returns:
      The feed links.
    • setFeedLinks

      public Resource.Builder setFeedLinks(List<String> feedLinks)
      Sets the feed links.
      Parameters:
      feedLinks - The feed links.
      Returns:
      A self-reference.
    • addFeedLink

      public Resource.Builder addFeedLink(String feedLink)
      Adds a feed link.
      Parameters:
      feedLink - The link to add.
      Returns:
      A self-reference.
    • getAmpLink

      public String getAmpLink()
      Gets the amp link.
      Returns:
      The amp link.
    • setAmpLink

      public Resource.Builder setAmpLink(String ampLink)
      Sets the amp link.
      Parameters:
      ampLink - The amp link.
      Returns:
      A self-reference.
    • setMetadata

      public Resource.Builder setMetadata(String key, String value)
      Sets a metadata value.
      Parameters:
      key - The key.
      value - The value.
      Returns:
      A self-reference.
    • getMetadata

      public String getMetadata(String key)
      Gets previously set metadata.
      Parameters:
      key - The key.
      Returns:
      The value or null if none.
    • build

      public Resource build()
      Builds an immutable resource.
      Returns:
      The resource.