Class HtmlConfigBean
- java.lang.Object
-
- thredds.server.config.HtmlConfigBean
-
@Component public class HtmlConfigBean extends Object
-
-
Constructor Summary
Constructors Constructor Description HtmlConfigBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddHtmlConfigInfoToModel(Map<String,Object> model)StringgetCatalogCssUrl()Return the URL to the CSS file used for catalog HTML pages.StringgetDatasetCssUrl()Return the URL to the CSS file used for catalog HTML pages.StringgetDatasetIconAlt()StringgetDatasetIconUrl()Return the URL to the icon document used for datasets in HTML catalog views.StringgetFolderIconAlt()StringgetFolderIconUrl()Return the URL to the icon document used for folders in HTML catalog views.BooleangetGenerateDatasetJsonLD()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.StringgetGoogleTrackingCode()Return the google tracking code for google analytics.StringgetHostInstLogoAlt()Return the alternate text for the logo for the institution hosting this installation.StringgetHostInstLogoUrl()Return the path to the logo file for the institution hosting this installation.StringgetHostInstName()Return the name of the institution hosting this TDS installation.StringgetHostInstUrl()Return the URL to a web page for the institution hosting this installation.StringgetInstallLogoAlt()Return the alternate text for the logo for this TDS installation.StringgetInstallLogoUrl()Return the path to the logo file for this TDS installation.StringgetInstallName()Return the name of this TDS installation.StringgetInstallUrl()Return the URL to the top level of this TDS installation.StringgetOpenDapCssUrl()Return the URL to the CSS file used for the OPeNDAP access pages.StringgetPageCssUrl()Return the URL to the CSS file used for all non-catalog HTML pages.BooleangetUseRemoteCatalogService()Return the config option that sets the default of whether or not to use remoteCatalogService for html representation of catalogRef's in client catalogs.StringgetWebappContextPath()StringgetWebappDocsUrl()Return the URL to the webapp documentation page.StringgetWebappLogoAlt()Return the alternate text for the webapp logo.StringgetWebappLogoUrl()Return the Url to the logo file for the webapp.StringgetWebappName()StringgetWebappUrl()Return the URL to the main web page for the webapp.StringgetWebappVersion()StringgetWebappVersionBuildDate()voidinit(String webappName, String webappVersion, String webappVersionBuildDate, String webappContextPath)StringprepareUrlStringForHtml(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.voidsetCatalogCssUrl(String catalogCssUrl)voidsetDatasetCssUrl(String datasetCssUrl)voidsetDatasetIconAlt(String datasetIconAlt)voidsetDatasetIconUrl(String datasetIconUrl)voidsetFolderIconAlt(String folderIconAlt)voidsetFolderIconUrl(String folderIconUrl)voidsetGenerateDatasetJsonLD(Boolean generateDatasetJsonLD)voidsetGoogleTrackingCode(String googleTrackingCode)voidsetHostInstLogoAlt(String hostInstLogoAlt)voidsetHostInstLogoUrl(String hostInstLogoUrl)voidsetHostInstName(String hostInstName)voidsetHostInstUrl(String hostInstUrl)voidsetInstallLogoAlt(String installLogoAlt)voidsetInstallLogoUrl(String installLogoUrl)voidsetInstallName(String installName)voidsetInstallUrl(String installUrl)voidsetOpenDapCssUrl(String openDapCssUrl)voidsetPageCssUrl(String pageCssUrl)voidsetUseRemoteCatalogService(Boolean remoteCatalogService)voidsetWebappDocsUrl(String webappDocsUrl)voidsetWebappLogoAlt(String webappLogoAlt)voidsetWebappLogoUrl(String webappLogoUrl)voidsetWebappUrl(String webappUrl)
-
-
-
Method Detail
-
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.
-
-