Search in sources :

Example 1 with ObservationOfferingPropertyType

use of net.opengis.sos.x20.ObservationOfferingPropertyType in project arctic-sea by 52North.

the class CapabilitiesTypeDecoder method parseOffering.

private SosObservationOffering parseOffering(AbstractContentsType.Offering offering) {
    SosObservationOffering observationOffering = new SosObservationOffering();
    if (offering.getDomNode().hasChildNodes()) {
        final Node node = XmlHelper.getNodeFromNodeList(offering.getDomNode().getChildNodes());
        try {
            ObservationOfferingPropertyType offeringType = ObservationOfferingPropertyType.Factory.parse(node);
            ObservationOfferingType obsOffPropType = offeringType.getObservationOffering();
            observationOffering.setOffering(parseOffering(obsOffPropType));
            observationOffering.setProcedures(parseProcedure(obsOffPropType));
            observationOffering.setProcedureDescriptionFormat(parseProcedureDescriptionFormat(obsOffPropType));
            observationOffering.setObservableProperties(parseObservableProperties(obsOffPropType));
            observationOffering.setRelatedFeatures(parseRelatedFeatures(obsOffPropType));
            observationOffering.setObservedArea(parseObservedArea(obsOffPropType));
            observationOffering.setPhenomenonTime(parsePhenomenonTime(obsOffPropType));
            observationOffering.setResultTime(parseResultTime(obsOffPropType));
            observationOffering.setResponseFormats(parseResponseFormats(obsOffPropType));
            observationOffering.setObservationTypes(parseObservationTypes(obsOffPropType));
            observationOffering.setFeatureOfInterestTypes(parseFeatureOfInterestTypes(obsOffPropType));
            observationOffering.setExtensions(parseOfferingExtension(obsOffPropType));
        } catch (XmlException | DecodingException ex) {
            LOGGER.error(ex.getLocalizedMessage(), ex);
        }
    }
    return observationOffering;
}
Also used : ObservationOfferingPropertyType(net.opengis.sos.x20.ObservationOfferingPropertyType) ObservationOfferingType(net.opengis.sos.x20.ObservationOfferingType) XmlException(org.apache.xmlbeans.XmlException) Node(org.w3c.dom.Node) DecodingException(org.n52.svalbard.decode.exception.DecodingException) SosObservationOffering(org.n52.shetland.ogc.sos.SosObservationOffering)

Aggregations

ObservationOfferingPropertyType (net.opengis.sos.x20.ObservationOfferingPropertyType)1 ObservationOfferingType (net.opengis.sos.x20.ObservationOfferingType)1 XmlException (org.apache.xmlbeans.XmlException)1 SosObservationOffering (org.n52.shetland.ogc.sos.SosObservationOffering)1 DecodingException (org.n52.svalbard.decode.exception.DecodingException)1 Node (org.w3c.dom.Node)1