public class ThreddsWmsCatalogue
extends java.lang.Object
implements uk.ac.rdg.resc.edal.wms.WmsCatalogue
WmsCatalogue to work with the TDS.
This is a working example, but many of the specifics will need to be
implemented differently based on how the THREDDS team decide to configure WMS
layers.
This WmsCatalogue provides access to a SINGLE dataset. As such, each
different dataset requested will have a new instance of this class.
NB - No caching is implemented in this WmsCatalogue. I would
recommend a cache which is shared amongst all WmsCatalogues, passed
in on object construction, and which performs the caching/retrieval in the
FeatureCatalogue.getFeaturesForLayer(String, PlottingDomainParams)
method. The cache keys will be a pair of the layerName and the
PlottingDomainParams, and the cached values will be
Collections of DiscreteFeatures.| Constructor and Description |
|---|
ThreddsWmsCatalogue(ucar.nc2.dataset.NetcdfDataset ncd,
java.lang.String id) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsGlobalCapabilities() |
java.util.Collection<uk.ac.rdg.resc.edal.dataset.Dataset> |
getAllDatasets() |
uk.ac.rdg.resc.edal.wms.util.ContactInfo |
getContactInfo() |
uk.ac.rdg.resc.edal.dataset.Dataset |
getDatasetFromId(java.lang.String layerName) |
java.lang.String |
getDatasetTitle(java.lang.String layerName)
Get the title of the dataset.
|
uk.ac.rdg.resc.edal.graphics.utils.FeatureCatalogue.FeaturesAndMemberName |
getFeaturesForLayer(java.lang.String layerName,
uk.ac.rdg.resc.edal.graphics.utils.PlottingDomainParams params) |
org.joda.time.DateTime |
getLastUpdateTime() |
uk.ac.rdg.resc.edal.graphics.utils.EnhancedVariableMetadata |
getLayerMetadata(uk.ac.rdg.resc.edal.metadata.VariableMetadata metadata) |
uk.ac.rdg.resc.edal.graphics.utils.LayerNameMapper |
getLayerNameMapper() |
uk.ac.rdg.resc.edal.wms.util.ServerInfo |
getServerInfo() |
uk.ac.rdg.resc.edal.graphics.utils.StyleCatalogue |
getStyleCatalogue() |
boolean |
isDisabled(java.lang.String layerName) |
boolean |
isDownloadable(java.lang.String layerName) |
boolean |
isQueryable(java.lang.String layerName) |
public ThreddsWmsCatalogue(ucar.nc2.dataset.NetcdfDataset ncd,
java.lang.String id)
throws java.io.IOException,
uk.ac.rdg.resc.edal.exceptions.EdalException
java.io.IOExceptionuk.ac.rdg.resc.edal.exceptions.EdalExceptionpublic uk.ac.rdg.resc.edal.graphics.utils.FeatureCatalogue.FeaturesAndMemberName getFeaturesForLayer(java.lang.String layerName,
uk.ac.rdg.resc.edal.graphics.utils.PlottingDomainParams params)
throws uk.ac.rdg.resc.edal.exceptions.EdalException
getFeaturesForLayer in interface uk.ac.rdg.resc.edal.graphics.utils.FeatureCatalogueuk.ac.rdg.resc.edal.exceptions.EdalExceptionpublic java.util.Collection<uk.ac.rdg.resc.edal.dataset.Dataset> getAllDatasets()
getAllDatasets in interface uk.ac.rdg.resc.edal.graphics.utils.DatasetCataloguepublic boolean allowsGlobalCapabilities()
public uk.ac.rdg.resc.edal.dataset.Dataset getDatasetFromId(java.lang.String layerName)
getDatasetFromId in interface uk.ac.rdg.resc.edal.graphics.utils.DatasetCataloguepublic java.lang.String getDatasetTitle(java.lang.String layerName)
getDatasetTitle in interface uk.ac.rdg.resc.edal.wms.WmsCataloguelayerName - name of the layerpublic boolean isDisabled(java.lang.String layerName)
isDisabled in interface uk.ac.rdg.resc.edal.wms.WmsCataloguepublic boolean isDownloadable(java.lang.String layerName)
isDownloadable in interface uk.ac.rdg.resc.edal.wms.WmsCataloguepublic boolean isQueryable(java.lang.String layerName)
isQueryable in interface uk.ac.rdg.resc.edal.wms.WmsCataloguepublic org.joda.time.DateTime getLastUpdateTime()
getLastUpdateTime in interface uk.ac.rdg.resc.edal.graphics.utils.DatasetCataloguepublic uk.ac.rdg.resc.edal.wms.util.ContactInfo getContactInfo()
getContactInfo in interface uk.ac.rdg.resc.edal.wms.WmsCataloguepublic uk.ac.rdg.resc.edal.wms.util.ServerInfo getServerInfo()
getServerInfo in interface uk.ac.rdg.resc.edal.wms.WmsCataloguepublic uk.ac.rdg.resc.edal.graphics.utils.LayerNameMapper getLayerNameMapper()
getLayerNameMapper in interface uk.ac.rdg.resc.edal.wms.WmsCataloguepublic uk.ac.rdg.resc.edal.graphics.utils.StyleCatalogue getStyleCatalogue()
getStyleCatalogue in interface uk.ac.rdg.resc.edal.wms.WmsCataloguepublic uk.ac.rdg.resc.edal.graphics.utils.EnhancedVariableMetadata getLayerMetadata(uk.ac.rdg.resc.edal.metadata.VariableMetadata metadata)
throws uk.ac.rdg.resc.edal.graphics.exceptions.EdalLayerNotFoundException
getLayerMetadata in interface uk.ac.rdg.resc.edal.graphics.utils.DatasetCatalogueuk.ac.rdg.resc.edal.graphics.exceptions.EdalLayerNotFoundException