Class DefaultURLBuilder

java.lang.Object
io.goobi.viewer.modules.interfaces.DefaultURLBuilder
All Implemented Interfaces:
IURLBuilder

public class DefaultURLBuilder extends Object implements IURLBuilder

DefaultURLBuilder class.

Author:
Florian Alpers
  • Constructor Details

    • DefaultURLBuilder

      public DefaultURLBuilder()
  • Method Details

    • generateURL

      public String generateURL(BrowseElement ele)

      generateURL.

      Specified by:
      generateURL in interface IURLBuilder
      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:
      buildPageUrl in interface IURLBuilder
      Parameters:
      pi - The record persistent identifier
      imageNo - the page number (1-based)
      logId - The METS identifier of the logical struct element
      pageType - the type of viewer page the url should open
      topStruct - 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

      protected PageType getPageType(BrowseElement ele)

      getPageType.

      Parameters:
      ele - a BrowseElement object.
      Returns:
      a PageType object.
    • buildSearchUrl

      protected String buildSearchUrl(String fieldName, String fieldValue)

      buildSearchUrl.

      Parameters:
      fieldName - a String object.
      fieldValue - a String object.
      Returns:
      a String object.