Class ContentItem

java.lang.Object
com.digimarc.dms.resolver.ContentItem

public class ContentItem extends Object
ContentItem contains the data for a single content entry with the ResolvedContent data received from the Digimarc Resolver.
  • Constructor Details

    • ContentItem

      public ContentItem(@Nullable String title, @Nullable String subTitle, @Nullable String thumbnailUrl, @Nullable String content, @NonNull Payload payload)
      Constructor.
      Parameters:
      title - Title of the content data.
      subTitle - Subtitle of the content data.
      thumbnailUrl - URL to an image thumbnail that is associated with this content. This value may be empty.
      content - The content itself. This is generally an URL.
      payload - Payload associated with this content.
    • ContentItem

      public ContentItem(@Nullable String title, @Nullable String subTitle, @Nullable String thumbnailUrl, @Nullable String content, boolean synthesizedContent, @NonNull Payload payload)
      Constructor.
      Parameters:
      title - Title of the content data.
      subTitle - Subtitle of the content data.
      thumbnailUrl - URL to an image thumbnail that is associated with this content. This value may be empty.
      content - The content itself. This is generally an URL.
      synthesizedContent - Specifies whether this result was generated locally.
      payload - Payload associated with this content.
  • Method Details

    • getTitle

      @NonNull public String getTitle()
      Gets the title of the content.
      Returns:
      Content title.
    • getSubTitle

      @NonNull public String getSubTitle()
      Gets the subtitle of the content.
      Returns:
      Content subtitle. Value will be an empty string if a subtitle is not present.
    • getThumbnailUrl

      @NonNull public String getThumbnailUrl()
      Gets the URL on an image thumbnail associated with this content.
      Returns:
      URL to an image thumbnail that is associated with this content. This value will be an empty string if no thumbnail is available.
    • getContent

      @NonNull public String getContent()
      Get the content itself.
      Returns:
      Content as a string. This is generally an URL.
    • getPayload

      @NonNull public Payload getPayload()
      Get the payload object stored within this ContentItem.
      Returns:
      Payload
    • getIsSynthesizedContent

      public boolean getIsSynthesizedContent()
      Some payloads are not actually sent to the Digimarc resolver. One example of this is QR Codes, which contain all the content data needed within themselves. When payloads like this are passed to Resolver.resolve(Payload) a ResolvedContent object is created containing a ContentItem filled in with the data from the QR code itself. In a case like this the getIsSynthesizedContent flag will be set to true to indicate that the resolve data was created locally rather than being resolved over the network.
      Returns:
      True if this content item was created locally, false if the content was resolved over the network.
    • getIsInactiveContent

      public boolean getIsInactiveContent()
      Inactive resolver payloads return resolve data just like standard (active) payloads. The main difference is that the returned data for these inactive payloads all contain the same target (content) URL. This URL links to a Digimarc landing page.
      Returns:
      True if this content data is for an inactive payload.
    • getCategory

      @NonNull public ContentItem.Category getCategory()
      Gets the category of this item.
      Returns:
      Category of this content item.