Class DefaultURLBuilder
java.lang.Object
io.goobi.viewer.modules.interfaces.DefaultURLBuilder
- All Implemented Interfaces:
IURLBuilder
Default implementation of the URL builder interface, constructing standard viewer page URLs.
- Author:
- Florian Alpers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildPageUrl(String pi, int imageNo, String logId, PageType pageType, boolean topStruct) buildPageUrl.protected StringbuildSearchUrl(String fieldName, String fieldValue) buildSearchUrl.generateURL(BrowseElement ele) generateURL.protected PageTypegetPageType(BrowseElement ele) getPageType.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.goobi.viewer.modules.interfaces.IURLBuilder
buildPageUrl
-
Constructor Details
-
DefaultURLBuilder
public DefaultURLBuilder()
-
-
Method Details
-
generateURL
generateURL.- Specified by:
generateURLin interfaceIURLBuilder- Parameters:
ele- The browseElement for which we want to build a url- Returns:
- The url the the given BrowseElement should link to
-
buildPageUrl
public String buildPageUrl(String pi, int imageNo, String logId, PageType pageType, boolean topStruct) buildPageUrl.- Specified by:
buildPageUrlin interfaceIURLBuilder- Parameters:
pi- The record persistent identifierimageNo- the page number (1-based)logId- The METS identifier of the logical struct elementpageType- the type of viewer page the url should opentopStruct- if false, the url should point to a page or struct element within the record, so imageNo and logId must be considered- Returns:
- A URL to the object in the view given by pageType
-
getPageType
getPageType.- Parameters:
ele- browse element whose page type to determine- Returns:
- the PageType appropriate for the given browse element, adjusted for UGC and TEI records
-
buildSearchUrl
buildSearchUrl.- Parameters:
fieldName- Solr field name to search infieldValue- field value to search for- Returns:
- the viewer search URL for the given Solr field and value
-