Class ViewManager
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
ConstructorDescriptionViewManager
(StructElement topDocument, IPageLoader pageLoader, long currentDocumentIddoc, String logId, String mimeType, ImageDeliveryBean imageDeliveryBean) Constructor for ViewManager. -
Method Summary
Modifier and TypeMethodDescriptionaddToTranskribusAction
(boolean login) addToTranskribusAction.createCalendarView.static ViewManager
createViewManager
(String pi, boolean loadPages) Creates an instance of ViewManager loaded with the record with the given identifier.void
dropdownAction
(javax.faces.event.ValueChangeEvent event) dropdownAction.firstImage.Returns all pages in their correct order.Return the url to a REST service delivering the alto file of the given page as xmlReturn the url to a REST service delivering all alto files of a work as zipgetAnchorMetsResolverUrl.If the current record is a volume, returns the PI of the anchor record.Returns the main title of the current volume's anchor, if available.getArchiveHierarchyForIdentifier
(String identifier) getArchiveUrlForIdentifier
(String identifier) Getter for the fieldcalendarView
.getCiteLinkPage.getCiteLinkWork.Returns a list of original content file download links (name+url) for the current document.Returns the ContextObject value for a COinS element (generated using metadata fromcurrentDocument
).getCurrentDocumentHierarchy.int
getCurrentHeight.getCurrentImageInfo.getCurrentImageInfo
(PageType pageType) getCurrentImageInfo.getCurrentImageInfoCrowd.getCurrentImageInfoFullscreen.Returns the ORDERLABEL value for the current page.int
currentImageOrder.int
Getter for the paginator or the direct page number input fieldgetCurrentImageUrl.getCurrentImageUrl
(int size) getCurrentImageUrl.getCurrentImageUrl
(PageType view) getCurrentImageUrl.Deprecated.getCurrentObjectUrl.getCurrentPage.int
getCurrentPageSourceIndex.int
getCurrentRotate.getCurrentSearchResultCoords.Getter for the fieldcurrentStructElement
.long
Getter for the fieldcurrentStructElementIddoc
.int
Getter for the fieldcurrentThumbnailPage
.Retrieves the current User from the session, if exists.int
getCurrentWidth.getDenkxwebResolverUrl.getDocumentTitle
(StructElement document) getDocumentTitle.static List<DownloadOption>
getDownloadOptionsForImage
(List<DownloadOption> configuredOptions, Dimension origImageSize, Dimension configuredMaxSize, String imageFilename) Getter for the fielddropdownFulltext
.Getter for the fielddropdownPages
.Getter for the fielddropdownSelected
.Generates DC meta tags for the head of a HTML page.getDublinCoreResolverUrl.Returns an external download URL, if once exists in MD2_DOWNLOAD_URL.int
getFirstDisplayedThumbnailIndex.getFirstPage.int
Getter for the fieldfirstPageOrientation
.Getter for the fieldfirstPdfPage
.Deprecated.getFulltext
(boolean escapeHtml, String language) Deprecated.UsePhysicalElement.getFullText()
getFulltextMimeType
(String language) Return the url to a REST service delivering the fulltext as plain text of the given pageReturn the url to a REST service delivering all plain text of a work as zipgetHighwirePressMetaTags.static String
getImageFormat
(String format, String imageFilename) return the current image format if argument is 'MASTER', or the argument itself otherwiseint
getImagesCount.Returns the PhysicalElements for the current thumbnail page using the configured number of thumbnails per page;protected List<PhysicalElement>
getImagesSection
(int thumbnailsPerPage) Returns the PhysicalElements for the current thumbnail page.getImagesSizeThumbnail.int
Getter for the fieldlastPdfPage
.getLidoResolverUrl.getLinkForDFGViewer.protected LabeledLink
getLinkToDownloadFile
(String filename) getLogId()
Getter for the fieldlogId
.getMasterImageUrl
(de.unigoettingen.sub.commons.contentlib.imagelib.transform.Scale scale, PhysicalElement page) getCurrentMasterImageUrl.getMasterImageUrlForDownload
(String boxSizeInPixel) Deprecated.getMetsResolverUrl.Getter for the fieldmimeType
.getNextPrevPage
(int step) getOaiDcUrl.getOaiEseUrl.getOaiMarcUrl.Getter for the fieldopacUrl
.getPage
(int order) Returns the page with the given order number from the page loader, if exists.getPageDownloadUrl
(DownloadOption option, PhysicalElement page) getPageDownloadUrl.Getter for the fieldpageLoader
.getPageRangeAroundPage
(int pageOrder, int range, boolean fillToSize) Returns an integer list such that the 'pageOrder' is contained in the list the list contains (2*range)+1 consecutive numbers, or all page numbers of the current record if it is less than that the first number is not less than the first image order the last number is not larger than the last image order the 'pageOrder' is as far in the middle of the list as possible without violating any of the other points Used int thumbnailPaginator.xhtml to calculate the pages to display.getPagesForMediaType
(String type) getPageUrl
(javax.faces.model.SelectItem item) Returns the pdf download link for the current documentgetPdfDownloadLink
(List<List<String>> queryParams) Returns the pdf download link for the current document, allowing to attach a number of query parameters to itReturns the pdf download link for the current pageReturns the pdf download link for a pdf of all pages from this.firstPdfPage to this.lastPdfPage (inclusively)Returns the pdf download link for the current struct elementgetPdfStructDownloadLink
(List<List<String>> queryParams) Returns the pdf download link for the current struct element, allowing to add a number of query parameters to itgetPi()
Getter for the fieldpi
.int
getRepresentativeHeight.getRepresentativeImageInfo.getRepresentativeImageUrl.getRepresentativeImageUrl
(int width, int height) Getter for the fieldrepresentativePage
.int
getRepresentativeWidth.getSidebarWidgetUsageCitationLinksForLevel
(String levelName) Return the url to a REST service delivering the fulltext of the current page as TEIReturn the url to a REST service delivering a TEI document containing the text of all pagesgetTeiUrlForAllPages
(String language) getThumbnailUrlForDownload
(de.unigoettingen.sub.commons.contentlib.imagelib.transform.Scale scale, PhysicalElement page) getCurrentThumbnailUrlForDownload.getToc()
getTopDocumentTitle.Getter for the fieldtopStructElement
.long
Getter for the fieldtopStructElementIddoc
.Getter for the fieldversionHistory
.Returns the main title of the current volume.getWatermarkUrl.getWatermarkUrl
(String pageType) getWatermarkUrl.int
Getter for the fieldzoomSlider
.boolean
hasNextThumbnailSection.boolean
boolean
hasPreviousThumbnailSection.boolean
isAccessPermission
(String privilege) boolean
isAccessPermissionPdf.boolean
isAltoAvailableForWork.boolean
isBelowFulltextThreshold.boolean
Convenience method for identifying born digital material records.boolean
boolean
isDisplayCiteLinkDocstruct.boolean
isDisplayCiteLinkPage.boolean
isDisplayCiteLinkWork.boolean
Returns true if original content download has been enabled in the configuration and there are files in the original content folder for this record.boolean
boolean
boolean
boolean
isDisplayMetadataPdfLink.boolean
boolean
boolean
boolean
boolean
Deprecated.title.xhtml no longer existsboolean
boolean
isDoublePageMode.boolean
isFilesOnly.boolean
isFulltextAvailableForWork.boolean
boolean
isHasPages.boolean
isHasUrns.boolean
isHasVersionHistory.boolean
isHasVolumes.boolean
Defines the criteria whether to list all remaining volumes in the TOC if the current record is a volume.boolean
Convenience method that checks whether only the metadata view link is displayed for this record (i.e.boolean
isMultiPageRecord.boolean
isPdfPartDownloadLinkEnabled.boolean
isRecordAddedToTranskribus.boolean
boolean
boolean
isTeiAvailableForWork.lastImage.nextImage.void
nextThumbnailSection.prevImage.void
previousThumbnailSection.void
Reset the pdf access permissions.void
Reset the permissions for writing user comments.resetImage.rotateLeft.rotateRight.static Dimension
scaleToHeight
(Dimension imageSize, int scaledHeight) scaleToHeight.static Dimension
scaleToWidth
(Dimension imageSize, int scaledWidth) scaleToWidth.void
setAllowUserComments
(Boolean allowUserComments) void
setCitationProcessorWrapper
(CitationProcessorWrapper citationProcessorWrapper) void
setCitationStyle
(String citationStyle) void
setCurrentImageOrder
(int currentImageOrder) currentPageOrder.void
setCurrentImageOrderForPaginator
(int currentImageOrder) Setter for the direct page number input fieldvoid
setCurrentImageOrderString
(String currentImageOrderString) Main method for setting the current page(s) in this ViewManager.void
setCurrentStructElement
(StructElement currentStructElement) Setter for the fieldcurrentStructElement
.void
setCurrentStructElementtIddoc
(long currentStructElementIddoc) Setter for the fieldcurrentStructElementIddoc
.void
setCurrentThumbnailPage
(int currentThumbnailPage) Setter for the fieldcurrentThumbnailPage
.void
setDoublePageMode
(boolean doublePageMode) Setter for the fielddoublePageMode
.void
setDropdownSelected
(String dropdownSelected) Setter for the fielddropdownSelected
.void
setFirstPageOrientation
(PageOrientation firstPageOrientation) Setter for the fieldfirstPageOrientation
.void
setFirstPdfPage
(String firstPdfPage) Setter for the fieldfirstPdfPage
.void
setLastPdfPage
(String lastPdfPage) Setter for the fieldlastPdfPage
.void
Setter for the fieldlogId
.void
setPageLoader
(IPageLoader loader) Setter for the fieldpageLoader
.void
void
setTopStructElement
(StructElement topStructElement) setTopStructElement.void
setZoomSlider
(int zoomSlider) Setter for the fieldzoomSlider
.void
togglePageOrientation.void
updateDropdownSelected.boolean
useTiles()
useTiles.boolean
useTilesFullscreen.
-
Constructor Details
-
ViewManager
public ViewManager(StructElement topDocument, IPageLoader pageLoader, long currentDocumentIddoc, String logId, String mimeType, ImageDeliveryBean imageDeliveryBean) throws IndexUnreachableException, PresentationException Constructor for ViewManager.
- Parameters:
topDocument
- aStructElement
object.pageLoader
- aIPageLoader
object.currentDocumentIddoc
- a long.logId
- aString
object.mimeType
- aString
object.imageDeliveryBean
- aImageDeliveryBean
object.- Throws:
IndexUnreachableException
- if any.PresentationException
- if any.
-
-
Method Details
-
getArchiveTreeNeighbours
-
getArchiveHierarchyForIdentifier
-
getArchiveUrlForIdentifier
-
getPageUrl
-
createCalendarView
createCalendarView.
- Returns:
- a
CalendarView
object. - Throws:
IndexUnreachableException
- if any.PresentationException
- if any.
-
getRepresentativeImageInfo
public String getRepresentativeImageInfo() throws IndexUnreachableException, DAOException, PresentationException, ViewerConfigurationExceptiongetRepresentativeImageInfo.
- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.PresentationException
- if any.ViewerConfigurationException
- if any.
-
getCurrentImageInfo
getCurrentImageInfo.
- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getCurrentImageInfo
getCurrentImageInfo.
- Parameters:
pageType
- aPageType
object.- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getCurrentLeftPage
- Returns:
- Optional
-
getCurrentRightPage
- Returns:
- Optional
-
getCurrentImageInfoFullscreen
getCurrentImageInfoFullscreen.
- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getCurrentImageInfoCrowd
getCurrentImageInfoCrowd.
- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getWatermarkUrl
public String getWatermarkUrl() throws IndexUnreachableException, DAOException, ViewerConfigurationExceptiongetWatermarkUrl.
- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.ViewerConfigurationException
- if any.
-
getWatermarkUrl
public String getWatermarkUrl(String pageType) throws IndexUnreachableException, DAOException, ViewerConfigurationException getWatermarkUrl.
- Parameters:
pageType
- aString
object.- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.ViewerConfigurationException
- if any.
-
getCurrentImageUrl
public String getCurrentImageUrl() throws ViewerConfigurationException, IndexUnreachableException, DAOExceptiongetCurrentImageUrl.
- Returns:
- a
String
object. - Throws:
ViewerConfigurationException
- if any.IndexUnreachableException
- if any.DAOException
- if any.
-
getCurrentObjectUrl
getCurrentObjectUrl.
- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getCurrentImageUrl
public String getCurrentImageUrl(PageType view) throws IndexUnreachableException, DAOException, ViewerConfigurationException getCurrentImageUrl.
- Parameters:
view
- aPageType
object.- Returns:
- the iiif url to the image in a configured size
- Throws:
IndexUnreachableException
- if any.DAOException
- if any.ViewerConfigurationException
- if any.
-
getCurrentImageUrl
getCurrentImageUrl.
- Parameters:
size
- a int.- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getCurrentMasterImageUrl
Deprecated.getCurrentMasterImageUrl.
- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getMasterImageUrl
public String getMasterImageUrl(de.unigoettingen.sub.commons.contentlib.imagelib.transform.Scale scale, PhysicalElement page) throws IndexUnreachableException, DAOException getCurrentMasterImageUrl.
- Parameters:
scale
- aScale
object.page
-- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getThumbnailUrlForDownload
public String getThumbnailUrlForDownload(de.unigoettingen.sub.commons.contentlib.imagelib.transform.Scale scale, PhysicalElement page) throws IndexUnreachableException, DAOException getCurrentThumbnailUrlForDownload.
- Parameters:
scale
- aScale
object.page
-- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getPageDownloadUrl
public String getPageDownloadUrl(DownloadOption option, PhysicalElement page) throws IndexUnreachableException, DAOException getPageDownloadUrl.
- Parameters:
option
-page
-- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getDownloadOptionsForImage
public static List<DownloadOption> getDownloadOptionsForImage(List<DownloadOption> configuredOptions, Dimension origImageSize, Dimension configuredMaxSize, String imageFilename) - Parameters:
configuredOptions
-origImageSize
-configuredMaxSize
-imageFilename
-- Returns:
- List
-
getDownloadOptionsForPage
public List<DownloadOption> getDownloadOptionsForPage(PhysicalElement page) throws IndexUnreachableException, DAOException - Parameters:
page
-- Returns:
- List
- Throws:
IndexUnreachableException
DAOException
-
getImageFormat
return the current image format if argument is 'MASTER', or the argument itself otherwise- Parameters:
format
-imageFilename
-- Returns:
- Image format
-
getMasterImageUrlForDownload
@Deprecated public String getMasterImageUrlForDownload(String boxSizeInPixel) throws IndexUnreachableException, DAOException Deprecated.getMasterImageUrlForDownload.
- Parameters:
boxSizeInPixel
-- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getCurrentSearchResultCoords
public List<List<String>> getCurrentSearchResultCoords() throws IndexUnreachableException, DAOException, ViewerConfigurationExceptiongetCurrentSearchResultCoords.
- Returns:
- a
List
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.ViewerConfigurationException
- if any.
-
getRepresentativeWidth
public int getRepresentativeWidth() throws PresentationException, IndexUnreachableException, DAOExceptiongetRepresentativeWidth.
- Returns:
- a int.
- Throws:
PresentationException
- if any.IndexUnreachableException
- if any.DAOException
- if any.
-
getRepresentativeHeight
public int getRepresentativeHeight() throws PresentationException, IndexUnreachableException, DAOExceptiongetRepresentativeHeight.
- Returns:
- a int.
- Throws:
PresentationException
- if any.IndexUnreachableException
- if any.DAOException
- if any.
-
getCurrentWidth
getCurrentWidth.
- Returns:
- a int.
- Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getCurrentHeight
getCurrentHeight.
- Returns:
- a int.
- Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getRepresentativeImageUrl
public String getRepresentativeImageUrl() throws IndexUnreachableException, PresentationException, DAOExceptiongetRepresentativeImageUrl.
- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.PresentationException
- if any.DAOException
- if any.
-
getRepresentativeImageUrl
public String getRepresentativeImageUrl(int width, int height) throws IndexUnreachableException, PresentationException, DAOException - Parameters:
width
-height
-- Returns:
- URL to the representative image as
String
- Throws:
IndexUnreachableException
PresentationException
DAOException
-
scaleToWidth
scaleToWidth.
-
scaleToHeight
scaleToHeight.
-
getCurrentUser
Retrieves the current User from the session, if exists.- Returns:
- The current User; null of not logged in.
-
rotateLeft
rotateLeft.
- Returns:
- a
String
object.
-
rotateRight
rotateRight.
- Returns:
- a
String
object.
-
resetImage
resetImage.
- Returns:
- a
String
object.
-
isHasUrns
isHasUrns.
- Returns:
- true if this record contains URN or IMAGEURN fields; false otherwise
- Throws:
PresentationException
- if any.IndexUnreachableException
- if any.
-
isHasVolumes
public boolean isHasVolumes()isHasVolumes.
- Returns:
- true if this is an anchor record and has indexed volumes; false otherwise
-
isHasPages
isHasPages.
- Returns:
- true if record contains pages; false otherwise
- Throws:
IndexUnreachableException
- if any.
-
isFilesOnly
isFilesOnly.
- Returns:
- true if record or first child or first page have an application mime type; false otherwise
- Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
isBornDigital
Convenience method for identifying born digital material records.- Returns:
- true if record is born digital material (no scanned images); false otherwise
- Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
isListAllVolumesInTOC
Defines the criteria whether to list all remaining volumes in the TOC if the current record is a volume.- Returns:
- a boolean.
- Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getAllPages
Returns all pages in their correct order. Used for e-publications.- Returns:
- a
List
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getCurrentPage
getCurrentPage.
- Returns:
- a
PhysicalElement
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getNextPrevPage
- Parameters:
step
-- Returns:
PhysicalElement
- Throws:
IndexUnreachableException
-
getPage
Returns the page with the given order number from the page loader, if exists.- Parameters:
order
- a int.- Returns:
- requested page if exists; null otherwise.
- Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getRepresentativePage
public PhysicalElement getRepresentativePage() throws PresentationException, IndexUnreachableException, DAOExceptionGetter for the field
representativePage
.- Returns:
- a
PhysicalElement
object. - Throws:
PresentationException
- if any.IndexUnreachableException
- if any.DAOException
- if any.
-
getFirstPage
getFirstPage.
- Returns:
- a
PhysicalElement
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getCurrentImageOrderForPaginator
public int getCurrentImageOrderForPaginator()Getter for the paginator or the direct page number input field- Returns:
- currentImageNo
-
setCurrentImageOrderForPaginator
public void setCurrentImageOrderForPaginator(int currentImageOrder) throws IndexUnreachableException, PresentationException, IDDOCNotFoundException Setter for the direct page number input field- Parameters:
currentImageOrder
- a int.- Throws:
IndexUnreachableException
- if any.PresentationException
- if any.IDDOCNotFoundException
-
getCurrentImageOrder
public int getCurrentImageOrder()currentImageOrder.
- Returns:
- the currentImageOrder
-
setCurrentImageOrder
public void setCurrentImageOrder(int currentImageOrder) throws IndexUnreachableException, PresentationException, IDDOCNotFoundException currentPageOrder.
- Parameters:
currentImageOrder
- the currentImageOrder to set- Throws:
IndexUnreachableException
- if any.PresentationException
- if any.RecordNotFoundException
PresentationException
IDDOCNotFoundException
-
setCurrentImageOrderString
public void setCurrentImageOrderString(String currentImageOrderString) throws IndexUnreachableException, PresentationException, IDDOCNotFoundException Main method for setting the current page(s) in this ViewManager. If the given String cannot be parsed to an integer the current image order is set to 1- Parameters:
currentImageOrderString
- A string containing a single page number or a range of two pages- Throws:
IndexUnreachableException
PresentationException
IDDOCNotFoundException
-
getCurrentImageLabel
Returns the ORDERLABEL value for the current page.- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
nextImage
public String nextImage() throws IndexUnreachableException, PresentationException, IDDOCNotFoundExceptionnextImage.
- Returns:
String
- Throws:
IndexUnreachableException
- if any.PresentationException
- if any.IDDOCNotFoundException
-
prevImage
public String prevImage() throws IndexUnreachableException, PresentationException, IDDOCNotFoundExceptionprevImage.
- Returns:
String
- Throws:
IndexUnreachableException
- if any.PresentationException
- if any.IDDOCNotFoundException
-
firstImage
public String firstImage() throws IndexUnreachableException, PresentationException, IDDOCNotFoundExceptionfirstImage.
- Returns:
String
- Throws:
IndexUnreachableException
- if any.PresentationException
- if any.IDDOCNotFoundException
-
lastImage
public String lastImage() throws IndexUnreachableException, PresentationException, IDDOCNotFoundExceptionlastImage.
- Returns:
String
- Throws:
IndexUnreachableException
- if any.PresentationException
- if any.IDDOCNotFoundException
-
isMultiPageRecord
isMultiPageRecord.
- Returns:
- a boolean.
- Throws:
IndexUnreachableException
- if any.
-
getImagesCount
getImagesCount.
- Returns:
Integer
- Throws:
IndexUnreachableException
- if any.
-
getLastPageOrder
public int getLastPageOrder()- Returns:
- Last page number
-
getFirstPageOrder
public int getFirstPageOrder()- Returns:
- First page number
-
getDropdownPages
Getter for the field
dropdownPages
.- Returns:
- the dropdownPages
-
getDropdownFulltext
Getter for the field
dropdownFulltext
.- Returns:
- the dropdownPages
-
setDropdownSelected
Setter for the field
dropdownSelected
.- Parameters:
dropdownSelected
- the dropdownSelected to set
-
getDropdownSelected
Getter for the field
dropdownSelected
.- Returns:
- the dropdownSelected
-
getImagesSection
Returns the PhysicalElements for the current thumbnail page using the configured number of thumbnails per page;- Returns:
- a
List
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getImagesSection
protected List<PhysicalElement> getImagesSection(int thumbnailsPerPage) throws IndexUnreachableException, DAOException Returns the PhysicalElements for the current thumbnail page.- Parameters:
thumbnailsPerPage
- Length of the thumbnail list per page.- Returns:
- PhysicalElements for the current thumbnail page.
- Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getFirstDisplayedThumbnailIndex
public int getFirstDisplayedThumbnailIndex()getFirstDisplayedThumbnailIndex.
- Returns:
- a int.
-
getCurrentThumbnailPage
public int getCurrentThumbnailPage()Getter for the field
currentThumbnailPage
.- Returns:
- a int.
-
setCurrentThumbnailPage
public void setCurrentThumbnailPage(int currentThumbnailPage) Setter for the field
currentThumbnailPage
.- Parameters:
currentThumbnailPage
- a int.
-
nextThumbnailSection
public void nextThumbnailSection()nextThumbnailSection.
-
previousThumbnailSection
public void previousThumbnailSection()previousThumbnailSection.
-
hasPreviousThumbnailSection
public boolean hasPreviousThumbnailSection()hasPreviousThumbnailSection.
- Returns:
- a boolean.
-
hasNextThumbnailSection
public boolean hasNextThumbnailSection()hasNextThumbnailSection.
- Returns:
- a boolean.
-
updateDropdownSelected
public void updateDropdownSelected()updateDropdownSelected.
-
dropdownAction
public void dropdownAction(javax.faces.event.ValueChangeEvent event) throws NumberFormatException, IndexUnreachableException, PresentationException, IDDOCNotFoundException dropdownAction.
- Parameters:
event
-ValueChangeEvent
- Throws:
IndexUnreachableException
- if any.PresentationException
- if any.NumberFormatException
- if any.IDDOCNotFoundException
-
getImagesSizeThumbnail
getImagesSizeThumbnail.
- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.
-
getLinkForDFGViewer
getLinkForDFGViewer.
- Returns:
- DFG Viewer link
- Throws:
IndexUnreachableException
- if any.
-
getMetsResolverUrl
getMetsResolverUrl.
- Returns:
- METS resolver link
-
getLidoResolverUrl
getLidoResolverUrl.
- Returns:
- a
String
object.
-
getDenkxwebResolverUrl
getDenkxwebResolverUrl.
- Returns:
- a
String
object.
-
getDublinCoreResolverUrl
getDublinCoreResolverUrl.
- Returns:
- a
String
object.
-
getAnchorMetsResolverUrl
getAnchorMetsResolverUrl.
- Returns:
- METS resolver URL for the anchor; null if no parent PI found (must be null, otherwise an empty link will be displayed).
-
getAltoUrlForAllPages
public String getAltoUrlForAllPages() throws ViewerConfigurationException, PresentationException, IndexUnreachableExceptionReturn the url to a REST service delivering all alto files of a work as zip- Returns:
- the url to a REST service delivering all alto files of a work as zip
- Throws:
ViewerConfigurationException
- if any.PresentationException
- if any.IndexUnreachableException
- if any.
-
getFulltextUrlForAllPages
public String getFulltextUrlForAllPages() throws ViewerConfigurationException, PresentationException, IndexUnreachableExceptionReturn the url to a REST service delivering all plain text of a work as zip- Returns:
- the url to a REST service delivering all plain text of a work as zip
- Throws:
ViewerConfigurationException
- if any.PresentationException
- if any.IndexUnreachableException
- if any.
-
getTeiUrlForAllPages
Return the url to a REST service delivering a TEI document containing the text of all pages- Returns:
- the TEI REST url
- Throws:
ViewerConfigurationException
- if any.IndexUnreachableException
- if any.
-
getTeiUrlForAllPages
- Parameters:
language
-- Returns:
- TEI URL for given language
- Throws:
IndexUnreachableException
-
getTeiUrl
public String getTeiUrl() throws ViewerConfigurationException, IndexUnreachableException, DAOExceptionReturn the url to a REST service delivering the fulltext of the current page as TEI- Returns:
- the TEI REST url
- Throws:
ViewerConfigurationException
- if any.IndexUnreachableException
- if any.DAOException
- if any.
-
getAltoUrl
public String getAltoUrl() throws ViewerConfigurationException, PresentationException, IndexUnreachableException, DAOExceptionReturn the url to a REST service delivering the alto file of the given page as xml- Returns:
- the url to a REST service delivering the alto file of the given page as xml
- Throws:
ViewerConfigurationException
- if any.PresentationException
- if any.IndexUnreachableException
- if any.DAOException
- if any.
-
getFulltextUrl
public String getFulltextUrl() throws ViewerConfigurationException, PresentationException, IndexUnreachableException, DAOExceptionReturn the url to a REST service delivering the fulltext as plain text of the given page- Returns:
- the url to a REST service delivering the fulltext as plain text of the given page
- Throws:
ViewerConfigurationException
- if any.PresentationException
- if any.IndexUnreachableException
- if any.DAOException
- if any.
-
getExternalDownloadUrl
Returns an external download URL, if once exists in MD2_DOWNLOAD_URL.- Returns:
- url if exists; null otherwise
-
getPdfDownloadLink
public String getPdfDownloadLink() throws IndexUnreachableException, PresentationException, ViewerConfigurationException, URISyntaxExceptionReturns the pdf download link for the current document- Returns:
String
- Throws:
IndexUnreachableException
- if any.PresentationException
- if any.ViewerConfigurationException
- if any.URISyntaxException
-
getPdfDownloadLink
public String getPdfDownloadLink(List<List<String>> queryParams) throws IndexUnreachableException, PresentationException, ViewerConfigurationException, URISyntaxException Returns the pdf download link for the current document, allowing to attach a number of query parameters to it- Parameters:
queryParams
-- Returns:
String
- Throws:
IndexUnreachableException
- if any.PresentationException
- if any.ViewerConfigurationException
- if any.URISyntaxException
-
getPdfPageDownloadLink
public String getPdfPageDownloadLink() throws IndexUnreachableException, DAOException, ViewerConfigurationExceptionReturns the pdf download link for the current page- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.ViewerConfigurationException
- if any.
-
getPdfStructDownloadLink
public String getPdfStructDownloadLink() throws IndexUnreachableException, DAOException, ViewerConfigurationException, PresentationExceptionReturns the pdf download link for the current struct element- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.ViewerConfigurationException
- if any.PresentationException
- if any.
-
getPdfStructDownloadLink
public String getPdfStructDownloadLink(List<List<String>> queryParams) throws IndexUnreachableException, PresentationException, ViewerConfigurationException, URISyntaxException Returns the pdf download link for the current struct element, allowing to add a number of query parameters to it- Parameters:
queryParams
-- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.ViewerConfigurationException
- if any.PresentationException
- if any.URISyntaxException
-
getPdfPartDownloadLink
public String getPdfPartDownloadLink() throws IndexUnreachableException, DAOException, ViewerConfigurationExceptionReturns the pdf download link for a pdf of all pages from this.firstPdfPage to this.lastPdfPage (inclusively)- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.ViewerConfigurationException
- if any.
-
isPdfPartDownloadLinkEnabled
public boolean isPdfPartDownloadLinkEnabled()isPdfPartDownloadLinkEnabled.
- Returns:
- a boolean.
-
resetAccessPermissionPdf
public void resetAccessPermissionPdf()Reset the pdf access permissions. They will be evaluated again on the next call toisAccessPermissionPdf()
-
isAccessPermissionPdf
public boolean isAccessPermissionPdf()isAccessPermissionPdf.
- Returns:
- true if record/structure PDF download is allowed; false otherwise
-
isAccessPermission
- Parameters:
privilege
- Privilege name to check- Returns:
- true if current user has the privilege for this record; false otherwise
- Throws:
IndexUnreachableException
DAOException
-
resetAllowUserComments
public void resetAllowUserComments()Reset the permissions for writing user comments. They will be evaluated again on the next call toisAllowUserComments()
-
isAllowUserComments
- Returns:
- the allowUserComments
-
setAllowUserComments
- Parameters:
allowUserComments
- the allowUserComments to set
-
isDisplayTitleBarPdfLink
Deprecated.title.xhtml no longer existsisDisplayTitleBarPdfLink.
- Returns:
- a boolean.
-
isDisplayMetadataPdfLink
public boolean isDisplayMetadataPdfLink()isDisplayMetadataPdfLink.
- Returns:
- a boolean.
-
isMetadataViewOnly
public boolean isMetadataViewOnly() throws IndexUnreachableException, DAOException, PresentationExceptionConvenience method that checks whether only the metadata view link is displayed for this record (i.e. criteria for all other links are not met).- Returns:
- true if loaded record only contains metadata and doesn't support over views; false otherwise
- Throws:
DAOException
IndexUnreachableException
PresentationException
-
isDisplayObjectViewLink
- Returns:
- true if object view link may be displayed; false otherwise
- Throws:
IndexUnreachableException
DAOException
-
isDisplayCalendarViewLink
- Returns:
- true if calendar view link may be displayed; false otherwise
- Throws:
IndexUnreachableException
PresentationException
-
isDisplayTocViewLink
- Returns:
- true if TOC view link may be displayed; false otherwise
- Throws:
IndexUnreachableException
DAOException
-
isDisplayThumbnailViewLink
- Returns:
- true if thumbnail view link may be displayed; false otherwise
- Throws:
IndexUnreachableException
DAOException
-
isDisplayMetadataViewLink
public boolean isDisplayMetadataViewLink()- Returns:
- true if metadata view link may be displayed; false otherwise
-
isDisplayFulltextViewLink
public boolean isDisplayFulltextViewLink() throws IndexUnreachableException, DAOException, PresentationException- Returns:
- true if full-text view link may be displayed; false otherwise
- Throws:
IndexUnreachableException
DAOException
PresentationException
-
isDisplayExternalFulltextLink
public boolean isDisplayExternalFulltextLink()- Returns:
- true if external full-text link may be displayed; false otherwise
-
isDisplayNerViewLink
- Returns:
- true if NER view link may be displayed; false otherwise
- Throws:
IndexUnreachableException
PresentationException
-
isDisplayExternalResolverLink
public boolean isDisplayExternalResolverLink()- Returns:
- true if NER view link may be displayed; false otherwise
-
getOaiMarcUrl
getOaiMarcUrl.
- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.
-
getOaiDcUrl
getOaiDcUrl.
- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.
-
getOaiEseUrl
getOaiEseUrl.
- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.
-
getOpacUrl
Getter for the field
opacUrl
.- Returns:
- a
String
object.
-
getAnchorTitle
Returns the main title of the current volume's anchor, if available.- Returns:
- a
String
object.
-
getVolumeTitle
Returns the main title of the current volume.- Returns:
- The volume's main title.
-
isBelowFulltextThreshold
isBelowFulltextThreshold.
- Returns:
- a boolean.
- Throws:
PresentationException
- if any.IndexUnreachableException
- if any.
-
isFulltextAvailableForWork
public boolean isFulltextAvailableForWork() throws IndexUnreachableException, DAOException, PresentationExceptionisFulltextAvailableForWork.
- Returns:
- true if record has full-text and user has access rights; false otherwise
- Throws:
IndexUnreachableException
- if any.DAOException
- if any.PresentationException
- if any.
-
isFulltextFromTEI
- Returns:
- true if record full-text is generated from TEI documents; false otherwise
- Throws:
PresentationException
IndexUnreachableException
-
isRecordHasImages
public boolean isRecordHasImages() throws IndexUnreachableException, DAOException, RecordNotFoundException- Returns:
- true if any of this record's pages has an image and user has access rights; false otherwise
- Throws:
IndexUnreachableException
DAOException
RecordNotFoundException
-
isTeiAvailableForWork
public boolean isTeiAvailableForWork() throws IndexUnreachableException, DAOException, PresentationExceptionisTeiAvailableForWork.
- Returns:
- a boolean.
- Throws:
IndexUnreachableException
- if any.DAOException
- if any.PresentationException
- if any.
-
isRecordHasTEIFiles
- Returns:
- true if there are any TEI files associated directly with the top document
- Throws:
PresentationException
IndexUnreachableException
-
getToc
- Returns:
- the toc
-
setToc
- Parameters:
toc
- the toc to set
-
isAltoAvailableForWork
public boolean isAltoAvailableForWork() throws IndexUnreachableException, PresentationException, DAOExceptionisAltoAvailableForWork.
- Returns:
- a boolean.
- Throws:
IndexUnreachableException
- if any.PresentationException
- if any.DAOException
- if any.
-
getFulltext
@Deprecated public String getFulltext() throws IndexUnreachableException, DAOException, ViewerConfigurationExceptionDeprecated.UsePhysicalElement.getFullText()
Default fulltext getter (with HTML escaping).- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.ViewerConfigurationException
- if any.
-
getFulltext
@Deprecated public String getFulltext(boolean escapeHtml, String language) throws IndexUnreachableException, DAOException, ViewerConfigurationException Deprecated.UsePhysicalElement.getFullText()
Returns the full-text for the current page, stripped of any included JavaScript.- Parameters:
escapeHtml
- If true HTML tags will be escaped to prevent pseudo-HTML from breaking the text.language
- aString
object.- Returns:
- Full-text for the current page.
- Throws:
IndexUnreachableException
- if any.DAOException
- if any.ViewerConfigurationException
- if any.
-
getFulltextMimeType
- Returns:
- the probable mimeType of the fulltext of the current page. Loads the fulltext of that page if necessary
- Throws:
IndexUnreachableException
DAOException
ViewerConfigurationException
-
getFulltextMimeType
- Parameters:
language
-- Returns:
- TEI mime type if TEI files are indexed; mime type from the loaded full-text of the current page otherwise
- Throws:
ViewerConfigurationException
-
getCurrentRotate
public int getCurrentRotate()getCurrentRotate.
- Returns:
- a int.
-
setZoomSlider
public void setZoomSlider(int zoomSlider) Setter for the field
zoomSlider
.- Parameters:
zoomSlider
- a int.
-
getZoomSlider
public int getZoomSlider()Getter for the field
zoomSlider
.- Returns:
- a int.
-
isDisplayContentDownloadMenu
public boolean isDisplayContentDownloadMenu()Returns true if original content download has been enabled in the configuration and there are files in the original content folder for this record.- Returns:
- a boolean.
-
getContentDownloadLinksForWork
public List<LabeledLink> getContentDownloadLinksForWork() throws IOException, PresentationException, IndexUnreachableException, DAOExceptionReturns a list of original content file download links (name+url) for the current document.- Returns:
- a
List
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.PresentationException
- if any.IOException
-
getLinkToDownloadFile
-
getTopStructElementIddoc
public long getTopStructElementIddoc()Getter for the field
topStructElementIddoc
.- Returns:
- the topStructElementIddoc
-
getAnchorDocumentIddoc
-
getTopStructElement
Getter for the field
topStructElement
.- Returns:
- a
StructElement
object.
-
setTopStructElement
setTopStructElement.
- Parameters:
topStructElement
- the topStructElement to set
-
getCurrentStructElementIddoc
public long getCurrentStructElementIddoc()Getter for the field
currentStructElementIddoc
.- Returns:
- the currentStructElementIddoc
-
setCurrentStructElementtIddoc
public void setCurrentStructElementtIddoc(long currentStructElementIddoc) Setter for the field
currentStructElementIddoc
.- Parameters:
currentStructElementIddoc
- the currentStructElementIddoc to set
-
getCurrentStructElement
Getter for the field
currentStructElement
.- Returns:
- the currentStructElement
- Throws:
IndexUnreachableException
- if any.
-
setCurrentStructElement
Setter for the field
currentStructElement
.- Parameters:
currentStructElement
- the currentStructElement to set
-
getCurrentDocumentHierarchy
getCurrentDocumentHierarchy.
- Returns:
- a
List
object. - Throws:
IndexUnreachableException
- if any.
-
getLogId
Getter for the field
logId
.- Returns:
- the logId
-
setLogId
Setter for the field
logId
.- Parameters:
logId
- the logId to set
-
getPageLoader
Getter for the field
pageLoader
.- Returns:
- the pageLoader
-
getDublinCoreMetaTags
Generates DC meta tags for the head of a HTML page.- Returns:
- String with tags
-
getHighwirePressMetaTags
getHighwirePressMetaTags.
- Returns:
- String with tags
-
isHasVersionHistory
isHasVersionHistory.
- Returns:
- a boolean.
- Throws:
PresentationException
- if any.IndexUnreachableException
- if any.
-
getVersionHistory
Getter for the field
versionHistory
.- Returns:
- a
List
object. - Throws:
PresentationException
- if any.IndexUnreachableException
- if any.
-
getContextObject
Returns the ContextObject value for a COinS element (generated using metadata fromcurrentDocument
).- Returns:
- a
String
object.
-
addToTranskribusAction
addToTranskribusAction.
- Parameters:
login
- If true, the user will first be logged into their Transkribus account in the UserBean.- Returns:
- a
String
object.
-
isRecordAddedToTranskribus
isRecordAddedToTranskribus.
- Parameters:
session
- aTranskribusSession
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.
-
useTiles
public boolean useTiles() throws IndexUnreachableException, DAOException, ViewerConfigurationExceptionuseTiles.
- Returns:
- a boolean.
- Throws:
IndexUnreachableException
- if any.DAOException
- if any.ViewerConfigurationException
- if any.
-
useTilesFullscreen
public boolean useTilesFullscreen() throws IndexUnreachableException, DAOException, ViewerConfigurationExceptionuseTilesFullscreen.
- Returns:
- a boolean.
- Throws:
IndexUnreachableException
- if any.DAOException
- if any.ViewerConfigurationException
- if any.
-
getPi
Getter for the field
pi
.- Returns:
- the pi
- Throws:
IndexUnreachableException
- if any.
-
getAnchorPi
If the current record is a volume, returns the PI of the anchor record.- Returns:
- anchor PI if record is volume; null otherwise.
-
getMimeType
Getter for the field
mimeType
.- Returns:
- the mimeType
-
togglePageOrientation
public void togglePageOrientation()togglePageOrientation.
-
setDoublePageMode
public void setDoublePageMode(boolean doublePageMode) Setter for the field
doublePageMode
.- Parameters:
doublePageMode
- the doublePageMode to set
-
isDoublePageMode
public boolean isDoublePageMode()isDoublePageMode.
- Returns:
- the doublePageMode
-
getFirstPdfPage
Getter for the field
firstPdfPage
.- Returns:
- the firstPdfPage
-
setFirstPdfPage
Setter for the field
firstPdfPage
.- Parameters:
firstPdfPage
- the firstPdfPage to set
-
getLastPdfPage
Getter for the field
lastPdfPage
.- Returns:
- the lastPdfPage
-
setLastPdfPage
Setter for the field
lastPdfPage
.- Parameters:
lastPdfPage
- the lastPdfPage to set
-
getCalendarView
Getter for the field
calendarView
.- Returns:
- the calendarView
- Throws:
IndexUnreachableException
- if any.PresentationException
- if any.
-
getFirstPageOrientation
Getter for the field
firstPageOrientation
.- Returns:
- the firstPageOrientation
-
setFirstPageOrientation
Setter for the field
firstPageOrientation
.- Parameters:
firstPageOrientation
- the firstPageOrientation to set
-
getCurrentPageSourceIndex
getCurrentPageSourceIndex.
- Returns:
- 1 if we are in double page mode and the current page is the right page. 0 otherwise
- Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getTopDocumentTitle
getTopDocumentTitle.
- Returns:
- a
String
object.
-
getDocumentTitle
getDocumentTitle.
- Parameters:
document
- aStructElement
object.- Returns:
- a
String
object.
-
setPageLoader
Setter for the field
pageLoader
.- Parameters:
loader
- aIPageLoader
object.
-
getCiteLinkWork
public String getCiteLinkWork() throws IndexUnreachableException, DAOException, PresentationExceptiongetCiteLinkWork.
- Returns:
- A persistent link to the current work
- Throws:
IndexUnreachableException
- if any.DAOException
- if any.PresentationException
- if any.
-
isDisplayCiteLinkWork
public boolean isDisplayCiteLinkWork()isDisplayCiteLinkWork.
- Returns:
- a boolean.
-
getCiteLinkDocstruct
- Returns:
- Citation URL for the current structure element
- Throws:
IndexUnreachableException
-
isDisplayCiteLinkDocstruct
public boolean isDisplayCiteLinkDocstruct()isDisplayCiteLinkDocstruct.
- Returns:
- a boolean.
-
getCiteLinkPage
getCiteLinkPage.
- Returns:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
isDisplayCiteLinkPage
isDisplayCiteLinkPage.
- Returns:
- a boolean.
- Throws:
IndexUnreachableException
- if any.DAOException
- if any.
-
getCitationStringHtml
public String getCitationStringHtml() throws IOException, IndexUnreachableException, PresentationException- Returns:
- HTML-formatted citation text
- Throws:
IOException
IndexUnreachableException
PresentationException
-
getCitationStringPlain
public String getCitationStringPlain() throws IOException, IndexUnreachableException, PresentationException- Returns:
- Plain citation text
- Throws:
IOException
IndexUnreachableException
PresentationException
-
getCitationStyle
- Returns:
- the citationStyle
-
setCitationStyle
- Parameters:
citationStyle
- the citationStyle to set
-
getCitationProcessorWrapper
- Returns:
- the citationProcessorWrapper
-
setCitationProcessorWrapper
- Parameters:
citationProcessorWrapper
- the citationProcessorWrapper to set
-
getSidebarWidgetUsageCitationLinksForLevel
public List<CitationLink> getSidebarWidgetUsageCitationLinksForLevel(String levelName) throws PresentationException, IndexUnreachableException - Parameters:
levelName
-- Returns:
- List of configured citation links for the given levelName, populated with values
- Throws:
IndexUnreachableException
PresentationException
-
getArchiveEntryIdentifier
- Returns:
- Value of MD_ARCHIVE_ENTRY_ID in the loaded record
-
createViewManager
public static ViewManager createViewManager(String pi, boolean loadPages) throws PresentationException, IndexUnreachableException, DAOException, RecordNotFoundException Creates an instance of ViewManager loaded with the record with the given identifier.- Parameters:
pi
- Record identifierloadPages
-- Returns:
- Created
ViewManager
- Throws:
PresentationException
IndexUnreachableException
ViewerConfigurationException
DAOException
RecordNotFoundException
-
getPageRangeAroundPage
public List<Integer> getPageRangeAroundPage(int pageOrder, int range, boolean fillToSize) throws IndexUnreachableException Returns an integer list such that- the 'pageOrder' is contained in the list
- the list contains (2*range)+1 consecutive numbers, or all page numbers of the current record if it is less than that
- the first number is not less than the first image order
- the last number is not larger than the last image order
- the 'pageOrder' is as far in the middle of the list as possible without violating any of the other points Used int thumbnailPaginator.xhtml to calculate the pages to display.
- Parameters:
pageOrder
- The current page number around which to center the numbersrange
- The number of numbers to include above and below the current page number, if possiblefillToSize
- if true, always return a list of exactly 2*range+1 elements, no matter the total number of pages in the current record- Returns:
- an integer list
- Throws:
IndexUnreachableException
- If the page numbers could not be read from SOLRorg.jboss.weld.exceptions.IllegalArgumentException
- If the pageOrder is not within the range of page numbers of the current record or if range is less than zero
-
getCopyrightIndicatorStatusName
- Returns:
- The most restrictive status name of the configured statuses
-
getCopyrightIndicatorStatuses
- Returns:
- copyrightIndicatorStatuses
-
getCopyrightIndicatorLicense
- Returns:
- the copyrightIndicatorLicense
-
hasPrerenderedPagePdfs
public boolean hasPrerenderedPagePdfs() -
getPagesForMediaType
public List<PhysicalElement> getPagesForMediaType(String type) throws PresentationException, IndexUnreachableException
-
PhysicalElement.getFullText()