cdm/src/main/java/thredds/client/catalog/tools/DatasetHtmlWriter.java
public String resolve(Dataset ds, String href) {
    Catalog cat = ds.getParentCatalog();
    if (cat != null) {
      try {
        java.net.URI uri = cat.resolveUri(href);
        href = uri.toString();
      } catch (java.net.URISyntaxException e) {
        return "DatasetHtmlWriter: error parsing URL= " + href;
      }
    }
    return href;
  }
public String resolve(Dataset ds, String href) {
    Catalog cat = ds.getParentCatalog();
    if (cat != null) {
      try {
        java.net.URI uri = cat.resolveUri(href);
        href = uri.toString();
      } catch (java.net.URISyntaxException e) {
        return "DatasetHtmlWriter: error parsing URL= " + href;
      }
    }
    return href;
  }
resolve reletive URLS against the catalog URL.

@param ds   use ds parent catalog, if it exists
@param href URL to resolve
@return resolved URL