use of net.opengis.sos.x20.CapabilitiesType.Contents in project arctic-sea by 52North.
the class GetCapabilitiesResponseEncoder method setContents.
/**
* Sets the content section to the Capabilities document.
*
* @param xbContents
* SOS 2.0 contents section
* @param offerings
* SOS offerings for contents
* @param version
* SOS response version
*
* @throws EncodingException
* * if an error occurs.
*/
protected void setContents(Contents xbContents, Collection<SosObservationOffering> offerings, String version) throws EncodingException {
final ContentsType xbContType = xbContents.addNewContents();
// for gml:id generation
int offeringCounter = 0;
for (final SosObservationOffering offering : offerings) {
if (offering.isValidObservationOffering()) {
++offeringCounter;
encodeObservationOffering(offering, offeringCounter, xbContType);
}
}
// FIXME: change swes:AbstractOffering to sos:ObservationOffering and
// the namespace prefix ns to sos due to
// XMLBeans problems with substitution
// (http://www.mail-archive.com/dev%40xmlbeans.apache.org/msg00962.html).
renameContentsElementNames(xbContents);
}
Aggregations