Package io.goobi.viewer.model.toc
Class TOCElement
java.lang.Object
io.goobi.viewer.model.toc.TOCElement
- All Implemented Interfaces:
IAccessDeniedThumbnailOutput,Serializable
Single TOC entry.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTOCElement(de.intranda.metadata.multilanguage.IMetadataValue label, String pageNo, String pageNoLabel, String iddoc, String logId, int level, String topStructPi, String thumbnailUrl, boolean accessPermissionPdf, boolean anchorOrGroup, boolean hasImages, String recordMimeType, String docStructType, String footerId) Creates a new TOCElement instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetAccessDeniedThumbnailUrl(Locale locale) getContentServerPdfUrl.getFullscreenUrl.Getter for the fieldgroupIds.intgetID()getID.getIddoc()Getter for the fieldiddoc.getLabel()Getter for the fieldlabel.Getter for the fieldlabel.Getter for the fieldlabel.intgetLevel()Getter for the fieldlevel.getLogId()Gibt die logID aus der Mets Datei zurück.Getter for the fieldmetadata.getMetadataValue(String key) getMetadataValue.Getter for the fieldpageNo.Getter for the fieldpageNoLabel.intGetter for the fieldparentId.Getter for the fieldrecordMimeType.Getter for the fieldthumbnailUrl.getThumbnailUrl(int width, int height) Getter for the fieldthumbnailUrl.Getter for the fieldtopStructPi.getUrl()getUrl.Returns the URL for this element that links to the requested view type.inthashCode()booleanChecks whether the current user has permissions to download a PDFs for this element.booleanisEmpty()isEmpty.booleanisExpanded.booleanisHasChild.booleanisVisible.voidsetAccessPermissionThumbnail(AccessPermission accessPermissionThumbnail) voidsetExpanded(boolean expanded) Setter for the fieldexpanded.voidsetGroupIds(List<String> groupIds) Setter for the fieldgroupIds.voidsetHasChild(boolean hasChild) Setter for the fieldhasChild.voidsetID(int iD) setID.voidsetParentId(int parentId) Setter for the fieldparentId.voidsetVisible(boolean visible) Setter for the fieldvisible.
-
Constructor Details
-
TOCElement
public TOCElement(de.intranda.metadata.multilanguage.IMetadataValue label, String pageNo, String pageNoLabel, String iddoc, String logId, int level, String topStructPi, String thumbnailUrl, boolean accessPermissionPdf, boolean anchorOrGroup, boolean hasImages, String recordMimeType, String docStructType, String footerId) Creates a new TOCElement instance.- Parameters:
label- multilingual display label for this elementpageNo- physical page number as stringpageNoLabel- human-readable page labeliddoc- Solr IDDOC identifier of this elementlogId- logical structure ID from METSlevel- nesting depth in the TOC hierarchytopStructPi- persistent identifier of the top-level recordthumbnailUrl- URL of the representative thumbnail imageaccessPermissionPdf- true if PDF download is permittedanchorOrGroup- true if this element is an anchor or group recordhasImages- true if the structure element has image pagesrecordMimeType- MIME type of the associated recorddocStructType- document structure type string from METSfooterId- identifier for the associated footer configuration
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
getContentServerPdfUrl
getContentServerPdfUrl.- Returns:
String- Throws:
ViewerConfigurationException- if any.
-
isAccessPermissionPdf
public boolean isAccessPermissionPdf()Checks whether the current user has permissions to download a PDFs for this element.- Returns:
- true if the current user has PDF download permission for this TOC element, false otherwise
-
getAccessPermissionThumbnail
-
setAccessPermissionThumbnail
-
getThumbnailUrl
Getter for the fieldthumbnailUrl.- Returns:
- the thumbnail URL for this TOC element
-
getThumbnailUrl
Getter for the fieldthumbnailUrl.- Parameters:
width- desired thumbnail width in pixelsheight- desired thumbnail height in pixels- Returns:
- the thumbnail URL for this TOC element scaled to the given dimensions
-
getAccessDeniedThumbnailUrl
public String getAccessDeniedThumbnailUrl(Locale locale) throws IndexUnreachableException, DAOException - Specified by:
getAccessDeniedThumbnailUrlin interfaceIAccessDeniedThumbnailOutput- Parameters:
locale- locale for selecting the appropriate image- Returns:
- Configured image URI for the given language; null if none found
- Throws:
IndexUnreachableExceptionDAOException
-
getLabel
Getter for the fieldlabel.- Returns:
- the label value for the current locale, or the default value if no locale is available
-
getLabel
Getter for the fieldlabel.- Parameters:
locale- locale used to select the label value- Returns:
- the label value for the given locale, or the default value if none is set for that locale
-
getLabel
Getter for the fieldlabel.- Parameters:
locale- BCP 47 language tag for label selection- Returns:
- the label value for the given language tag, or the default value if none is set for that language
-
getMetadata
Getter for the fieldmetadata.- Returns:
- the metadata map containing additional field values for this TOC element
-
getMetadataValue
getMetadataValue.- Parameters:
key- metadata field name to look up- Returns:
- the metadata value for the given field name, or null if not present
-
getPageNo
Getter for the fieldpageNo.- Returns:
- the page number associated with this TOC element
-
getIddoc
Getter for the fieldiddoc.- Returns:
- the internal Solr document identifier for this TOC element
-
getPageNoLabel
Getter for the fieldpageNoLabel.- Returns:
- the human-readable page number label for this TOC element
-
getTopStructPi
Getter for the fieldtopStructPi.- Returns:
- the persistent identifier of the top-level structure this element belongs to
-
getLogId
Gibt die logID aus der Mets Datei zurück.- Returns:
- the logical identifier from the METS file for this TOC element
-
getLevel
public int getLevel()Getter for the fieldlevel.- Returns:
- a int.
-
getUrl
getUrl.- Returns:
- the URL for this TOC element
-
getUrl
Returns the URL for this element that links to the requested view type.- Parameters:
viewType- name of the requested page view type- Returns:
- the URL for this TOC element pointing to the given view type
-
getFullscreenUrl
getFullscreenUrl.- Returns:
- the URL for displaying this TOC element in fullscreen view
-
isVisible
public boolean isVisible()isVisible.- Returns:
- true if this TOC element is currently visible, false otherwise
-
setVisible
public void setVisible(boolean visible) Setter for the fieldvisible.- Parameters:
visible- true to show this element, false to hide it
-
getParentId
public int getParentId()Getter for the fieldparentId.- Returns:
- a int.
-
setParentId
public void setParentId(int parentId) Setter for the fieldparentId.- Parameters:
parentId- ID of the parent TOC element
-
getID
public int getID()getID.- Returns:
- a int.
-
setID
public void setID(int iD) setID.- Parameters:
iD- numeric ID to assign to this element
-
isExpanded
public boolean isExpanded()isExpanded.- Returns:
- true if this TOC element is currently shown expanded, false otherwise
-
setExpanded
public void setExpanded(boolean expanded) Setter for the fieldexpanded.- Parameters:
expanded- true if this element should be shown expanded
-
isHasChild
public boolean isHasChild()isHasChild.- Returns:
- true if this TOC element has at least one child element, false otherwise
-
setHasChild
public void setHasChild(boolean hasChild) Setter for the fieldhasChild.- Parameters:
hasChild- true if this element has child elements
-
getGroupIds
Getter for the fieldgroupIds.- Returns:
- the list of group identifier strings associated with this TOC element
-
setGroupIds
Setter for the fieldgroupIds.- Parameters:
groupIds- list of group identifier strings to assign
-
getRecordMimeType
Getter for the fieldrecordMimeType.- Returns:
- the MIME type of the record associated with this TOC element
-
isEmpty
public boolean isEmpty()isEmpty.- Returns:
- true if label is null, empty or blank
-