public class Bookmark extends ActivityObject
The "bookmark" Object type represents a pointer to some URL -- typically a web page. In most cases, a bookmark is specific to a given user and contains metadata chosen by that user. Bookmark Objects are similar in principle to the concept of bookmarks or favorites in a web browser. A bookmark represents a pointer to the URL, not the URL or the associated resource itself.
When dealing with bookmarks it is important to note the distinction between the title, description, and URL of the bookmark itself and the title, content, and URL of the resource that is the target of the bookmark. In some implementations these MAY be the same, but bookmark managers often allow a user to edit the title and description of his or her own bookmarks to differ from the metadata on the target itself.
Some implementations refer to this Object type as a "link". This specification uses the term "bookmark" to avoid confusion with the general concept of hyperlinks which apply to all Object types.
Since bookmarks are often specific to a particular user, even though multiple users might have bookmarks pointing at the same resource, it is appropriate to use the "post" Verb to describe the publication of such a bookmark. The "mark as favorite" Verb SHOULD be used when a user flags another user's bookmark as being a favorite without creating his own bookmark, or when a user flags his own bookmark as being a favorite as a special classification within his own bookmark collection.
The "bookmark" Object type is identified by the URI http://activitystrea.ms/schema/1.0/bookmark.
A bookmark has the following additional components:
- Title
- The title of the bookmark, as entered by the user who created the bookmark. Represented by the Name component of the base Object Construct. Publishers MAY use the title of the target resource as a default for this property where a user hasn't entered a customized value.
- Target URL
- The URL of the item that is the target of the bookmark. Represented in JSON by a property called targetUrl whose value is a JSON string containing the target URL.
- Thumbnail
- The URL and metadata for a thumbnail version of the page. Represented by the Representative Image component of the base Object Construct. Processors MAY ignore thumbnails that are of an inappropriate size for their user interface.
Constructor and Description |
---|
Bookmark() |
Modifier and Type | Method and Description |
---|---|
Link |
getThumbnail()
Get the value of thumbnail
|
String |
getTypeIRI() |
void |
setThumbnail(Link newthumbnail)
Set the value of thumbnail
|
getAddress, getLocation, setAddress, setLocation
clone, equals, findRelatedLink, getAlternateLinks, getAuthors, getCategories, getContents, getContributors, getCreated, getForeignMarkup, getId, getIssued, getModified, getModule, getModules, getOtherLinks, getPublished, getRights, getSource, getSummary, getTitle, getTitleEx, getUpdated, getXmlBase, hashCode, isMediaEntry, setAlternateLinks, setAuthors, setCategories, setContents, setContributors, setCreated, setForeignMarkup, setId, setIssued, setModified, setModules, setOtherLinks, setPublished, setRights, setSource, setSummary, setTitle, setTitleEx, setUpdated, setXmlBase, toString
public String getTypeIRI()
getTypeIRI
in class ActivityObject
public Link getThumbnail()
public void setThumbnail(Link newthumbnail)
newthumbnail
- new value of thumbnailCopyright © 2017. All rights reserved.