Search in sources :

Example 1 with DataAvailabilityMemberType

use of net.opengis.sosgda.x10.DataAvailabilityMemberType in project arctic-sea by 52North.

the class GetDataAvailabilityResponseDecoder method parseDataAvalabilities.

private Collection<DataAvailability> parseDataAvalabilities(GetDataAvailabilityResponseType response) throws DecodingException {
    List<DataAvailability> availabilities = Lists.newArrayList();
    if (CollectionHelper.isNotNullOrEmpty(response.getDataAvailabilityMemberArray())) {
        Map<String, TimePeriod> periods = Maps.newHashMap();
        for (DataAvailabilityMemberType damt : response.getDataAvailabilityMemberArray()) {
            ReferenceType procedure = decodeXmlElement(damt.getProcedure());
            ReferenceType featureOfInterest = decodeXmlElement(damt.getFeatureOfInterest());
            ReferenceType observedProperty = decodeXmlElement(damt.getObservedProperty());
            TimePeriod phenomenonTime = getPhenomenonTime(damt.getPhenomenonTime().getAbstractTimeObject(), damt.getPhenomenonTime().getHref(), periods);
            availabilities.add(new DataAvailability(procedure, observedProperty, featureOfInterest, null, phenomenonTime));
        }
    }
    return availabilities;
}
Also used : TimePeriod(org.n52.shetland.ogc.gml.time.TimePeriod) DataAvailability(org.n52.shetland.ogc.sos.gda.GetDataAvailabilityResponse.DataAvailability) ReferenceType(org.n52.shetland.ogc.gml.ReferenceType) DataAvailabilityMemberType(net.opengis.sosgda.x10.DataAvailabilityMemberType)

Aggregations

DataAvailabilityMemberType (net.opengis.sosgda.x10.DataAvailabilityMemberType)1 ReferenceType (org.n52.shetland.ogc.gml.ReferenceType)1 TimePeriod (org.n52.shetland.ogc.gml.time.TimePeriod)1 DataAvailability (org.n52.shetland.ogc.sos.gda.GetDataAvailabilityResponse.DataAvailability)1