private Map<String, String> getExternalAuthorityNameToUrlMap(
     final OWSMetadataProvider metadataProvider) {
   if (metadataProvider != null) {
     return metadataProvider.getExternalMetadataAuthorities();
   }
   return null;
 }
 private DatasetMetadata getDatasetMetadataFromProvider(final Theme theme) {
   final String datasetName = getNameFromThemeOrFirstNamedLayer(theme);
   if (metadataProvider != null && datasetName != null) {
     return metadataProvider.getDatasetMetadata(new QName(datasetName));
   }
   return null;
 }