Class HtmlConfigBean

java.lang.Object
thredds.server.config.HtmlConfigBean

@Component public class HtmlConfigBean extends Object
  • Constructor Details

    • HtmlConfigBean

      public HtmlConfigBean()
  • Method Details

    • init

      public void init(String webappName, String webappVersion, String webappVersionBuildDate, String webappContextPath)
    • getWebappName

      public String getWebappName()
    • getWebappVersion

      public String getWebappVersion()
    • getWebappVersionBuildDate

      public String getWebappVersionBuildDate()
    • getWebappContextPath

      public String getWebappContextPath()
    • getWebappUrl

      public String getWebappUrl()
      Return the URL to the main web page for the webapp.

      Note: A relative URL is considered relative to the webapp context path. That is, it is relative to "http://server:port/thredds/".

      Returns:
      the URL to the main web page for the webapp.
    • setWebappUrl

      public void setWebappUrl(String webappUrl)
    • getWebappDocsUrl

      public String getWebappDocsUrl()
      Return the URL to the webapp documentation page.

      Note: A relative URL is considered relative to the webapp context path. That is, it is relative to "http://server:port/thredds/".

      Returns:
      the URL to the webapp documentation page.
    • setWebappDocsUrl

      public void setWebappDocsUrl(String webappDocsUrl)
    • getWebappLogoUrl

      public String getWebappLogoUrl()
      Return the Url to the logo file for the webapp.

      Note: A relative URL is considered relative to the webapp context path. That is, it is relative to "http://server:port/thredds/".

      Returns:
      the path to the logo file for the webapp.
    • setWebappLogoUrl

      public void setWebappLogoUrl(String webappLogoUrl)
    • getWebappLogoAlt

      public String getWebappLogoAlt()
      Return the alternate text for the webapp logo.
      Returns:
      the alternate text for the webapp logo.
    • setWebappLogoAlt

      public void setWebappLogoAlt(String webappLogoAlt)
    • getPageCssUrl

      public String getPageCssUrl()
      Return the URL to the CSS file used for all non-catalog HTML pages.

      Note: A relative URL is considered relative to the webapp context path. That is, it is relative to "http://server:port/thredds/".

      Returns:
      the Url to the CSS file used for all non-catalog HTML pages.
    • setPageCssUrl

      public void setPageCssUrl(String pageCssUrl)
    • getOpenDapCssUrl

      public String getOpenDapCssUrl()
      Return the URL to the CSS file used for the OPeNDAP access pages.

      Note: A relative URL is considered relative to the webapp context path. That is, it is relative to "http://server:port/thredds/".

      Returns:
      the URL to the CSS file used for the OPeNDAP access pages.
    • setOpenDapCssUrl

      public void setOpenDapCssUrl(String openDapCssUrl)
    • getCatalogCssUrl

      public String getCatalogCssUrl()
      Return the URL to the CSS file used for catalog HTML pages.

      Note: A relative URL is considered relative to the webapp context path. That is, it is relative to "http://server:port/thredds/".

      Returns:
      the URL to the CSS file used for catalog HTML pages.
    • setCatalogCssUrl

      public void setCatalogCssUrl(String catalogCssUrl)
    • getDatasetCssUrl

      public String getDatasetCssUrl()
      Return the URL to the CSS file used for catalog HTML pages.

      Note: A relative URL is considered relative to the webapp context path. That is, it is relative to "http://server:port/thredds/".

      Returns:
      the URL to the CSS file used for catalog HTML pages.
    • setDatasetCssUrl

      public void setDatasetCssUrl(String datasetCssUrl)
    • getGoogleTrackingCode

      public String getGoogleTrackingCode()
      Return the google tracking code for google analytics.
      Returns:
      the google tracking code for google analytics.
    • setGoogleTrackingCode

      public void setGoogleTrackingCode(String googleTrackingCode)
    • getFolderIconUrl

      public String getFolderIconUrl()
      Return the URL to the icon document used for folders in HTML catalog views.

      Note: A relative URL is considered relative to the webapp context path. That is, it is relative to "http://server:port/thredds/".

      Returns:
      the URL to the icon document used for folders in HTML catalog views.
    • setFolderIconUrl

      public void setFolderIconUrl(String folderIconUrl)
    • getFolderIconAlt

      public String getFolderIconAlt()
    • setFolderIconAlt

      public void setFolderIconAlt(String folderIconAlt)
    • getDatasetIconUrl

      public String getDatasetIconUrl()
      Return the URL to the icon document used for datasets in HTML catalog views.

      Note: A relative URL is considered relative to the webapp context path. That is, it is relative to "http://server:port/thredds/".

      Returns:
      the URL to the icon document used for datasets in HTML catalog views.
    • setDatasetIconUrl

      public void setDatasetIconUrl(String datasetIconUrl)
    • getDatasetIconAlt

      public String getDatasetIconAlt()
    • setDatasetIconAlt

      public void setDatasetIconAlt(String datasetIconAlt)
    • getInstallName

      public String getInstallName()
      Return the name of this TDS installation.
      Returns:
      the name of this TDS installation.
    • setInstallName

      public void setInstallName(String installName)
    • getInstallUrl

      public String getInstallUrl()
      Return the URL to the top level of this TDS installation.

      Note: A relative URL is considered relative to the webapp context path. That is, it is relative to "http://server:port/thredds/".

      Returns:
      the URL to the top level of this installation.
    • setInstallUrl

      public void setInstallUrl(String installUrl)
    • getInstallLogoUrl

      public String getInstallLogoUrl()
      Return the path to the logo file for this TDS installation.

      Note: A relative URL is considered relative to the webapp context path. That is, it is relative to "http://server:port/thredds/".

      Returns:
      the path to the logo file for this installation of the webapp.
    • setInstallLogoUrl

      public void setInstallLogoUrl(String installLogoUrl)
    • getInstallLogoAlt

      public String getInstallLogoAlt()
      Return the alternate text for the logo for this TDS installation.
      Returns:
      the alternate text for the logo for this installation.
    • setInstallLogoAlt

      public void setInstallLogoAlt(String installLogoAlt)
    • getHostInstName

      public String getHostInstName()
      Return the name of the institution hosting this TDS installation.
      Returns:
      the name of the institution hosting this TDS installation.
    • setHostInstName

      public void setHostInstName(String hostInstName)
    • getHostInstUrl

      public String getHostInstUrl()
      Return the URL to a web page for the institution hosting this installation.

      Note: A relative URL is considered relative to the webapp context path. That is, it is relative to "http://server:port/thredds/".

      Returns:
      the URL to a web page for the institution hosting this installation.
    • setHostInstUrl

      public void setHostInstUrl(String hostInstUrl)
    • getHostInstLogoUrl

      public String getHostInstLogoUrl()
      Return the path to the logo file for the institution hosting this installation.

      Note: A relative URL is considered relative to the webapp context path. That is, it is relative to "http://server:port/thredds/".

      Returns:
      the path to the logo file for the institution hosting this installation.
    • setHostInstLogoUrl

      public void setHostInstLogoUrl(String hostInstLogoUrl)
    • getHostInstLogoAlt

      public String getHostInstLogoAlt()
      Return the alternate text for the logo for the institution hosting this installation.
      Returns:
      the alternate text for the logo for the institution hosting this installation.
    • setHostInstLogoAlt

      public void setHostInstLogoAlt(String hostInstLogoAlt)
    • getUseRemoteCatalogService

      public Boolean getUseRemoteCatalogService()
      Return the config option that sets the default of whether or not to use remoteCatalogService for html representation of catalogRef's in client catalogs.
      Returns:
      true: use remoteCatalogService, false: assume catalogRef's point to a TDS, so simply link the html url of the remote catalog.
    • setUseRemoteCatalogService

      public void setUseRemoteCatalogService(Boolean remoteCatalogService)
    • getGenerateDatasetJsonLD

      public Boolean getGenerateDatasetJsonLD()
      Return the config option that determines whether or not to DataSet JSON-LD elements are generated in the head of the html for direct datasets.
      Returns:
      true: generate json-ld, false: do not generate json-ld.
    • setGenerateDatasetJsonLD

      public void setGenerateDatasetJsonLD(Boolean generateDatasetJsonLD)
    • prepareUrlStringForHtml

      public String prepareUrlStringForHtml(String url)
      Return a URL ready to use in a generated HTML page from a URL that is either absolute or relative to the webapp context path. That is, if relative, it is relative to "http://server:port/thredds/".

      For simplicity, all relative URLs are converted to URLs that are absolute paths. For instance, "catalog.xml" becomes "/thredds/catalog.xml".

      Parameters:
      url - the URL to prepare for use in HTML.
      Returns:
      a URL ready to use in a generated HTML page.
    • addHtmlConfigInfoToModel

      public void addHtmlConfigInfoToModel(Map<String,Object> model)