use of org.n52.svalbard.util.XmlHelper in project arctic-sea by 52North.
the class GetCapabilitiesResponseEncoder method encodeObservationOffering.
private void encodeObservationOffering(SosObservationOffering offering, int offeringCounter, ContentsType xbContType) throws EncodingException {
final ObservationOfferingType xbObsOff = ObservationOfferingType.Factory.newInstance(getXmlOptions());
SosOffering sosOffering = offering.getOffering();
xbObsOff.setIdentifier(sosOffering.getIdentifier());
if (sosOffering.isSetName()) {
for (CodeType name : sosOffering.getName()) {
xbObsOff.addNewName().set(encodeObjectToXml(GmlConstants.NS_GML_32, name));
}
}
if (sosOffering.isSetDescription()) {
xbObsOff.setDescription(sosOffering.getDescription());
}
encodeOfferingExtension(offering, xbObsOff);
offering.getProcedures().forEach(xbObsOff::setProcedure);
encodeObservableProperties(offering, xbObsOff);
encodeRelatedFeatures(offering, xbObsOff);
encodeObservedArea(offering, xbObsOff);
encodePhenomenonTime(offering, offeringCounter, xbObsOff);
encodeResultTime(offering, offeringCounter, xbObsOff);
encodeResponseFormat(offering, xbObsOff);
encodeObservationType(offering, xbObsOff);
encodeFeatureOfInterestTypes(offering, xbObsOff);
encodeProcedureDescriptionFormats(offering, xbObsOff);
xbContType.addNewOffering().setAbstractOffering(xbObsOff);
/*
* Offering addNewOffering = xbContType.addNewOffering();
* addNewOffering.addNewAbstractOffering().set(xbObsOff); XmlHelper
* .substituteElement(addNewOffering.getAbstractOffering(), xbObsOff);
*/
}
Aggregations