Package io.goobi.viewer.model.bookmark
Class Bookmark
java.lang.Object
io.goobi.viewer.model.bookmark.Bookmark
- All Implemented Interfaces:
Serializable
Bookmark class.
- See Also:
-
Constructor Summary
ConstructorDescriptionBookmark()
Empty constructor.Creates a new bookmark based in book pi, section logId and page order logId and order my be empty or null, if only the book itself is references.Creates a new bookmark based in book pi, section logId and page order logId and order my be empty or null, if only the book itself is references.Constructor for Bookmark. -
Method Summary
Modifier and TypeMethodDescriptionboolean
bothEqualOrBlank
(String o1, String o2) bothEqualOrBlank.boolean
bothEqualOrNull
(Object o1, Object o2) bothEqualOrNull.boolean
Getter for the fieldbookmarkList
.Getter for the fielddateAdded
.Getter for the fielddescription
.Retrieves the documents title from the Solr index using the stored pi and - if nonempty - the logIdgetId()
Getter for the fieldid
.getLogId()
Getter for the fieldlogId
.getName()
Getter for the fieldname
.getOrder()
Getter for the fieldorder
.getPi()
Getter for the fieldpi
.Returns the URL to the representative image thumbnail for the record represented by this item.getRepresentativeImageUrl
(int width, int height) Returns the URL to the representative image thumbnail for the record represented by this item.0getUrl()
Returns the image view URL for this bookmark.getUrn()
Getter for the fieldurn
.int
hashCode()
boolean
void
setBookmarkList
(BookmarkList bookmarkList) Setter for the fieldbookmarkList
.void
setDateAdded
(LocalDateTime dateAdded) Setter for the fielddateAdded
.void
setDescription
(String description) Setter for the fielddescription
.void
Setter for the fieldid
.void
Setter for the fieldlogId
.void
Setter for the fieldname
.void
Setter for the fieldorder
.void
Setter for the fieldpi
.void
Setter for the fieldurn
.
-
Constructor Details
-
Bookmark
public Bookmark()Empty constructor. -
Bookmark
Constructor for Bookmark.
-
Bookmark
public Bookmark(String pi, String logId, Integer order) throws IndexUnreachableException, PresentationException Creates a new bookmark based in book pi, section logId and page order logId and order my be empty or null, if only the book itself is references. PI must be non-empty, otherwise a NullPointerException is thrown The item name will be inferred from the book/section title from Solr. If that fails, an IndexUnreachableException or PresentationException is thrown- Parameters:
pi
- aString
object.logId
- aString
object.order
- aInteger
object.- Throws:
NullPointerException
- if pi is null or blankIndexUnreachableException
- if any.PresentationException
- if any.
-
Bookmark
public Bookmark(String pi, String logId, Integer order, boolean ignoreMissingSolrDoc) throws IndexUnreachableException, PresentationException Creates a new bookmark based in book pi, section logId and page order logId and order my be empty or null, if only the book itself is references. PI must be non-empty, otherwise a NullPointerException is thrown The item name will be inferred from the book/section title from Solr. If that fails, an IndexUnreachableException or PresentationException is thrown- Parameters:
pi
- aString
object.logId
- aString
object.order
- aInteger
object.ignoreMissingSolrDoc
- should be false, unless arbitrary pi/logid values should be allowed (e.g. for testing)- Throws:
NullPointerException
- if pi is null or blankIndexUnreachableException
- if any.PresentationException
- if any.
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
bothEqualOrNull
bothEqualOrNull.
-
bothEqualOrBlank
bothEqualOrBlank.
-
getUrl
Returns the image view URL for this bookmark. If this is the first call, the url is constructed first.- Returns:
- The URL as string.
- Throws:
PresentationException
- if any.IndexUnreachableException
- if any.
-
getRepresentativeImageUrl
public String getRepresentativeImageUrl() throws PresentationException, IndexUnreachableException, ViewerConfigurationException, DAOExceptionReturns the URL to the representative image thumbnail for the record represented by this item.- Returns:
- a
String
object. - Throws:
PresentationException
- if any.IndexUnreachableException
- if any.ViewerConfigurationException
- if any.DAOException
- if any.
-
getRepresentativeImageUrl
public String getRepresentativeImageUrl(int width, int height) throws PresentationException, IndexUnreachableException, ViewerConfigurationException, DAOException Returns the URL to the representative image thumbnail for the record represented by this item.- Parameters:
width
- a int.height
- a int.- Returns:
- a
String
object. - Throws:
PresentationException
- if any.IndexUnreachableException
- if any.ViewerConfigurationException
- if any.DAOException
- if any.
-
getDocumentTitle
Retrieves the documents title from the Solr index using the stored pi and - if nonempty - the logId- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.PresentationException
- if any.
-
getId
Getter for the field
id
.- Returns:
- the id
-
setId
Setter for the field
id
.- Parameters:
id
- the id to set
-
getBookmarkList
Getter for the field
bookmarkList
.- Returns:
- the bookmarkList
-
setBookmarkList
Setter for the field
bookmarkList
.- Parameters:
bookmarkList
- the bookmarkList to set
-
getPi
Getter for the field
pi
.- Returns:
- the pi
-
setPi
Setter for the field
pi
.- Parameters:
pi
- the pi to set
-
getLogId
Getter for the field
logId
.- Returns:
- the logId
-
setLogId
Setter for the field
logId
.- Parameters:
logId
- the logId to set
-
getUrn
Getter for the field
urn
.- Returns:
- the urn
-
setUrn
Setter for the field
urn
.- Parameters:
urn
- the urn to set
-
getName
Getter for the field
name
.- Returns:
- the name
-
setName
Setter for the field
name
.- Parameters:
name
- the name to set
-
getDescription
Getter for the field
description
.- Returns:
- the description
-
setDescription
Setter for the field
description
.- Parameters:
description
- the description to set
-
getDateAdded
Getter for the field
dateAdded
.- Returns:
- the dateAdded
-
setDateAdded
Setter for the field
dateAdded
.- Parameters:
dateAdded
- the dateAdded to set
-
getOrder
Getter for the field
order
.- Returns:
- the order
-
setOrder
Setter for the field
order
.- Parameters:
order
- the order to set
-
getMetadataElement
- Throws:
IndexUnreachableException
-
getSolrQueryForDocument
0- Returns:
- Generated Solr query
-
getBrowseElement
- Throws:
IndexUnreachableException
-
isHasImages
public boolean isHasImages()
-