Package com.digimarc.dms.resolver
Class ContentItem
java.lang.Object
com.digimarc.dms.resolver.ContentItem
ContentItem contains the data for a single content entry with the ResolvedContent data received from
the Digimarc Resolver.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the category of this item.Get the content itself.boolean
Inactive resolver payloads return resolve data just like standard (active) payloads.boolean
Some payloads are not actually sent to the Digimarc resolver.Get the payload object stored within this ContentItem.Gets the subtitle of the content.Gets the URL on an image thumbnail associated with this content.getTitle()
Gets the title of the content.
-
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
Gets the title of the content.- Returns:
- Content title.
-
getSubTitle
Gets the subtitle of the content.- Returns:
- Content subtitle. Value will be an empty string if a subtitle is not present.
-
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
Get the content itself.- Returns:
- Content as a string. This is generally an URL.
-
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 toResolver.resolve(Payload)
aResolvedContent
object is created containing aContentItem
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
Gets the category of this item.- Returns:
- Category of this content item.
-