public class DatasetHtmlWriter
extends java.lang.Object
Constructor and Description |
---|
DatasetHtmlWriter() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
resolve(Dataset ds,
java.lang.String href)
resolve reletive URLS against the catalog URL.
|
void |
writeHtmlDescription(java.util.Formatter out,
Dataset ds,
boolean complete,
boolean isServer,
boolean datasetEvents,
boolean catrefEvents,
boolean resolveRelativeUrls)
Write an Html representation of the given dataset.
|
public void writeHtmlDescription(java.util.Formatter out, Dataset ds, boolean complete, boolean isServer, boolean datasetEvents, boolean catrefEvents, boolean resolveRelativeUrls)
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.
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: datasetEvents
- if true, prepend "dataset:" to any dataset access URLScatrefEvents
- if true, prepend "catref:" to any catref URLSpublic java.lang.String resolve(Dataset ds, java.lang.String href)
ds
- use ds parent catalog, if it existshref
- URL to resolve