Class DatasetHtmlWriter


  • public class DatasetHtmlWriter
    extends Object
    Create Html from a dataset
    Since:
    1/8/2015
    • Constructor Detail

      • DatasetHtmlWriter

        public DatasetHtmlWriter()
    • Method Detail

      • writeHtmlDescription

        public void writeHtmlDescription​(Formatter out,
                                         Dataset ds,
                                         boolean complete,
                                         boolean isServer,
                                         boolean datasetEvents,
                                         boolean catrefEvents,
                                         boolean resolveRelativeUrls)
        Write an Html representation of the given dataset.

        With datasetEvents, catrefEvents = true, this is used to construct an HTML page on the client (eg using HtmlPage); the client then detects URL clicks and processes.

        With datasetEvents, catrefEvents = false, this is used to construct an HTML page on the server. (eg using HtmlPage); the client then detects URL clicks and processes.

        Parameters:
        out - put HTML here.
        ds - the dataset.
        complete - if true, add HTML header and ender so its a complete, valid HTML page.
        isServer - if true, then we are in the thredds data server, so do the following:
        • append "html" to DODS Access URLs
        datasetEvents - if true, prepend "dataset:" to any dataset access URLS
        catrefEvents - if true, prepend "catref:" to any catref URLS
      • resolve

        public String resolve​(Dataset ds,
                              String href)
        resolve relative URLS against the catalog URL.
        Parameters:
        ds - use ds parent catalog, if it exists
        href - URL to resolve
        Returns:
        resolved URL