use of gov.usgs.cida.coastalhazards.util.ogc.OGCService in project coastal-hazards by USGS-CIDA.
the class TemplateResource method makeSummary.
private Summary makeSummary(Layer layer, String attr) throws JsonSyntaxException {
OGCService cswService = Service.ogcHelper(Service.ServiceType.csw, layer.getServices());
log.debug("cswService {}", cswService);
String cswEndpoint = cswService.getEndpoint();
log.debug("cswEndpoint {}", cswEndpoint);
String summaryJson = null;
try {
summaryJson = MetadataUtil.getSummaryFromWPS(cswEndpoint, attr);
log.debug("summaryJsonMetadataUtil {}", summaryJson);
} catch (IOException | ParserConfigurationException | SAXException | URISyntaxException ex) {
log.error("Problem getting summary from item", ex);
}
Gson gson = GsonUtil.getDefault();
log.debug(String.valueOf(gson));
Summary summary = gson.fromJson(summaryJson, Summary.class);
log.debug(String.valueOf(summary));
return summary;
}
use of gov.usgs.cida.coastalhazards.util.ogc.OGCService in project coastal-hazards by USGS-CIDA.
the class Item method fetchWfsService.
public WFSService fetchWfsService() {
WFSService wfsService = null;
OGCService ogc = fetchOgcService(ServiceType.proxy_wfs);
if (ogc instanceof WFSService) {
wfsService = (WFSService) ogc;
}
return wfsService;
}
use of gov.usgs.cida.coastalhazards.util.ogc.OGCService in project coastal-hazards by USGS-CIDA.
the class Item method fetchCswService.
public CSWService fetchCswService() {
CSWService cswService = null;
OGCService ogc = fetchOgcService(ServiceType.csw);
if (ogc instanceof CSWService) {
cswService = (CSWService) ogc;
}
return cswService;
}
use of gov.usgs.cida.coastalhazards.util.ogc.OGCService in project coastal-hazards by USGS-CIDA.
the class Item method fetchWmsService.
/**
* Get the WMSService to display from the services
*
* @return
*/
public WMSService fetchWmsService() {
WMSService wmsService = null;
OGCService ogc = fetchOgcService(ServiceType.proxy_wms);
if (ogc instanceof WMSService) {
wmsService = (WMSService) ogc;
}
return wmsService;
}
Aggregations