use of org.n52.shetland.ogc.sos.gda.GetDataAvailabilityResponse.ObservationFormatDescriptor in project arctic-sea by 52North.
the class GetDataAvailabilityJsonEncoder method encodeObservationFormatDescriptor.
private void encodeObservationFormatDescriptor(Set<ObservationFormatDescriptor> observationFormatDescriptors, ObjectNode fdNode) {
ArrayNode ofdArray = fdNode.putArray(GetDataAvailabilityConstants.OBSERVATION_FORMAT_DESCRIPTOR);
for (ObservationFormatDescriptor ofd : observationFormatDescriptors) {
ObjectNode ofdNode = ofdArray.addObject();
ofdNode.put(GetDataAvailabilityConstants.RESPONSE_FORMAT, ofd.getResponseFormat());
ArrayNode otArray = ofdNode.putArray(GetDataAvailabilityConstants.OBSERVATION_TYPE);
for (String obsType : ofd.getObservationTypes()) {
otArray.add(obsType);
}
}
}
use of org.n52.shetland.ogc.sos.gda.GetDataAvailabilityResponse.ObservationFormatDescriptor in project arctic-sea by 52North.
the class GetDataAvailabilityV20StreamWriter method writeFormatDescriptor.
protected void writeFormatDescriptor(FormatDescriptor formatDescriptor) throws XMLStreamException {
start(GetDataAvailabilityConstants.GDA_20_FORMAT_DESCRIPTOR);
writeProcedureDescriptionFormatDescriptor(formatDescriptor.getProcedureDescriptionFormatDescriptor());
for (ObservationFormatDescriptor ofd : formatDescriptor.getObservationFormatDescriptors()) {
writeObservationFormatDescriptor(ofd);
}
end(GetDataAvailabilityConstants.GDA_20_FORMAT_DESCRIPTOR);
}
use of org.n52.shetland.ogc.sos.gda.GetDataAvailabilityResponse.ObservationFormatDescriptor in project arctic-sea by 52North.
the class GetDataAvailabilityResponseDecoder method createFormatDescriptor.
private FormatDescriptor createFormatDescriptor(FormatDescriptorType fdt) {
if (fdt != null) {
String procDescFormatDescriptor = fdt.getProcedureDescriptionFormatDescriptor().getProcedureDescriptionFormat();
Set<ObservationFormatDescriptor> obsFormDescs = Sets.newHashSet();
for (ObservationFormatDescriptorType obsFormatDescriptor : fdt.getObservationFormatDescriptorArray()) {
obsFormDescs.add(new ObservationFormatDescriptor(obsFormatDescriptor.getResponseFormat(), Sets.newHashSet(obsFormatDescriptor.getObservationTypeArray())));
}
return new FormatDescriptor(new ProcedureDescriptionFormatDescriptor(procDescFormatDescriptor), obsFormDescs);
}
return null;
}
Aggregations